Discovery MIDI Sample Player

[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.

9 thoughts on “Discovery MIDI Sample Player

  1. 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?

    1. 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.

      1. 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.

  2. 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.

Leave a Reply to andrewjhullCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.