Hello all,
I am hoping to make an electric drum kit based on the Teensy 3.1 + Audio board. This is rev 2 of a project I made a few years back: http://drummaster.digitalcave.ca/drummaster/. The original version ran on an Arduino and communicated with a computer for playback. Now, I want to make it completely self contained.
The analog stuff is easy and I have plans mostly completed for all that. What I am not sure about is the abilities of the teensy.
Basically, the workflow goes like this:
1) Hit a pad
2) Peak detection circuit to hold analog value; pass this value through to the teensy's ADC via an analog MUX
3) Teensy reads value, looks for the corresponding raw audio file (or wav file, but I think raw is faster), and starts to play it.
This is all simple enough... the issues start when you have multiple sounds playing at once.
Obviously some sounds are longer than others (a ride cymbal will play for easily 10+ seconds, whereas a snare drum will be less than a second).
In the computer-based implementation, I used multiple threads to play each sound, and kept track of how many sounds were currently active. If there were more simultaneous sounds than some limit (I think it was 16, but don't remember offhand). If there were more than this number of sounds playing, I would stop the one which has been playing the longest.
Now I realize that a teensy is not as powerful as a computer, so 16 sound polyphony is probably not feasible. However, how many samples *can* I expect to play back concurrently, when streaming off an SD card? (Assume for the sake of argument that I have the best SanDisk card that money can buy). Is 8 achievable? 6? I don't need 16, but I don't think that i can go lower than about 6 - 8 before you can audibly hear the sounds cutting out. More is obviously better.
I would be handling the task of stopping sounds manually if there are too many playing at once.
Anyway, I thought that I would get a feel for the hardware capabilities before I purchased anything... thanks for any advice that the community may have!
Cheers
I am hoping to make an electric drum kit based on the Teensy 3.1 + Audio board. This is rev 2 of a project I made a few years back: http://drummaster.digitalcave.ca/drummaster/. The original version ran on an Arduino and communicated with a computer for playback. Now, I want to make it completely self contained.
The analog stuff is easy and I have plans mostly completed for all that. What I am not sure about is the abilities of the teensy.
Basically, the workflow goes like this:
1) Hit a pad
2) Peak detection circuit to hold analog value; pass this value through to the teensy's ADC via an analog MUX
3) Teensy reads value, looks for the corresponding raw audio file (or wav file, but I think raw is faster), and starts to play it.
This is all simple enough... the issues start when you have multiple sounds playing at once.
Obviously some sounds are longer than others (a ride cymbal will play for easily 10+ seconds, whereas a snare drum will be less than a second).
In the computer-based implementation, I used multiple threads to play each sound, and kept track of how many sounds were currently active. If there were more simultaneous sounds than some limit (I think it was 16, but don't remember offhand). If there were more than this number of sounds playing, I would stop the one which has been playing the longest.
Now I realize that a teensy is not as powerful as a computer, so 16 sound polyphony is probably not feasible. However, how many samples *can* I expect to play back concurrently, when streaming off an SD card? (Assume for the sake of argument that I have the best SanDisk card that money can buy). Is 8 achievable? 6? I don't need 16, but I don't think that i can go lower than about 6 - 8 before you can audibly hear the sounds cutting out. More is obviously better.
I would be handling the task of stopping sounds manually if there are too many playing at once.
Anyway, I thought that I would get a feel for the hardware capabilities before I purchased anything... thanks for any advice that the community may have!
Cheers