Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy OSC to pure data any luck?

  1. #1

    Teensy OSC to pure data any luck?

    So, i've been making midi controllers for a while now with teensy chips. They work great! But i would like to make the switch over to OSC.

    I've just spent my entire day attempting to figure how Open Sound Control works, and trying to get ANY working test or example files up and running using this OSC library https://github.com/CNMAT/OSC, a teensy 3.1 over usb, and the mr. peach library in pure data running on windows 7
    No Dice.
    The problem is, I'm not able to fully understand the examples given for sending OSC in the teensy library, nor am I able to fully understand the examples given in the mr. peach pure data library, so I'm unable to see where my problem lies, nor am I able to perform any meaningful debugging. For a person who learns by doing, trial-and-error, this is a serious brickwall for me.

    if you could answer any or all of these questions at all, it would be a great help!

    How do you send an OSC message over usb?
    Do I need to use UDP or serial or both?
    In the teensy code, do I need to point to an address on my computer?
    In pure data, do I need to point to an address on the teensy?
    Is there any monitor i can use to detect the sending and receiving of OSC messages?

  2. #2
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    i haven't been using OSC in a while and i'm not on windows, but from the CNMAT 'readme' you'd get the impression that the examples provided should just work with teensy 3.x.

    are you sure you have the settings right and match on both the pd and teensy side?

    specifically, the [comport] settings? the example has:

    "devicename /dev/tty.usbmodem12341, baud 9600, pollintervall 1"

    where baudrate is the baudrate, pollinterval the puredata controlrate (in ms); devicename the name of your usb port. i don't know how the devicename looks in windows but "/dev/tty.usbmodem12341" is unlikely to work.

    can you see raw data coming out of [comport] (in o.io.slipserial.pd)? eg. when trying with the "SerialSendMessage.ino" example?

    also the examples seem to come with this line:
    Code:
    #if ARDUINO >= 100
      while(!Serial)
        ; //Leonardo "feature"
    #endif
    off my head, i'm not sure what this does in a teensy 3 context, but nothing might happen until you open the serial monitor.


    as to your questions:

    Quote Originally Posted by A. Williams View Post
    How do you send an OSC message over usb?
    there isn't a UDP implementation yet, so OSC tunnels over usb-serial (the stuff called "SLIP") (afaik). anyway, it's serial.

    Do I need to use UDP or serial or both?
    serial (see above)

    In the teensy code, do I need to point to an address on my computer?
    no, you just need to match the baudrate that's used with [comport].

    In pure data, do I need to point to an address on the teensy?
    no, but you need to point [comport] to your usb port

    Is there any monitor i can use to detect the sending and receiving of OSC messages?
    not that i know, but as mention above, you can check whether you receive any raw data by tapping [comport] (in o.io.slipserial.pd); [comport] is the object that talks to the serial port.

  3. #3
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    When using the CANMAT Oscuino library you can use either SLIP or UDP through an Ethernet connection, with WiFi if you connect a mini router to the Ethernet shield or the WIZ820io. I have so far only used UDP and to remote control devices using TouchOSC so UDP definitely works!
    I use a Teensy 3.x +WIZ820io (with or without a TP-Link TL WR703n or 702n mini router) with the Oscuino library for my "stuff"
    Last edited by Headroom; 01-15-2015 at 11:32 PM.

  4. #4
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by Headroom View Post
    When using the CANMAT Oscuino library you can use either SLIP or UDP through an Ethernet connection, with WiFi if you connect a mini router to the Ethernet shield or the WIZ820io. I have so far only used UDP and to remote control devices using TouchOSC so UDP definitely works!
    oh, just to be clear: i didn't mean to question that UDP works, it's just that he asked "How do you send an OSC message over usb? ", so UDP isn't applicable; at least not for the time being.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •