- LEGO ipMIDI
- aMIDIcat
- My first MIDI instrument
- Yoshimi Pi
- Tuning the Pi
- A few last notes
And here it is, the first working MIDI instrument:
- 2 MINDSTORMS EV3
- multimidicast running on each EV3 and on my laptop
- aMIDIcat running on each EV3 listening from a named pipe
- pybricks-micropython script running on each EV3, scanning the status of the touch sensors and sending MIDI commands (note ON/OFF) to the named pipe
- Timidity++ and Rosegarden receiving and playing the MIDI commands
- Sound Bank: General MIDI by D. Michael McIntyre, Program 89 – Pad 1 (new age)
The source code is available at github. If using more than one EV3 to extend the number of ‘keys’ just define each note here:
# notes associated to each sensor my_notes = [midi_notes.C4, midi_notes.D4, midi_notes.E4, midi_notes.F4]
so if using 2x EV3 with a total of 8 touch sensors to produce a full octave (a requirement of my wife to be able to play “Happy Birthday” that needs two different C’s) the second one will have:
# notes associated to each sensor my_notes = [midi_notes.G4, midi_notes.A4, midi_notes.B4, midi_notes.C5]
While recording the above video with my Android phone I noticed that I got much more stuck notes than when not. It looks like the phone being to close to the “intrument” degrades the multicast experience. So I am now reading TouchDAW’s FAQ and network tips and also searching for other clues related to midicast problems in Wi-Fi as it looks like that Wi-Fi routers don’t handle it like Ethernet routers do. So this may help:
- turning off Bluetooth everywhere [I have some doubts but]
- turning off all unnecessary Wi-Fi devices
- … or even better, get a dedicated Wi-Fi router
- … or even better [if it works] get a USB to Ethernet adapter for each EV3 and ditch Wi-Fi