Skip to content

Commit 23015c5

Browse files
committed
docs for osc_send
1 parent 10e2511 commit 23015c5

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

README.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ mot - MIDI and OSC Tools
77
mot consists of several MIDI and OSC command line tools. These are mainly of interest to debug and check OSC messages and MIDI devices. There are applications to:
88
* `midi_echo`: prints MIDI messages coming from a connected MIDI device.
99
* `osc_echo`: prints OSC messages arriving at a certain UDP port.
10+
* `osc_send`: sends OSC messages from STDIN to a certain host.
1011
* `midi_to_osc`: a MIDI to OSC bridge which sends MIDI messages coming from a connected MIDI device to an OSC target.
1112
* `midi_roundtrip_latency`: measure MIDI round-trip latency.
1213

@@ -69,7 +70,7 @@ mot midi_echo 0
6970

7071
This application prints OSC messages which are received on a certain UDP port. This application is ideal to check if a) a OSC messages are being received and b) the OSC messages received are in the expected place or type.
7172

72-
~~~~~~
73+
~~~~~~bash
7374
mot osc_echo 127.0.0.1:6666
7475
~~~~~~
7576

@@ -79,7 +80,7 @@ This application sends incoming MIDI messages over OSC to an OSC receiver. This
7980

8081
It also allows to create a virtual MIDI port. This can be useful e.g. to send messages from a browser window, over MIDI, to a network. If mot is running, a browser can send messages to a virtual port which is then translated to UDP messages on a network.
8182

82-
~~~~~~
83+
~~~~~~bash
8384
mot midi_to_osc 127.0.0.1:5566 /midi_transport 6666
8485
~~~~~~
8586

@@ -89,10 +90,25 @@ This application receives OSC messages and sends them to a MIDI device. This is
8990

9091
It also allows to create a virtual MIDI port. The following example receives OSC on UDP port 5566 and sends it to a virtual midi port.
9192

92-
~~~~~~
93+
~~~~~~bash
9394
mot osc_to_midi 127.0.0.1:5566 /m 6666
9495
~~~~~~
9596

97+
### OSC send
98+
99+
This application sends OSC messages read from STDIN and sends the message to the specified host and port. This can be used to check if manually constructed OSC messages arrive on a listening server or to check message handlers. See the example below.
100+
101+
There is limited support for typed OSC message arguments and there are a few limitations. Each line that comes in via STDIN is split on whitespace. The first token is interpreted as the OSC method, the other tokens are seen as OSC message arguments. If an argument is an integer or a float the corresponding OSC type is used, otherwise the OSC argument is a string. String arguments with spaces are not supported.
102+
103+
~~~~~~bash
104+
#Listen to incoming osc messages in the background
105+
mot osc_echo 127.0.0.1:6666 &
106+
#Send an OSC message
107+
echo "/test 12 15.2 str_arg\n" | mot osc_send 127.0.0.1:6666
108+
#Response generated by osc_echo:
109+
msg: OscMessage { addr: "/test", args: [Int(12), Float(15.2), String("str_arg")] }
110+
~~~~~~
111+
96112
### MIDI round-trip latency
97113

98114
This application sends out a MIDI message as quickly as possible when a MIDI message is received. It can be used to measure MIDI round-trip latency if it is used together with the Teensy patch in the `misc` directory. If all goes wel a relatively constanc round-trip latency of less than 1m should be no problem. An example on macOS can be seen below:

0 commit comments

Comments
 (0)