How paramater values are stored in the Ctrlr VST and sent back to the device?

Home Forums General Programming How paramater values are stored in the Ctrlr VST and sent back to the device?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #121133
      • Topics: 15
      • Replies: 62
      • Total: 77

      I am working back on the implementation of my Ensoniq DP4 panel within the DAW.
      I was wondering how the parameter values of CTRLR were stored then sent back properly to the Midi device you control at the Host’s launch/recall?

      Host >>> ctrlr vst settings >>> external device

      What’s your strategy to save/restore all the values of the controlled midi device? Do you send paramater change one by one or you create a file with all the param values as a preset then send this dump to the midi device on recall/startup?

      Do you prefer storing manually the current preset as a sysex file then load it back to the machine?

      I am a bit lost about that because in my case it seems that sending a long burst of datas for each parameter is not safe at all, if one is out of range, or unexpected, it fails.
      The External unit would prefer getting a solid sysex dump like a preset on launch.

      How do you usually proceed for total recalls with hundreds of parameters?
      I’m brainstorming about that before starting coding the safest method and need some experimented users who already work with complex custom setup recalls.

      Thanks a lot for your insight.


        • Topics: 4
        • Replies: 480
        • Total: 484
        • ★★

        Hi Damien,

        Maybe something like this using stateData?

        You can save all sysex data as one long string and on load send packets of data back to the synth by locating each F0 in the string:

        “Called When Ctrlr state is saved”


        and recover with something like:*

        “Called When Ctrlr state is loaded”

        local str = stateData:getProperty("myBigString")
        local data = MemoryBlock(str)
        for i = 0, data:getSize() - 1 do
            if data:getByte(i) == 240 then
                panel:sendMidiMessageNow(CtrlrMidiMessage(data:getRange(i, 600):toHexString(1)))
            -- i.e.sysex message = 600 bytes

        *Untested pseudocode. Let me know if this is what you mean.

        Also more reading:

        Global Persistent Variables?

        In that example data is saved emulating a table key/value structure

        See source code of my Juno Alpha panel.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • The forum ‘Programming’ is closed to new topics and replies.
      There is currently 0 users and 81 guests online
      No users are currently active
      Forum Statistics
      Threads: 2,495, Posts: 17,374, Members: 77,605
      Most users ever online was 12 on January 22, 2019 3:47 pm