Change a preset inside a sysex formula

Home Forums General Using Ctrlr Change a preset inside a sysex formula

This topic contains 6 replies, has 4 voices, and was last updated by dnaldoog dnaldoog 1 month, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #82648

    roger@fo-co.com
    Participant
    • Topics: 2
    • Replies: 17
    • Total: 19

    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
    F7

    Happens, 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

    #82650
    Possemo
    Possemo
    Participant
    • Topics: 13
    • Replies: 454
    • Total: 467
    • ★★

    You 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
    F7

    Watch out the field “Expression to evaluate when calculating the modulator value from the midi message value”.

    • This reply was modified 5 months, 3 weeks ago by Possemo Possemo.
    #82677
    goodweather
    goodweather
    Participant
    • Topics: 38
    • Replies: 321
    • Total: 359
    • ★★

    Hi,
    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 like

    mbTemp = 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).

    #82791

    roger@fo-co.com
    Participant
    • Topics: 2
    • Replies: 17
    • Total: 19

    Hello guys!

    Thanks for your input. Especially Possemo seems to be everywhere.

    I´ll give it a try.
    All the best.

    Roger

    #82887

    roger@fo-co.com
    Participant
    • Topics: 2
    • Replies: 17
    • Total: 19

    Hello, 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

    #82894
    goodweather
    goodweather
    Participant
    • Topics: 38
    • Replies: 321
    • Total: 359
    • ★★

    Hi, 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 🙂

    #84580
    dnaldoog
    dnaldoog
    Participant
    • Topics: 0
    • Replies: 135
    • Total: 135
    • ★★

    I 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.
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

There is currently 0 users and 10 guests online
No users are currently active
Forum Statistics
Threads: 2,143, Posts: 15,126, Members: 12,023
Most users ever online was 5 on March 28, 2018 6:11 pm
Do NOT follow this link or you will be banned from the site!