Hi JP,
instead of building somehitng from scratch (which is fun of course
) maybe that you should look at Ctrlr that enables you to build any kind of panel for Midi devices.
It is based on Juce but uses the Lua language for coding when necessary.
I have manipulated JUCE a bit already and indeed it is a great piece of software, I did not know about Ctrlr however. I must say good job on your interface it looks pretty neat.
JUCE is king of fancy gui but a bit out of my confort zone, right now I keep with tech I'm familiar and avoid a learning curve. Focus is on the feature set I want to implement.
I was going to start looking at the sysex dumps (buffer content and presets) so I was interested to get a documentation of your sysex analysis.
What I'm looking for is:
- what is the sysex command to request the buffer dump from the Sub37?
- what is the sysex command to request a specific preset dump from the Sub37?
- what is the content and position of each parameter in that dump?
I am working on the Slim Phatty, not Sub37, which I do not own. I have no idea if still my info may be valuable to you but I will explain. (refer to my source code in git)
I use two sysex methods, from phatty.c in source. The first one requests the panel, and second is for presets in range 0-99.
Code: Select all
const uint8_t sysex[] = {
0xf0, 0x04, 0x05, 0x06, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf7 };
const uint8_t sysex[] = {
0xf0, 0x04, 0x05, 0x06, 0x04, preset_num, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf7 };
(If you have an editor on Windows, you can use APImonitor and set your breakpoint on API midiOutLongMsg. Inspect the buffer. It's how I do it. MIDI-OX did not work for me.) If not possible, messages are simple so you may want to try brute force, seeing what generate replies.
About the content of the dump, you must look at tools/codegen-fmt.lisp in source. It has a pretty explicit description of the index and the bit patterns. I do not write the C code to read and write directly, I generate code off lisp language to simplify the work.
For example of how to read it:
("gate_mode" #x17 (#b1 #b11100000))
A parameter of size 4 bits spanning over 2 bytes starting at index 0x17, whose bit positions are given by the masks.
I find the form of the sysex dump is something like : 0xf0 <header> <zero-padding> 0x01 <message> 0xf7
The size of zero-padding varies, so I skip the zeros and position my byte-offset 0 where the 0x01 is. It is the signification of the byte-offset in lisp code above, it is not from start of sysex.
I hope this information is clear and it may help you. Feel free to reuse my source however you like.