help a noob out

Status
Not open for further replies.

remork

New member
hello there

for this project/instrument i've been dreaming of, i've been looking for small audio file players.. and it looks like teensy could be the answer.

let me explain: in short, i want to build something like a single-octave mellotron. with one stereo soundfile assigned to each note on the keyboard.
except, where a mellotron plays the files from the beginning with each keypress, i want all twelve soundfiles to be running and looping continuously. and only to be heard when you press the corresponding key, so you 'open the fader' at random points in the files.

i have built a simulation of this using Ableton (12 loops) and PureData (envelopes and control) and results were really good, but i would like to build this into a standalone hardware instrument.
i'm thinking i can get the volume controls, attack and release timings etc., done in the AudioSystemDesignTool, so that would save me a lot of hardware puzzles (aka building 12 ADSR-driven VCA's.) which is a good reason to use Teensies over, say, 12 chinese mp3players running all the time :)


my questions then, before i jump in and order about 400 dollars worth of teensies..

- does file length have an impact on the number of files that can be played simultaneously from a single SD card? couldn't seem to find a definitive answer on that one.
my longest file is 10 minutes, the shortest around 5 minutes. and yes, those are the files i intend to use, so no flash memory possible there. :)
i know i'm probably looking at something like 6 audio shields on 3 teensy boards, since i was hoping to run two files from one SD card/audio shield.
but like i said, they would all have to be playing simultaneously, all the time.. is this doable?
anybody tried e.g. using full songs instead of shorter samples?

- the site mentions the .wav header readout takes some time, aka silence. would that be the case for every time the file loops, and what length of silence am i looking at? milliseconds or seconds?

- the blatant noob part: apart from the Audio System Design Tool, is there a lot of extra arduino programming involved to get everything up and running?
i'm pretty good at the visual programming thing (Pd and max i'm ok with), and the analogue hardware doesn't worry me either - but Arduino is pretty much all new to me. yikes.

sorry if these questions get asked all the time, but i couldn't find any real duplicates using the search function.
thanks in advance!
 
i was thinking something along these lines, multiplied by three.

audiosystemdesigntool1.jpg

just noticed i should've put this in the Project Guidance section, sorry bout that..
 
One issue you'll run into is the limited SD card bandwidth. The Arduino SD lib currently reads 1 sector at a time, and it has other limitations which conserve RAM but don't give optimal performance. There's a slightly improved SD_t3.h library you can enable.

Realistically, even better SD cards can play at most 3 or 4 simultaneous stereo WAV files with today's SD library. Someday I hope this situation will improve, and the SD_t3.h lib was meant to be the first step in that direction, but it's likely to be quite some time until the SD library can do more files simultaneously.

Your other options are using a serial flash memory, which can play about 12 mono WAV files simultaneously, or to put the samples directly into Teensy's program memory. Playing directly from program memory is very efficient, but there's only about 200k left over in Teensy 3.2 or most of 1 MB in Teensy 3.6. If your sounds are short, that may be a very good option.
 
hey paul

thanks for your reply, much appreciated!

big problem here is that my files are enormous :)
they're part of an older project, that continues to be developed - so the idea is definitely to use the original files.
and like i said, the longest one is 10 minutes full stereo.. and i would like to preserve quality, so flash or internal is no go.

a friend of mine directed me towards the sparkfun/robertsonics Tsunami, which can play up to 18 stereo files simultaneously.
unfortunately, it doesn't offer the built-in vca control, or the graphic programming environment that Teensy does.
so it would either require a lot more programming to control it through an arduino, or more hardware electronics (12 vca's..)

guess i'll go digging deeper into both options pro's and cons. thanks for now!
 
Status
Not open for further replies.
Back
Top