thanks!
there’s a bunch of midi sysex commands which can request data (patterns, kits etc) from the Rytm. What you get is the same sysex data that’s used for backups with c6.
I’ve reverse engineered that data so that it can be edited, and created object-oriented wrappers around the data so it has getters/setters for trigs, p-locks etc…
patterns especially are relatively complex & large structures (compared to most sysex) - they’re around 15KB.
The second part is a wrapper around the midi communication. Asking for a pattern consists of sending a request, and waiting for a response… this is wrapped into an asynchronous request/callback mechanism for all the Rytm data structures. Feels less like midi now, more like sending a network request.
so basically, when strom adds trigs to a pattern, it asks the Rytm for the current pattern, receives it, calls some functions on it, and sends the data back.
This is all done in Objective-C…
recently I’ve written another layer on top of that which translates these ObjC objects to JSON and back, and exposes this as a http REST API, so it’s now pretty easy to program the machine in JavaScript in the browser.