Home › Forums › General › Using Ctrlr › Change a preset inside a sysex formula
- This topic has 6 replies, 4 voices, and was last updated 5 years, 9 months ago by dnaldoog.
-
AuthorPosts
-
March 1, 2018 at 7:40 am #82648
Hello!
I am working on a Voice Editor for Yamaha RM 50 (the Morpheus panel I was making is working so far).
I am trying to understand a detail from the Yamaha RM 50 implementation.
Inside the sysex code you have to specify the memory and the preset you intend to change. Here I show you the sysex structure for this purpose:F0
43 Yamaha Corp.
01 Device ID
30 identifies the RM 50
03 indicates that a parameter will be changed
06 indicates MEMORY BANK (it´s set here to internal user bank)
PP indicates the preset/program number to edit
02 indicates change inside Element 1 (RM voices have two elements)
03 indicates volume of this element
ms
ls
F7Happens, that I have no idea, how to change at least the preset/program number inside the formula marked with PP. I would also like to change the memory at some point, but that´s secondary and not urgent at all for me at the moment.
To change the preset, I would like to use some kind of slider, and I understand, that this slider has to send some variable, which should change the PP paremeter inside the sysex formula, but no clue, how to achieve this.
I already tried some ways, but I am not sure, how to make send a slider a variable value, and how to let that value enter the sysex formula:
As always, any help is really appreciated. It´s the first forum, where I really received some useful help.
All the best.
Roger
March 1, 2018 at 11:52 am #82650You can do this with so-called “global variables”. You will need one global variable and the ms/ls vars you already know about. Look at the demo-panel for the Matrix-1000 – the mod-matrix. You will find it in the Ctrlr-folder. It uses 3 global variables per mod-matrix-routing. A routing consists of 3 parameters (Source, Amount, Destination) which are all sent together in one sysex message. First global var is called “k0” so the message would look something like this:
F0
43 Yamaha Corp.
01 Device ID
30 identifies the RM 50
03 indicates that a parameter will be changed
06 indicates MEMORY BANK (it´s set here to internal user bank)
k0 indicates the preset/program number to edit
02 indicates change inside Element 1 (RM voices have two elements)
03 indicates volume of this element
ms
ls
F7Watch out the field “Expression to evaluate when calculating the modulator value from the midi message value”.
- This reply was modified 6 years, 1 month ago by Possemo.
March 2, 2018 at 11:27 am #82677Hi,
I’m doing this all the time in my Pro2 panel (I mean manipulating sysex) and you can do this very easy by using memory blocks.
For your question:
– create a modulator to select the bank
– create a modulator to select a preset
– create some button with temporary action. Attach it a method like Preset_OnChange (this is just my naming convention)
– in that method put some code likembTemp = MemoryBlock ({0xF0, 0x43, 0x01, 0x30, 0x03, tonumber(string.sub(sBank,-1))-1, iProgram-1}) -- mbTemp:append(PackDsiData(LoadedProgramData)) mbTemp:append(MemoryBlock ({0xF7})) panel:sendMidiMessageNow (CtrlrMidiMessage(mbTemp))
I leave you the example of using a string conversion for bank or directly a number for program. Of course you need to replace this 🙂
I also left the append to add the F7 even if you can put it directly in the first line. Just to show that you can append things on the fly (as my commented line where I add the complete program dump).March 6, 2018 at 8:57 am #82791Hello guys!
Thanks for your input. Especially Possemo seems to be everywhere.
I´ll give it a try.
All the best.Roger
March 13, 2018 at 9:36 am #82887Hello, just a feedback on your responses.
I probably figured out how this works (but not tested on the hardware, but I am confident). I am using one fader to change the variable, and another one (with the sysex formula) to receive the variable as k-value.
Thanks again for your help.
———————————————————-
A couple of questions just to confirm:1. If I understand this well, I can use those k-variables for example to change the Device ID?
2. There are 4 groups for variables: K, o, p and n. Do they all work the same way as the k-variables?All the best.
Roger
- This reply was modified 6 years, 1 month ago by roger@fo-co.com.
March 13, 2018 at 2:58 pm #82894Hi, as explained above, you can do all of this fully flexible (I mean any number of variables and full control) by using some simple Lua code…
– create another knob or pulldown list to select the Device
– adapt the line of code creating the memory block by putting a variable in the 3rd position (instead of fixed 0x01 device ID)If you are lost and don’t know how to handle this (I mean Lua methods), I can build a simple panel for you tonight 😉
But you can also take Possemo’s route
Just let me know 🙂July 13, 2018 at 7:30 am #84580I would do that something like this: (See attached panel)
This function, from a separate uiSlider, writes a sysex formula to the uiSlider that will send the sysex message to the Yamaha.
addPP = function(mod,value,source)
local PP=string.format(“%02X”,value)
myMess=”F0 43 01 30 03 06 “..PP..” 02 03 ms ls F7″
panel:getModulatorByName(“myModulator”):getMidiMessage():setPropertyString(“midiMessageSysExFormula”,myMess)
end
Regards,
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.