March 26, 2020 at 5:03 am #117514
How can I program a knob with an arpeggio speed for N1. I keep not understanding MSB / LSB and how to use it…
I’m new to this, but I’m loving it!
I let a tech page with this Korg information. Arpeggio speed is on the page 17, almost in the end.
If you could make me a Sysex F0…. f7, I would be very happy. MAybe I could understand that once and for ever.
Thanks a lot.
March 27, 2020 at 2:01 am #117517
- This topic was modified 3 months, 1 week ago by jmarco.
I attach a panel which shows how to do it in Ctrlr without lua.
Because the arpeggiator has a value above 128 the sysex value sent needs to be split into two bytes MS LS in the Ctrlr interface message. That is Most Significant Byte MSB and Least Significant Byte LSB.
f0 42 yy 4c 08 11 00 LS MS f7
yy means channel.
MIDI values are 7 bit 0111 1111 7F = 127 – that’s the limit for one byte; you can only send values from 0-127 with one byte, so because the arpeggiater goes to 240 – you need to send two bytes.
One LSB byte represents values up to 128 0-127: eg for 240 that is 240-128=112
The MSB is another byte recording how many 128s to add to the value. eg for 240 that is 1*128+112
So if you dial in 200 as a value, it’s over 128 so 200-128=72 so your LSB will be 0x48 (hex) 0100 1000 – your MSB is 128 1000 0000. Add 0100 1000 + 1000 0000 and you get 1100 1000 C8 = 200. But it has to be sent in two byte messages.
I don’t have the machine, but I am guessing:
F0 42 04 4C 08 11 48 01 f7 (it looks like the Korg sends LSB first 0x48 and MSB second 0x01). O4 is channel 5
Regards,March 28, 2020 at 2:35 pm #117546
I really like your lua code, but where is it for me to read it? I cannot find it…
By the way it doesn’t work. I’ve changed the 04 for 34, as in the korg manual – thanks for let me know that about yy. Can you look again. 🙂 I’m looking for an answer for two days now…
Thanks a lot for your help. I really appreciate it.
You can take a look at my work – I’ve upload it for the panel subforum. Hope you like it.
March 28, 2020 at 3:15 pm #117548
- This reply was modified 3 months, 1 week ago by jmarco.
Well the code there is a bit of a wild guess. I see so channel is 0x30 + n – sorry about that. That would make the correct sysex
F0 42 34 4C 08 11 48 01 f7
Can you confirm this?
What/Where is the panel subforum? Can you link to it?
If you changed the 04 for 34 I guess you found it in the sysex message field
A lua function would look like:
-- -- Called when a modulator value changes -- @mod http://ctrlr.org/api/class_ctrlr_modulator.html -- @value new numeric value of the modulator -- luaGeneratedSysexExample = function(--[[ CtrlrModulator --]] mod, --[[ number --]] value, --[[ number --]] source) local channelOut=panel:getProperty("panelMidiOutputChannelDevice") local lsb=value local msb=0 if value > 127 then lsb=value-128 msb=1 end sysex_string=string.format("F0 42 %.2x 4C 08 11 00 %.2X %.2x F7",0x30+(channelOut-1),lsb,msb) panel:sendMidiMessageNow(CtrlrMidiMessage(sysex_string)) end -- functionMarch 28, 2020 at 9:10 pm #117549March 30, 2020 at 4:09 am #117567
The value 11 is decimal ! – it needs to be 0x0B in the message!
Try the following panel. There are two possibilities as I see it:
I think Korg calculates MSB different to the system I suggested above (which works for Yamaha)March 30, 2020 at 7:00 pm #117577
Thank you. It’s a great mini method.
Not working… 🙁
Maybe it’something to do with edit parameter change / part parameter change?
I can make it work in the list attached to number 7 Arp. Switch, but no more… and I don’t have a clue why.
F0 42 %.2x 4C 08 0b 00 %.2X %.2x F7
You send it as b0. GREAT!
And also “1” not “128” in the end:
elseif name == “v2” then
if value > 127 then
Thanks a LOT
…March 31, 2020 at 3:26 am #117596
Great to hear!
So the original was correct except for the 11 which should have been
0bnot B0 of course!!!
Here is another panel demonstrating four ways I know of splitting the byte into two values.
 in Ctrlr
f0 42 yy 4c 08 0B 00 LS MS f7
--  local bv=BigInteger(value) local lsb=bv:getBitRangeAsInt(0,7) -- position of lsb local msb=bv:getBitRangeAsInt(7,7) -- position of msb -- local lsb,msb=value,0 if value > 127 then lsb=value-128 msb=1 end -- local lsb=bit.band(value,127) local msb=bit.rshift(value,7)
Ignore panel version 3, use version 4 – panel 3 contains unnecessary code for method April 1, 2020 at 9:44 am #117617
Thanks a lot. I seems very good this Ctrlr.
Let me jump into it!
- You must be logged in to reply to this topic.