i have just made my first page of controls. i have placed controls to adjust levels on a mixer device by sending NPRN messages. It works. i search how the controls could, at the start, read the value of the levels. I have found on midi documentation how read the level by sending a request by CC message, my question is how read the value in return and set it to the control on the screen of electra one. i think i have to use lua but not found easy introduction, i just want make this basic thing. Sorry if my question also seem basicâŚ
If the mixer responds by sending the corresponding NRPNs back to your Electra, the controls will be updated automatically. By âcorrespondingâ I mean they are the same NRPNs as you use for sending control values to the mixer.
By default, Electra can send a Sysex message to request data from the connected devices. It is the most common pattern. If a CC is used instead, you can do that with a very simple Lua script:
function patch.onRequest(device)
print("Requesting a patch...");
midi.sendControlChange(device.port, device.channel, 10, 100)
end
this will print the debug message and will send CC 10 with value 100. You can remove the line with print of course.
The question isnât basic. Itâs something all that create these templates/presets/editors face.
There is a way to do it without LUA, but itâs always helpful if you mention the device by name and maybe even provide the MIDI documentation for it 9either attached to the message or as a link).
Folks love to help, but time is often tight, so the more specifics you provide, the more likely it is that someone can speak up with a specific solution for you.
euh, i am a bit ashamed⌠i just try the preset and look with the PC software of control of the mixer and indeed the Electra control lvel and the real level are the same⌠So it work âby itselfâ (after i suppose having used the electra control for having an âanswerâ with actual value?). And in reality the get values is a specific NRPN commend not a cc command⌠sorry for that.
Martin: For using function in Lua script i have to initiate myself. I have to try to understand and use the luas script function of the electra. i have seen there were some preset for that.
Oldgearguy: yes i think send cc is easy, my question was general : how â"readâ, and affect to a control, a value sent by the device.
The mixer is an allen&Heath CQ20b.It is mixer without button/screen, i use it for effect mixer (external effects) for synths . With E1 i can send (and adjust) any out of synth to any multi-effect device.
The midi protocol is downloadable at https://www.allen-heath.com/hardware/cq/cq-20b/resources/ (i donât see how join the file to this reply). the reading of value is page 13 âgetting valesâ: the NRPN Get Command is B0 63 MB B0 62 LB B0 60 7F. (so i have for my understanding now see how read the answer).
Thank you for your answers.
oh, sorry I forgot to mention that. The patch request is triggered by pressing the top-right rubber button.