Reply To: Change a preset inside a sysex formula

Home Forums General Using Ctrlr Change a preset inside a sysex formula Reply To: Change a preset inside a sysex formula

#82677
goodweather
Participant
  • Topics: 45
  • Replies: 550
  • Total: 595
  • ★★★

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

Ctrlr