Announcement

Collapse
No announcement yet.

OSC message not being picked up in Ableton. Is my message correct?

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

  • OSC message not being picked up in Ableton. Is my message correct?

    I've developed a script that sends the following OSC message to the OSCulator server: /midi/note/1 with the paramaters: pitch, velocity and trigger.

    Here's a screenshot:

    osc.png

    The problem is the MIDI notes are not being sent to Ableton. It's very odd as it appears I'm doing everything correctly. OSCulator works fine, and I have other programs using it within Ableton.

    Is the message correct?

  • #2
    Hi,

    The screenshot shows that OSCulator receives a message named /midi/note/1, and it is registered in the main window. However, you did not tell OSCulator what to do with this message. In fact this message is used internally when OSCulator receives MIDI data so that you can do other things with it, like for example send OSC messages.

    What you want to do is the contrary: from OSC any message, you want to send MIDI. There are two ways of doing this:

    The first is to use the "MIDI Note with Params" event. So first you send one or several OSC message that set the parameters of your MIDI note using "Note Params" events; and then you can trigger the note using "MIDI Note with Params". You can do that by simply sending a message with three arguments (pitch, velocity and trigger) and attach two Note Param events so the pitch and velocity are set, and the third argument gets the MIDI Note with Params event to actually trigger the note.

    The other solution is to send an OSC message with an argument that is of MIDI type (this is described in the OSC spec). OSCulator will recognize that this can be directly sent to a MIDI output using a "Send to MIDI" event. This is a very generic and easy solution if you have control over your OSC sending program.

    Let me know if you need more details, otherwise you have more information at page 34 in the manual.


    Best,
    Cam

    Comment


    • #3
      Originally posted by camille View Post
      Hi,

      The screenshot shows that OSCulator receives a message named /midi/note/1, and it is registered in the main window. However, you did not tell OSCulator what to do with this message. In fact this message is used internally when OSCulator receives MIDI data so that you can do other things with it, like for example send OSC messages.

      What you want to do is the contrary: from OSC any message, you want to send MIDI. There are two ways of doing this:

      The first is to use the "MIDI Note with Params" event. So first you send one or several OSC message that set the parameters of your MIDI note using "Note Params" events; and then you can trigger the note using "MIDI Note with Params". You can do that by simply sending a message with three arguments (pitch, velocity and trigger) and attach two Note Param events so the pitch and velocity are set, and the third argument gets the MIDI Note with Params event to actually trigger the note.

      The other solution is to send an OSC message with an argument that is of MIDI type (this is described in the OSC spec). OSCulator will recognize that this can be directly sent to a MIDI output using a "Send to MIDI" event. This is a very generic and easy solution if you have control over your OSC sending program.

      Let me know if you need more details, otherwise you have more information at page 34 in the manual.


      Best,
      Cam
      Hey Cam, thanks for the reply.

      The second solution sounds like a better one for me as I'm developing the software that can send out OSC messages. The problem is I can't find any documentation on sending OSC messages that are of MIDI type. Do you have any links to such documentation? I thought that /midi/note/1 did this if I sent pitch, velocity and trigger along with the params.

      Cheers

      J

      Comment


      • #4
        Hi James!

        /midi/note/1 is a message internally synthesized by OSCulator when receiving MIDI input. OSCulator does not do anything when it receives such message from an OSC input because there is no reason to do so.

        Both solutions I described can be used with a OSC sending software. The second one is more direct but highly tied to the definition of MIDI and will likely to be incompatible with a generic-purpose OSC receiving software.

        You should refer to the documentation of the OSC library you use to send OSC messages, or let me know what you are using — I could probably help you. As I said, MIDI type arguments are defined in the OSC spec which you can consult here http://opensoundcontrol.org/spec-1_0


        Best,
        Cam

        Comment


        • #5
          Originally posted by camille View Post
          Hi James!

          /midi/note/1 is a message internally synthesized by OSCulator when receiving MIDI input. OSCulator does not do anything when it receives such message from an OSC input because there is no reason to do so.

          Both solutions I described can be used with a OSC sending software. The second one is more direct but highly tied to the definition of MIDI and will likely to be incompatible with a generic-purpose OSC receiving software.

          You should refer to the documentation of the OSC library you use to send OSC messages, or let me know what you are using — I could probably help you. As I said, MIDI type arguments are defined in the OSC spec which you can consult here http://opensoundcontrol.org/spec-1_0


          Best,
          Cam
          Cam,

          I am using GoOSC: https://github.com/hypebeast/go-osc

          Below is some code I am trying to get working. It's very simple but right now I am working on getting at least one note sent:

          Code:
          package main
          
          import (
              "github.com/hypebeast/go-osc/osc"
              "time"
          )
          
          func note(client *osc.Client, pitch int32 , velocity float32) {
              
              // Create new OSC bundle
              bundle := osc.NewBundle(time.Now())
          
              // This may not be needed, sent incase it triggers note on
              bundle.Append(osc.NewMessage("/midi/note/1"))
          
              // Send note paramters
              msg1 := osc.NewMessage("/midi/note/1")
              msg1.Append(pitch)
              msg1.Append(velocity)
              msg1.Append(int32(1))
              bundle.Append(msg1)
          
              client.Send(bundle)
          }
          
          func main() {
              client := osc.NewClient("127.0.0.1", 8765)
              note(client, int32(25), float32(0.42))
          }
          Last edited by zonedout; 03-28-2016, 02:46 PM.

          Comment

          Working...
          X