Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Change Channel for MIDI CC?

  1. #11
    OK, so here is a very simple solution, check the attached files and the full description.
    Feel free to ask for more information.

    The idea is to create a Switch object in Lemur (instead of a Pad) and create an expression that will output 0, 1, 2, etc. depending on the button pressed. Therefore a single OSC message is output from the Lemur, and we directly use that value to tell OSCulator to change the MIDI channel.

    In Lemur, create a switch object, give it the size you need, I chose to make it 4 rows. In Properties, check "Radio" so only a single button is highlighted at one time. Then in the project tree, select your object, and uncheck the value "x", we don't need it. Now create an expression, and name it "w" (that how I named it in the example, a better name would have been "channel" I guess). The value for this expression is "x[0]*0 + x[1]*1 + x[2]*2 + x[3]*3". I have not found a better way to write that. Basically is means that when you press button 0 (this first one), you want the value 0, then button 1 (the second one) will output value 1, and so on.

    Now, when you press your switch button, OSCulator receives the message /Switch/w with a single value which is the MIDI channel we want to use.

    In OSCulator, select this message and assign the "Change Channel" Event Type. In the Value column choose "In all messages of current preset".

    There is one last trick: Lemur sends float values only, therefore OSCulator is not able to automatically use that for MIDI channels (if it was an integer it would have worked automatically). So we need to tell OSCulator what is the extent of the input value for /Switch/w. Press Command-F (or choose View->Flip to Scalings) and change the Input Max value of /Switch/w to "15". This is because the Lemur switch is sending a MIDI channel value and that MIDI channels range from 0 to 15.


    Cam
    Attached Files Attached Files

  2. #12
    Hi Camille! Thanks so much for your quick reply I have found that it's working a little more simply than even that - I created an array of switches, created a script executed on Expression x called "out". It uses firstof() which is a very useful tool in Lemur scripting that outputs the (0-based) number of the pad or switch being pressed. Basically it just goes through the string of zeroes that is the "x" value, and finds the 1 and outputs the position of the 1. Anyways, so that works great, and if I set the event type in OSCulator to Change Channel it works great. The only thing is, I'd like to change the CC value, not the MIDI channel of a single message in OSCulator. Is this possible?
    Thanks so much!
    -Allie

  3. #13
    Damned, I should have read your question in more details.
    (btw, thanks for mentioning 'firstof'!)

    So, when you say the CC value, I don't understand because this is the output of a MIDI CC.
    Do you mean its number actually?
    If this is really the value you are talking about, could you please describe a little more?

  4. #14
    Yes I mean CC Number. I think I said value because the column in OSCulator is called "Value". I want it to output its normal values/fader positions/whatever, but I want to be able to change the CC Number it's sending with. So, basically I'm looking for a Meta Event that's the exact same as the Change Channel option, but it's Change CC Number/Value or whatever you'd want to call it in OSCulator. And along the same lines, it'd be cool to have a Change MIDI Prg Number option too.

  5. #15
    I am a bit reluctant to implement such events (CC number change, Prg number change) because I foresee more problems than the convenience it would bring.

    The solution in your case would be to use the Preset system that allows you to reconfigure OSCulator from the messages it receives.
    So basically, you would use a simple array of Switch button (without the script trick we previously discussed), and use each button to trigger the change to a new preset. Then for each preset you just configure OSCulator with different MIDI CC numbers.

    The inconvenient stuff is that you have to reconfigure the preset changing settings for each presets, but once it is done, well, you don't need to touch it anymore.

    As always, I will keep in mind your suggestion and see if I can fit it in a way that does make sense, but in the meantime I suggest you experiment with Presets.

  6. #16
    Ah, ok, I was afraid of that. Thanks!

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •