ok, this was quite some work, but it is getting somewhere. I released firmware 2.1.6 earlier today (check the downloads section on the website) and updated the app.electra.one. The release brings a beta version of the visual editor for the Patch requests and the Patch parsing rules. I am releasing it as a beta because I need some feedback and help from all of you. It looks like that the hardest part on this project is to design a good UI that users would understand. Another reason why is marked as beta is that the visual editor does not support more than one response per request as well as it does not support older format of the parsing rules (bPos, pPos, etc).
For making the first step I suggest to work on an extra copy of your preset or start a new preset from scratch. Just in case that something went wrong…
I used the new editor recently to create a preset for Sequential Mopho and Waldorf Wave XT. It took me only a few hours in the evening to make a complete preset with all controls and full bi-directional support. On top of that, Mopho does not have the patch dump SysEx documented. So, the editor can be seen also as kind of a tool for doing reverse engineering of patch dump SysEx messages. With Wave XT I did not even bother with looking at the information about the parameters, I simply used the MIDI learn to get the controls right and the patch editor to map it to patch dump SysEx messages. I did not write a single line of JSON while I worked on these presets.
What I am after now? It would be great if some of you were willing to give it a test ride. It would be great to hear some feedback on the UI and possibly some proposals on how to improve it. Some parts, especially the Parameter detail, are still a bit too technical. I do feel that if we do this right, it will become real easy to add patch dump parsing for any device and almost by any user.
As the documentation is missing, here are a few steps about how I used to tool so far:
Create a new preset and add a control. In this case it is Mopho synth and I will work with the Cutoff parameter:
Upload the preset with the Cutoff control to Electra One controller and open the Patch editor. You can find it in the Device section of the preset editor sidebar - ‘Edit device’ button.
In order to get started, you need to know if the synth supports a Patch dump request SysEx call. Review the device User guide or MIDI implementation guide. Look for patch dump request, ideally a edit buffer dump. eg. for Mopho you can find following request in the docs:
The next step is to register the patch Request in the Patch editor. Simply add bytes to the request and use the form on the right side to put the correct values in. You can enter the byte values in hex, cec, and binary notation. Do not enter the F0h and F7h bytes. These are markers of the SysEx message itself. The following request corresponds to the request shown above in the Mopho’s docs:
Click the Send to electra
button to make sure that controller gets info about the request. If you now press the Patch request
button on the controller, the MIDI Out indicator should flash shortly, meaning the request message is sent out.
Now it is time to start working on the parsing rules to get the data out of the synth’s response. To do so, switch to Responses tab. The Responses tab allows you to see incoming patch dump SysEx messages, assign bits and bytes to preset controls:
Click the Enable MIDILearn
button at the bottom of the window and then press the Patch Request
button on Electra One controller. If the device is configured correctly, the request will be send and the device will respond with the SysEx patch dump message. The right pane of the window allows you to review full content of the patch dump message in hex, dec, ascii, and binary form:
the first important step is to mark the fixed part of the message - the header. The header is used to identify incoming SysEx patch dump messages. Thus it informs Electra for what messages it should start with the parsing.
The header can be marked by clicking the byte position number. Click on the byte position number to tell electra where the patch dump header ends. This is not very user friendly yet…
Your patch dump data will have some bits marked with a green colour. This indicates that the bit has changed since the previous message has been received. For now, just click Clear marked
button to make sure that no bits are marked as changed and you start with a clean list:
Now the magic comes, twist the Cutoff control on the controller (the that was set up earlier) to its maximum. Then, hit the Patch request
button on the controller again. If you scroll down, you will noticed that some bits are marked now:
Observe the bits and then twist the Cutoff knob again to some other value. Looking at the marked bits, value 127 might be a good one to test. When the value is set, click the Request patch
button on the controller again. The bits used by the parameter should emerge. Good values to discover all bits are 0, 1, 3, 7, 15, 31, 63, 127, 254, min, max. I hope you catch my drift:
It’s time to assign the marked bits to the Cutoff control. Click on the Cutoff / value
on the left side. It will become selected (blue) and the detail info will be shown in the mid section of the window.
Now, click on all the marked bits. Start with the lower ones and go from the right to the left. When all bits of byte 23 are marked click the bit of the byte 16. By doing so, you will create the parsing rules. If you click the bits from the right to the left and you click the bit next to the selected bit, you will create a continuous range of bits, producing one rule. If you click bit in another byte, a new rule will be added automatically:
In this particular case, there has been two parsing rules added. (This is actually MS packed format). You can see the rules in the middle section of the parameter detail. The last thing you need to do, is to move the bit “P0 R0 B16 6…6” to the bit position 7 of the parameter to form an 8-bit number. I will add some visual for this. For now, I took this simple approach:
If you wondered what the letters mean, then:
P → patch request identifier
R → response indentifier
B → byte position
n…n → range of bits
The selection list is the position of the parsed data (n…n) in the parameter value
Now, click the Disable MIDILearn
button. Twist the Cutoff knob to some value, eg. 100. When done, click the Send to electra
to make sure the preset is transferred to the controller. Transferring the preset will also reset the value of Cutoff control to 0.
When the preset is uploaded, hit the Patch request
button controller. If everything is done right, cutoff will be set to 100. Meaning you just retrieved the value from the connected device!
You can repeat this process for other parameters.
if you are in doubts, or if you feel something is not right, or if you just feel like editing the JSON source, just click on the JSON tab. It always shows and allows editing of the raw patch parsing JSON:
Happy testing!
edit1: If the device does not support patch request calls (eg. MKS-50), leave the request empty. It is not required. Just enable the MIDI learn and initiate the patch dump on the synth/device.
edit2: It is quite handy to test things with the sendmidi
tool.
PS: a month ago @Resyn told me that he thinks he will never be able to make a preset as he does not know JSON and stuff. This is my attempt to make it possible for him!