Using Synestesia w/ Mezzz! - Gyro -> Generic Midi Converter in Touch Designer

Hey all! First post here.

I wanted to use the Mezzz’s gyroscopes to control Synesthesia via normal MIDI mapping, but I learned that the Mezzz gyro data comes in as custom SysEx messages that cannot be simply 1:1 MIDI mapped by other software. The messages contain the gyro data as a quaternion, encoded in ASCII. This seemed like a job for TouchDesigner, so I put together this .toe file that first collects all MIDI messages via a midiIn DAT, and then does some scripting to separate out the gyro messages from the rest. Finally it puts it all back together into a midiOut CHOP that can be sent to a virtual MIDI device/midi loopback enabler, to be accessed by other MIDI-enabled software on your computer.

For the MIDI loopback, I used: loopMIDI | Tobias Erichsen

You can download the TouchDesigner .toe file here: https://www.dropbox.com/scl/fi/vhl7d82olp8d3htv0bzb4/MezzzGyroToMidiOut.toe?rlkey=tkdgvvhspvj7w3phzhsm1x2kd&st=uxlhvzwz&dl=0

Definitely not perfect, but it does work!

Known problems:

  1. Seems to be some “drift” around the axes. Not sure if this is hardware related or my quaternion → euler rotation math is wrong. Betting it’s more likely the latter.
  2. It crashes from time to time. I wasn’t sure if this was related to me accidentally hitting the side buttons on the Mezzz, but it seems like if a different SysEx message comes down the pipeline, other than Gyro, it can sometimes freeze up TouchDesigner.
  3. TouchDesigner is always finnicky with MIDI, so the freezing could also just be TouchDesigner having trouble with loopMidi or with having multiple midi devices active at once. The crashing seemed to be way better once I got rid of the midiIn CHOP I was using, in favor of only using a midiIn DAT. It likely only wants a midi device open in one chop or dat at a given time.

Hi, welcome & thanks for sharing this @Meebs !

Im sure the people who use Touch Designer around here will enjoy this one.

Here is also the link to the demo vid!