2

I'm using the github.com/hypebeast/go-osc/osc package to send OSC messages to an OSC server. For this I'm using OSCulator so that I can route the data as MIDI to Abelton Live.

The problem I'm having is I can not find any information on message formatting for things like note on, note off, duration etc. I found a guide on the OSCulator website that's a little helpful, but it doesn't go into much detail on messaging: http://s3.amazonaws.com/osculator/doc/OSCulator+2.12+Manual.pdf

For example, the following function works just fine, but I have no idea what the message is really doing:

func note(pitch float32 , velocity float32) {

    // TODO: Pass client into function. Find out it's type.
    client := osc.NewClient("localhost", 8765)     

    noteMsg := osc.NewMessage("/4/toggle2")
    client.Send(noteMsg)

    msg := osc.NewMessage("/4/xy")
    msg.Append(pitch)
    msg.Append(velocity)
    client.Send(msg)
}

I mean, what purpose does the 4 play in this, and what is xy? Also, what other messages are available apart from toggle2? I thought there would be some sort of documentation online that has all the different types of messages available for MIDI type applications.

BugHunterUK
  • 8,346
  • 16
  • 65
  • 121
  • Possible duplicate of [Existing standard(s) for passing MIDI via OSC?](http://stackoverflow.com/questions/28913458/existing-standards-for-passing-midi-via-osc) – CL. Mar 25 '16 at 12:55
  • Is there a specific reason why you are not using OSC in Ableton directly instead of converting it to midi, for example with showsync.info/livegrabber? – Mattijs Mar 27 '16 at 00:36
  • @Mattijs I didn't think it was possible, although I did discover the Connection Kit yesterday which I'm playing around with now. – BugHunterUK Mar 27 '16 at 08:56
  • 1
    @BugHunterUK indeed, the new Connection Kit might even be a better option – Mattijs Mar 27 '16 at 21:20
  • @Mattijs It is! Pretty awesome actually. – BugHunterUK Mar 27 '16 at 21:37

1 Answers1

0

Your question seems to be more related to OSC itself.

OSC works like this:

You send a message to a server. A message is composed by an adress and some values.

In this case, /4/xy is the address. The 4 and the slashes you define what will be. When you receive it on the other side you will know what you want to receive, which means the address you're sending. So you will configure the server or the receiver to do something when it receives a message from a specific adress.

In the same way, you are appending values to the message. The quantity of values you already know, so you just have to do what you want with them when you receive.

Basically, if you decide to have a keyboard sending notes, you would use something like /keyboard/note as adress and send one value at a time, so you would read this value and do something with it.

George
  • 6,886
  • 3
  • 44
  • 56