Simple guide to coding for OSC control via serial (from Teensy)?

Status
Not open for further replies.

LeoP

New member
Hi,
I'm working on a large multi-channel audio-visual installation, and would like to make a controler for panning between 24 output channels. I've got 24 photoresistors that I would like to use, and I had set up as a MIDI controler for controling sends in my DAW (Ardour) but now that I was forced to use a matrix plugin to maximize DSP power, I can't map the photoresistors properly, and the good people at Ardour have recomended OSC instead of MIDI.
I's there a good beginers tutorial, or other basic set of principles that I can can find on Teensy and OSC?
I think my project will be relatively generic/basic, and only involve data going in one direction.
I will be using my Teensy 3.5

Any help is much apreciated!
 
I can help with the serial part... I ran into the same problem, but since I couldn't find a solution at the time I wrote a little command line tool to convert the SLIP encoded serial data to UDP.

https://github.com/recursinging/kxmx_trestle

It's written in Java, but check the /dist folder for native static pre-compiled binaries that will run without having to install a JVM (yes Java can do that now).

Here's the output of the --help flag:

Code:
$ dist/linux/bin/kxmx_trestle --help

Usage: <main class> [-h] [-v]... [-d=<serialDevice>] [-i=<udpReceiveHost>]
                    [-r=<udpReceivePort>] [-s=<udpTargetPort>]
                    [-t=<udpTargetHost>]
  -d, --serial-device=<serialDevice>
                  The connected serial device name (Optional)
  -h, --help      Displays this help message and quits.
  -i, --receive-host=<udpReceiveHost>
                  The OSC UDP Receive Host (default: 0.0.0.0)
  -r, --receive-port=<udpReceivePort>
                  The OSC UDP Receive Port (default: 8000)
  -s, --target-port=<udpTargetPort>
                  The OSC UDP Target Port (default: 9000)
  -t, --target-host=<udpTargetHost>
                  The OSC UDP Target Host (default: 0.0.0.0)
  -v, --verbose   Verbose mode. Helpful for troubleshooting. Multiple -v options
                    increase the verbosity.

It will try and automatically detect a Teensy/Arduino serial device at the start unless the -d flag is used. Then it will simply broadcast any SLIP encoded packets as UDP. It's bi-directional, so your Teensy could also receive OSC messages.

If you try it, please let me know if it works for you, nobody besides myself has ever done anything with it, and I'd be interested if it works out of the box.
 
Status
Not open for further replies.
Back
Top