Hi there, I've been working on a MIDI project for over a year (in my spare time). The goal of the project is to play midi files from an SD card, among other things. I have a Mega, Ruggeduino MIDI shield and the ADafruit TFT LCD w/joystick/SD card. My sketch plays/loops the file in time with MIDI clock sync. I have a couple versions of the code: (the interrupt handles midi clock sync & tick counts, which are then compared to midi deltas)
1. the midi file plays within the interrupt. pro: playback is better slightly, joystick doesn't interrupt playback. con: can only handle 3 or 4 tracks for a type 1 midi file. type 0 needs more testing.
2. the midi file plays outside the interrupt: pro: can handle midi type 0 & 1 equally, handles songs with 16 tracks. con: joystick interrupts playback (but not timing)
I need some guidance as to weather there's a way to resolve the interruptions in #2 above. I don't think there is unfortunately because of the single SPI bus?
Is there a better solution or shield that decodes MIDI files (and can loop them in time with a MIDI clock sync?). I see the vs1053 shields but I'm not sure it would all work nicely. I also need to accept input from MIDI devices as well, as I have the code to map MIDI notes to other MIDI events. my project is here:
https://github.com/deseipel/Arduino/tree/master
MIDI solution
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
Please be positive and constructive with your questions and comments.