simple way to pass the changed value in a midi cc formula

Home Forums General Programming simple way to pass the changed value in a midi cc formula

Tagged: , , , ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #118917
    damien
    Participant
    • Topics: 14
    • Replies: 54
    • Total: 68
    • โ˜…

    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 CC

    The dedicated channel is ch7
    and the cc number are 75, 76, 77 or 78

    I set the 2 on/off values like this in the “component button values”:
    UnitB Bypass Off = 0
    UnitB Bypass On = 127

    I tried the formula :
    CC,Direct,Direct,75,xx,F0 00 F7

    I set my modulator midi:
    type : multi or CC
    channel : 7
    controler : 75
    value : 0

    but 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

    #118918
    damien
    Participant
    • Topics: 14
    • Replies: 54
    • Total: 68
    • โ˜…

    OK
    I got it with using the value as MSB

    it gives :

    CC,Direct,xx,75,-1,F0 00 F7

    and it works

    hope it helps ๐Ÿ™‚

    #118919
    PossemoPossemo
    Participant
    • Topics: 14
    • Replies: 604
    • Total: 618
    • โ˜…โ˜…โ˜…

    it 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.
    #118922
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 371
    • Total: 374
    • โ˜…โ˜…

    Interesting! 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?

    cc multi screengrab

    Button values:
    off=0
    on=127

    EDIT::I didn’t see Possemo’s post just ahead of mine!

    • This reply was modified 1 week, 1 day ago by dnaldoogdnaldoog.
    #118924
    damien
    Participant
    • Topics: 14
    • Replies: 54
    • Total: 68
    • โ˜…

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

    #118925
    damien
    Participant
    • Topics: 14
    • Replies: 54
    • Total: 68
    • โ˜…

    Interesting! 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?

    cc multi screengrab

    Button values:
    off=0
    on=127

    EDIT::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 ๐Ÿ˜‰

    #118926
    damien
    Participant
    • Topics: 14
    • Replies: 54
    • Total: 68
    • โ˜…

    I’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 0vvvvvvv

    They 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 1 week, 1 day ago by damien. Reason: typo
    #118928
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 371
    • Total: 374
    • โ˜…โ˜…

    Hi Damien,

    You shouldn’t need xx or ‘multi’ as long as you assign the value in the Button Values field thus:

    off=0
    on=127

    Then use CC option:


    If you do it in lua, and you have

    off=0
    on=1

    as 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 1 week, 1 day ago by dnaldoogdnaldoog. Reason: realised 75 is decimal nit hex
    #118950
    damien
    Participant
    • Topics: 14
    • Replies: 54
    • Total: 68
    • โ˜…

    Hi,

    CC,Direct,Direct,-1,-1 works well.

    Thanks for your help

    • This reply was modified 1 week, 1 day ago by damien. Reason: typo
    #118952
    PossemoPossemo
    Participant
    • Topics: 14
    • Replies: 604
    • Total: 618
    • โ˜…โ˜…โ˜…

    Strange – 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.

    #118933
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 371
    • Total: 374
    • โ˜…โ˜…

    it 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.
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
There is currently 1 user and 24 guests online
Synthy
Forum Statistics
Threads: 2,393, Posts: 16,738, Members: 59,189
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!