Prang: A "midi Score Sampler"

About the project

Prang is a prototype for a musician's friend I am creating that allows you to store premade sequences and spit them out to your performance on demand. This way, you can add backing tracks to your performances. With it you can trigger tracks from type 2 MIDI files to add to your recording or performance.

Project info

Difficulty: Moderate

Platforms: Arduino

Estimated time: 1 hour

License: MIT license (MIT)

Items used in this project

Hardware components

ESP32S3 ESP32S3 x 1
ILI9341 ILI9341 x 1
SD Reader Module SD Reader Module x 1
Rotary encoder Rotary encoder x 1
Momentary pushbuttons Momentary pushbuttons (Can actually add as many as you like) x 4

Software apps and online services

Platform IO Platform IO You cannot develop this with Arduino IDE

Story

I originally made Prang as an FL Studio plugin but there were some limitations, and I really wanted a little hardware device to do what this otherwise required a PC for.


It's easier to show you what it does than tell you, so I'll do that. Forgive my bad timing. These microswitches are hard on the fingers. The action is really stiff, and the final version of Prang will not use them. Instead, it will take its input from another MIDI device. Since I am waiting on the parts for that, it is not implemented yet.


What I'm doing here is playing the individual tracks when I hold the corresponding button. The prang.mid file has 4 tracks in it, and I'm basically triggering them as I want them to compose the simple little beat.


This version uses buttons hardwired to the device, but the final version will have MIDI jacks on it and accept the signals from another MIDI device, like a keyboard. Each key can trigger a different track that way, and it's far more comfortable and responsive than cheap microswitches!


This project currently requires an ESP32-S3 DevkitC from Espressif, but will work on an ESP32-S2 with some modification. It currently uses the secondary programmable USB port to emit MIDI to. I use MIDI-OX to monitor the incoming MIDI on my PC and route it to my sound card.


We will be using my pre-release SFX library to facilitate the MIDI functionality and my GFX library to handle the display.


This project also uses ESPTinyUSB and ESP32Encoder under the /lib folder. These portions are not my work. I've distributed them with the project because they are not in the Platform IO repository that I know of - at least not the versions I need. I wrote a little shim to thunk my SFX midi_output interface with ESPTinyUSB, and that's the extent of my use of it. It handles the USB MIDI output. The other library handles the encoder knob.


This site will not let me describe the code here, so if you'd like a detailed rundown of this project, you can find it at codeproject.com

Code

Prang at Github

Prang code

Credits

Photo of honey-the-codewitch

honey-the-codewitch

Just a shiny lil' monster. Casts spells in C++. Mostly harmless.

   

Leave your feedback...