Announcement

Collapse
No announcement yet.

MIDI Velocity to OSC Label

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MIDI Velocity to OSC Label

    I'd like to print the velocity of an incoming midi note to a label in TouchOSC but I'm hitting a wall on how to get there. Ideally I think I'd want it to look like this; Message to Osculator: 90 01 7F Message out: /osc/velocity/label 127

  • #2
    Do you want to print the velocity of a specific note or any note on a MIDI channel?

    Comment


    • #3
      Specific note.

      Comment


      • #4
        Here are the steps to do this:

        • First, we need to reveal the velocity from a specific (use C 60 for the purpose of this example). You should have /midi/note/1 for the notes received on channel 1.
          • Select the first argument (pitch) and choose Edit -> Demux.
          • Then play C 60 again you will see that a sub-message is created with the velocity and trigger of the note C 60.

        • Since velocity in OSCulator is between 0.0 and 1.0, we need to scale it.
          • Select the velocity argument of this sub-message and display the scalings Page (choose View->Flip to Scalings Page) and change the Out Max column value from 1.0 to 127.0.

        • The next step is to create the OSC Routing to send the velocity value to TouchOSC.
          • Open the Parameters window and go to the OSC Routing tab.
          • Press the + button to create a new OSC Routing and the pencil button to edit it, the OSC Routing editor window will show up.
          • Type in the address field the OSC address of your label. I used /1/label1, in your question you mentioned /osc/velocity/label.
          • In the arguments field, replace the <all args> token with arg[0] so we can change the type of the first OSC argument to an integer to have the proper formatting.
          • Hover your mouse over the token and click the triangle to show a contextual menu and select "as integer". The token will change its name to i:arg[0].
          • This step is optional. I changed the "Route when" menu to "The value goes from 0 to positive" because the MIDI device I used to generate notes was producing 0 velocity on Note-Off.
          • Close the Parameters window.



        Attached is the file for this configuration, I did not include a TouchOSC layout because it merely requires a single label with OSC address /1/label1.

        Please let me know if you have further questions!
        Cam
        Attached Files

        Comment


        • #5
          Works great thanks. I did have to do the OSC Routing change first before it would let me change the Out Max column.

          Comment


          • #6
            This is correct, but only for versions older than 2.12.7.
            It is actually possible to adjust scalings without having an event assigned.

            Comment

            Working...
            X