>a question from info line that I really can't answer
>I am looking for any sample programs you might have for sound
playback on the AIMExpress. I am interested in it for a specific
application and will want to play sound files at a regular interval.
The amount of space available in even the ARMexpress would only hold a
very small sound file, and in any case you would need an external D/A,
so I really expect any solution would probably include some external
chips. Winbond makes some sound record/playback units, there are a
number of other sound chip vendors (Yamaha comes to mind). But I
really have not done any of this outside of cellphones, where there
was lots of memory and external sound decoders, or internal DSPs.
Anyone else have some experience in this area? I also know a number
of people have been doing Midi things with the ARMexpress.
sound files
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: sound files
Haven't tried anything past the Devantech speech synth myself, but
this might be good for you - Electronics123 has a 5v unit that records
20 seconds of sound and plays back with a momentary switch press.
Shouldn't be too hard to connect up to an ARMExpress and use a pulse
out to trigger it. They're selling it for around $7.
this might be good for you - Electronics123 has a 5v unit that records
20 seconds of sound and plays back with a momentary switch press.
Shouldn't be too hard to connect up to an ARMExpress and use a pulse
out to trigger it. They're selling it for around $7.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: sound files
> I was asked about playing a .WAV file, I'm not much of a sound expert,
While looking at another forum I found this link on .WAV files
http://www.borg.com/~jglatt/tech/wave.htm
I didn't know what the format really was, but in its simplest it can
be just a list of 8bit samples.
So you could play something like this with a pretty simple loop-
#define PIN you-choose
start = TIMER
while TIMER-start < 125 ' 8K sample rate
OUTPUT PIN
i = sample ' where to get the data from
HIGH PIN
while i
i = i-1
loop
LOW PIN
i = 255-sample
while i
i = i-1
loop
loop
So then where do you get the data from?
An ARMmite has room for 12K samples (1.5 seconds), which could be
stored in Flash outside the program.
In an ARMexpress there is probably 80-90K available
For larger files you'll need something external, could be a VDRIVE.
though it probably takes 20uS to read a sample, and you would have to
use SPI
While looking at another forum I found this link on .WAV files
http://www.borg.com/~jglatt/tech/wave.htm
I didn't know what the format really was, but in its simplest it can
be just a list of 8bit samples.
So you could play something like this with a pretty simple loop-
#define PIN you-choose
start = TIMER
while TIMER-start < 125 ' 8K sample rate
OUTPUT PIN
i = sample ' where to get the data from
HIGH PIN
while i
i = i-1
loop
LOW PIN
i = 255-sample
while i
i = i-1
loop
loop
So then where do you get the data from?
An ARMmite has room for 12K samples (1.5 seconds), which could be
stored in Flash outside the program.
In an ARMexpress there is probably 80-90K available
For larger files you'll need something external, could be a VDRIVE.
though it probably takes 20uS to read a sample, and you would have to
use SPI