Home › Forums › General › Programming › simple way to pass the changed value in a midi cc formula
- This topic has 10 replies, 3 voices, and was last updated 3 years, 8 months ago by dnaldoog.
-
AuthorPosts
-
June 27, 2020 at 5:40 am #118917
Hi,
It’s really simple compared to what’s under the hood of my ctrlr panel for the Ensoniq DP4 but I can’t figure what’s wrong.
On my panel I have 4 buttons to bypass FX units.
Those buttons work with midi CCThe dedicated channel is ch7
and the cc number are 75, 76, 77 or 78I set the 2 on/off values like this in the “component button values”:
UnitB Bypass Off = 0
UnitB Bypass On = 127I tried the formula :
CC,Direct,Direct,75,xx,F0 00 F7I set my modulator midi:
type : multi or CC
channel : 7
controler : 75
value : 0but on click it only gives a CC value of 00 (probably because of the fixed midi value of 0 in the modulator midi cc value slider). I wan’t to overide this.
And with a formula, it’s like xx doesn’t work as a modulator value denominator
How can I manage to output the related cc value change (0 or 127)?
thanks a lot
June 27, 2020 at 5:53 am #118918OK
I got it with using the value as MSBit gives :
CC,Direct,xx,75,-1,F0 00 F7
and it works
hope it helps 🙂
June 27, 2020 at 10:33 am #118919it works but it is a bit complicated. CC’s are much easier to setup, see my screenshot. It wouldn’t hurt to study the demo panels either 🙂
Attachments:
You must be logged in to view attached files.June 27, 2020 at 10:51 am #118922Interesting! I’m not so familiar with the multi section of Ctrlr
I don’t think you need the sysex part and you can also just do this with ‘multi’:
CC,Direct,Direct,-1,-1,
but just using CC should work too?
Button values:
off=0
on=127EDIT::I didn’t see Possemo’s post just ahead of mine!
- This reply was modified 3 years, 8 months ago by dnaldoog.
June 27, 2020 at 11:17 am #118924it works but it is a bit complicated. CC’s are much easier to setup, see my screenshot. It wouldn’t hurt to study the demo panels either
It does not work this way.
I started doing that but whatever position the button is on, the value sent is 0 not 0 or 127 as defined in the value field in the Modulator Midi section.June 27, 2020 at 11:20 am #118925Interesting! I’m not so familiar with the multi section of Ctrlr
I don’t think you need the sysexpart and you can also just do this with ‘multi’:
CC,Direct,Direct,-1,-1,
but just using CC should work too?
Button values:
off=0
on=127EDIT::I didn’t see Possemo’s post just ahead of mine!
I’ll try this tomorrow. But I’m pretty sure I’ll need a value denominator like xx somewhere to call the 2 values for the 2 different states. I’ll let you know.
thanks 😉June 27, 2020 at 11:37 am #118926I’ll try with LUA as well with just the 3x hex according to goodweather’s guide:
Control Change messages (CC) belongs to the Channel Voice family of messages. They are made of 3 bytes with n=channel number (0-15), c=controller number (0-127) and v=controller value (0-127) as:
Some controllers may use values 0-16383 instead of 0-127.Status byte 1011nnnn
Data byte 0ccccccc
Data byte 0vvvvvvvThey will then need 2 messages as above where the CC# of the first message will be 1 to 31 while the CC# of the second message will be 33 to 63.
The value will be the combination of the value bytes of the two messages (value byte message 1 = MSB Most Significant Byte; value byte message 2 = LSB Least Significant Byte)
Example1: setting the Amp EG attack time on Midi channel 1 to 43 will require sending B0 1C 2B hex or 10110000 00011100 00101011 (Midi channel 1 has channel number 0)- This reply was modified 3 years, 8 months ago by damien. Reason: typo
June 27, 2020 at 11:59 am #118928Hi Damien,
You shouldn’t need xx or ‘multi’ as long as you assign the value in the Button Values field thus:
off=0
on=127Then use CC option:
If you do it in lua, and you have
off=0
on=1as button values, you can just multiply the incoming value by 127
myFunction=function(mod,value,source) --local channelOut=panel:getProperty("panelMidiOutputChannelDevice") --local statusByte=0xb0+(channelOut-1) -- use this code for dynamic channel changes local midiNum=tonumber(mod:getProperty("modulatorCustomIndex") ) local statusByte=0xB6 -- you are using channel 7 local myMessage= CtrlrMidiMessage({statusByte, midiNum, value*127}) panel:sendMidiMessageNow(myMessage) end
If you want to make this a shared function you would have to work out how to pass in the CC number, maybe using modulatorCustomIndex with a value of 75 etc for each button
?
- This reply was modified 3 years, 8 months ago by dnaldoog. Reason: realised 75 is decimal nit hex
June 27, 2020 at 8:01 pm #118950Hi,
CC,Direct,Direct,-1,-1 works well.
Thanks for your help
- This reply was modified 3 years, 8 months ago by damien. Reason: typo
June 27, 2020 at 10:40 pm #118952Strange – my suggested settings do work on my setup, it sends values 0 and 7f. If I am not mistaken you are on Mac. The Mac version has some addidional quirks compared to the Windows-Ver, maybe this is one of them.
Btw. xx is just for sysex messages, on other messages -1 is the value and -2 ist the controller number.
June 28, 2020 at 10:21 am #118933it works but it is a bit complicated. CC’s are much easier to setup, see my screenshot. It wouldn’t hurt to study the demo panels either
It does not work this way.
I started doing that but whatever position the button is on, the value sent is 0 not 0 or 127 as defined in the value field in the Modulator Midi section.It works for me. What doesn’t seem to register is the channel byte. If I change ‘channel out’ in Ctrlr MIDI settings to 7 then back to 1 then it works. Don’t know if that’s a bug. If it is, you should probably use lua for a fixed channel assignment like this.
See attached panel.
- One button uses an expression
modulatorValue*127
and button values 0/1
The other button uses button values 0/127
Attachments:
You must be logged in to view attached files. -
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.