[Igor b] plays in a band and wanted a way to use a foot pedal to trigger samples. Since he had a STM32F429 evaluation board handy, he decided to build the Stmpler using the board, a touch screen, an SD card, and not much else.
To save pins, [Igor] used SPI mode (instead of SDIO) to access the SD card. He generates audio output using filtered PWM to keep the design simple. Because of the PWM, there is a compromise between bit depth and sampling rate, and [Igor] settled on 12 bit samples at 20.5 kHz.
The software uses Chibios/RT for an RTOS and a GUI library to manage the touch screen. [Igor] says he still has features to add, but that he’s already using it in his performances. The filtered PWM may not be exactly hi-fidelity, but it probably sounds better than a 3D printer. Or maybe he’ll take a tip from us and go wireless.
Wrong STM32 discovery board for the job, the F401 and F411 models come with audio DACs. That and there are more IO pins free than you can shake a stick at, why try to save a couple by using SPI mode on the SD card?
Thanks for the comment! F407 also has DAC and I was thinking about using it. But F429 already has touchscreen connected which makes it easy to configure it in runtime (very useful feature for thing like this). I’ll probably add DAC to this one soon. And some of the SDIO pins are occupied with display, hence the SPI mode for SD card.
You might also get away with an STM32F103VET6 or similar, which does have dual DACs. A lot of work on ‘duinoizing this has line of processors been done. A browse round http://www.stm32duino.com/viewtopic.php?f=19&t=533&p=5432&hilit=midi#p5432 and related topics might be of interest.
We already have ‘duino compatible touch screen and display libraries ported, and working DAC code for the F103 series, and some work done on ‘duinoizing some of the F40X series too. The STM32F103 boards are cheap as chips on flebay and ali.
cool! i didn’t know about stm32duino. will check it out.
then might as well go for the the discovery board with stm32f407 it is $2 cheaper, runs at 168MHz instead of 84MHz/100MHz, and twice the memory, it has the same audio hardware
On the same site… http://hyperglitch.com/articles/osc-glass-harp hacking gold!
It is cool. We covered that back in 2012: http://hackaday.com/2012/08/14/servo-controlled-wine-glass-plays-the-music-of-the-angels/
Not sure I see the value of a touch screen versus simple switches, like one might find on an arcade game, as a trigger.
I’m reminded of two applications of triggered samples in ‘popular’ music:
– when Paul Schaeffer debuted his song written for The Weather Girls (It’s Raining Men’) – he had a Big Red Switch on the corner of his Hammond B6 Organ that triggered the Lightning crack sound sample
– Laurie Anderson’s ‘Drum Suit’ that triggered drum samples when she hit switched embedded in her suit coat and pants.
Actually, touch screen is used only for selecting audio samples and setting options. Triggering is done with MIDI controller, in my case FCB1010.