Teensy 3.1 + Audio Board polyphony - how many is too many?

Status
Not open for further replies.
I'm using this one:
https://www.sparkfun.com/products/9196

Apparently i need to bring the voltage down from a peak of 30 instead; Still AC, though I believe? It doesn't say but the nature of the vibration leads me to believe so.


I'm not so sure this piezo is similiar enough to yours for your circuit to work out of the box.

I've not seen a piezo looking like that, but I assume the theory is the same. Yes, with my piezos there is potentially high voltage AC (with incredibly low current) being output from a piezo. In my design I use a voltage divider to reduce the input voltage. Originally I was using a 10k / 1k to reduce it by a factor of around 1/10, but found that this was too much. Now I am using 1k/1k for about 1/2, and that works much better.

When figuring out how much to drop the signal, you also need to know about your pad design. I find that pad design is just as important as circuit design if you want consistent signals. After a lot of trial and error I arrived at the pad design documented at https://hackaday.io/project/6881-drum-master/log/29084. By doing things like this, you won't get the full 30V-ish max output on the piezos.
 
mine is being attached to a midi device full of arcade buttons.

When I detect a button being pressed, I need the peak from the last XXms. I will apply this as a velocity to the midi note.


This sounds complex, but achievable. Not something I want to do twice though.
Since I will ultimately need a PCB mounted solution, I will wait until i'm developing the PCB to selct a suitable SMD shock sensor / accelerometer.

I'm prototyping at the moment, so I dont want to go down to the Nth degree on a component I almost certainly won't use on the final PCB.

Thanks for your help! :)

Addendum: It looks like an accelerometer could be used as a vibration sensor, and they tend to be able to talk i2c. This might well be a preferable solution for the less electronically minded of us - IE me.
 
Last edited:
Or my last option - i wont clog your thread anymore!

https://www.adafruit.com/index.php?q=vibration sensor switch&main_page=adasearch

The top 3 items are 3 sensitivities of shock sensor. I could just query the three digital pins when a button is pressed to get velocity of 33%, 66% and 100% and map those to suitbale midi velocities - it would give the feel of velocity detection. Far from ideal though.

This one is the easy way out, but it would work after a fashion. No way of calibrating though!!

It wouldn't be hard to build an arcade button with velostat mounted inside affording velocity and aftertouch.......hmmmm.....
 
Or my last option - i wont clog your thread anymore!

Not clogging at all, but if you would rather start a new thread let me know what the link is and I can start replying there. Or feel free to just email me directly.

https://www.adafruit.com/index.php?q=vibration sensor switch&main_page=adasearch

The top 3 items are 3 sensitivities of shock sensor. I could just query the three digital pins when a button is pressed to get velocity of 33%, 66% and 100% and map those to suitbale midi velocities - it would give the feel of velocity detection. Far from ideal though.

This one is the easy way out, but it would work after a fashion. No way of calibrating though!!

It wouldn't be hard to build an arcade button with velostat mounted inside affording velocity and aftertouch.......hmmmm.....

Do your arcade buttons return some sort of pressure value? Or would you be mounting a piezo on / underneath / touching each button to use for the velocity value? The electronics part seems easy, but I can't wrap my head around your physical build.

As far as prototyping is concerned, it would be very easy to prototype the peak detection (I know cuz that's what I did!) ;-) A normal 4x op amp chip with two caps and two diodes will give you two channels with peak detection and buffering. Add a couple more potentiometers if you want amplification / calibration, but that is not required. If you want to get all 16 buttons prototyped, you could probably fit it all on 2 breadboard panels, or just leave the prototype at 2 channels. (That's what I did... if it works for one it will work for a million, right? ;-) )

Cheers
 
Do you have any rough idea how long until the audio library will work with Serial Flash?

No, there's no reliable time estimate. But it ought to be within the next couple months....
Hi Paul,
I'm interested in playing music and sound simultaneously:
I was quite stuck with Arduino... as far as I understand the system described here, I could use Teensy + SPI flash chip + Audio board? or it still requires some evolution of the library quoted above?
Thanks :)
 
Hi Paul,
I'm interested in playing music and sound simultaneously:
I was quite stuck with Arduino... as far as I understand the system described here, I could use Teensy + SPI flash chip + Audio board? or it still requires some evolution of the library quoted above?
Thanks :)

That’s all long since working fine.

With a teensy 3.6 you’d be able to use an sdcard at the same time as “music” if by music you mean synth sounds.

If by music you mean mp3 decoding....you’ll only be able to do that on a teensy 3.6.

3.2 is only just man enough to play mp3s back ;) although Frank might have optimised it further - not sure.

Can you define “music” and “sound” by file format and bitrate/bitdepth please?
 
Sorry for the lack of details :p
I meant reading several .wav files at the same time...

Not sure about quality: 16 bit - 44 kHz would be nice but something equivalent to a mp3 quality of 196 kb/s is fine.
 
You're comparing apples to pears. The MP3-bitrate (by the way- AAC is way better) has nothing to do with samplerate or bit-depth (but it has to be encoded with 44.1kHz for Teensy 3.x)
You can play a MP3 with 196kb/s with any Teensy 3.x - with 16Bit/44.1 kHz. MP3 decoding needs lot of RAM,so the decoder allows only one file a time.
Playing RAW from Serial Flash works best. Don't remember exactly, too long ago that I tried it, but I think more than 10 files simultanously were possible - on a Teensy 3.2
 
When playing WAV files from the SD card, the Arduino SD library is only capable of reading about 3 files simultaneously.

Someday we'll have a better library, but for now the SD library is limited to a 1-sector-at-a-time approach which is far from optimal for modern SD cards.
 
Many thanks for your fast answers ;)

I'll try to rephrase my question (sorry english is not my native language):
► my need: playing multiple audio wav files (up to 4 simultaneously) in 16 bit - 44 kHz quality

I've read here https://hackaday.io/project/6881-drum-master/log/27665-extra-flash-memory-working from @thebigone
that reading from SD card is not a viable option but that flash chip is the way

► my question: what hardware setup would do? and with which library please?
- Teensy LC
+ Audio board
+ SPI flash chip (like W25Q128FVSIG 128Mbit 16M x 8bit 7ns Serial-SPI 3V/3.3V) flash chip is 3,3V like Teensy LC

thanks for your expertise,
Mat
 
I’d recommend a teensy 3.2 absolute minimum but for the price - a teensy 3.6 is so much more powerful. I like sledgehammer engineering. Hit it with much more than you need!
 
The Teensy LC has a Cortex M0+ core which does not support all the DSP instructions used by the audio library and the audio board. Thus, you absolutely should have a Cortex M4 processor as in the Teensy 3.2, 3.5 and 3.6 boards which offer full audio library and audio board support.
 
Status
Not open for further replies.
Back
Top