No announcement yet.

Change Channel for MIDI CC?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Change Channel for MIDI CC?

    Is there a way to change the MIDI CC of a control?

    For example..lets say there are three things I want to control on a soft synth. Filter Amount,Cutoff,and Res. Each of those has its own MIDI CC like 1,2,and 3.

    What Im looking for is to have one rotary control and three toggle or push buttons. Each button is assigned a MIDI CC 1-3 and when pushed will change the MIDI CC value of the rotary control to that of the corrisponding button.

    Does that make sense? Is this possible?


  • #2 using the Enable event type and toggle buttons I'm able to get halfway there. So as it is right now if i push toggle1 it enables rotary1 - 00. Pushing it again deactivates it. Pushing togle2 enables rotary1 - 01, pushing it again deactivates it. Great.

    Now instead of having to push each toggle off and on I have it set up to where pushing any of the four toggle buttons will turn off the previous, like in the Radio Toggle example in the Osculator Library. This is working fine except that I can't figure out how to get this same action to apply to the enable switches.
    So..pushing toggle1 enables rotary1 - 00, pushing toggle2 enables rotary1 - 01 AND deactivates rotary1 - 00 ..and so on.


    • #3
      Hi Bleach!

      I was beginning my answer when you posted your update

      First of all, for the sake of clarity, I would like to mention that we are talking about TouchOSC.
      TouchOSC lacks a mutually exclusive control so badly. You can try to implement such behavior in OSCulator, but I think it would be tedious. It would be much easier to do this cleanly in Lemur, and use OSCulator for the OSC to MIDI processing, but of course it's not the same price.

      I have tried with the Enable event, but did not found a good way to have it work.
      Then, I have used inspiration from the "Selective Result" example, and it seems to work nicely with the exception that you won't have the same visual feedback. I could spend a bit more time to see if that's possible, let me know.

      Here's how it works:

      - each push button stores a different value in a Variable.
      - the rotary message is received by OSCulator, and is changed using a OSC routing (/var/0) that groups the value of the variable as an integer, and the value of the rotary.
      - when /var/0 is received, we demux the first argument and assign a MIDI CC to each possibility (1, 2 and 3).

      See the attached files for reference, more details are available in the notepad of the example file "Selective Result".

      Attached Files


      • #4
        As you pointed out the "Radio Toggle" example is also a good reference except it changes the channel of another message.
        You would need to make a mix of both examples (Radio Toggle and Selective Result). Let me know if you need me show you an example of this.
        Attached Files


        • #5
          Hey Cam.

          Yes its TouchOSC.

          I thought about using variables which I tried before my first post but couldn't get it to work. Trying your example Ive run into the same problem. Maybe Im missing something. Heres what I get..

          When assigning the push buttons to event type Variable the value choices are from 1-127. I don't have a 0 choice.
          When /var/0 is received it automatically is assigned 0 and 1 and Im unable to Demux.

          Osculator V 2.12.7


          • #6
            I'm sorry, it's it seems there is a bug, the variable 0 is skipped in the list.
            You can use variable 1 instead.
            I will release an update a bit later, in the meantime I'll send you a build that fixes that problem.


            • #7
              Thanks. Ill grab it now and give it a try.


              • #8

                It took me a minute to wrap my head around what needed to happen but I got working! I did use a combination of selective result for MIDI CC switching and radio toggle to as a visual cue.

                I have a bank of 8 rotary controls and 6 toggle switches which effectively gives me 48 MIDI CCs on one page with controls that are big enough to be used easily. With a little color switching and visible tags its exactly what I was looking for.

                Thanks for the help!


                • #9
                  Hello! I'm trying to do the same thing with Lemur. how would this work? I'd like to have an array of pads in Lemur change the CC values in OSCulator for a Multiball's x value.


                  • #10

                    I think the right thing to do would be to create an array of pads that would output the value of the desired MIDI channel (it should be 0 based, that is 0 for channel 1, 15 for channel 16). Then, send the event to OSCulator's Change Channel event. I am currently figuring out how to simply make a Pad with several rows, and get the value of the tapped row in an OSC message... I'll let you know asap when I have a fully working example.



                    • #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.

                      Attached Files


                      • #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!


                        • #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?


                          • #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.


                            • #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.