how to send valid osc messages to keykit

32 views
Skip to first unread message

Tony Travolta

unread,
Nov 26, 2017, 8:04:42 AM11/26/17
to key...@googlegroups.com
Dear list and master Tim,
 
I tried sending osc messages to keykit and getting some error, any tips what could be the reason for it and what can I test more?
 
I am using this function in osc.k:
 
function ffc_listen() {
    f = open("90...@127.0.0.1","rA","osc_listen")
    if ( f < 0 )
        return()
    while ( (d = get(f)) != Eof ) {
        print("ffc_listen OSC message:",string(d))
    }
}
 
 
Then running it from key.exe by typing:
ffc_listen()
 

Three test strings giving:
!0> ffc_listen()
OSC parser did not find type tag string.ffc_listen OSC message: [0="/hello/test"]
OSC parser did not find type tag string.ffc_listen OSC message: [0="/hello/test hi"]
OSC parser did not find type tag string.ffc_listen OSC message: [0="/hello/test hi\0"]

My final goal is sending 'text string' via osc to keykit then doing various things in keykit depending on this 'text string'. So which format does keykit accept exactly? What am I doing wrong? Thanks in advance. I took the above function from Tim's examples, wondering why it gives this error.

Best regards
Tony
 

Tim Thompson

unread,
Nov 26, 2017, 11:00:26 AM11/26/17
to Tony Travolta, KeyKit

See http://opensoundcontrol.org/spec-1_0 for a description of the format for OSC messages.  Here's the key bit:


OSC Messages

An OSC message consists of an OSC Address Pattern followed by an OSC Type Tag String followed by zero or more OSC Arguments.

Note: some older implementations of OSC may omit the OSC Type Tag string. Until all such implementations are updated, OSC implementations should be robust in the case of a missing OSC Type Tag String.

You'll want to send the type tag string in order to avoid the warning message that KeyKit is printing.  Keykit is robust here, but not silent.  

     ...Tim...
 

--
You received this message because you are subscribed to the Google Groups "KeyKit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keykit+unsubscribe@googlegroups.com.
To post to this group, send email to key...@googlegroups.com.
Visit this group at https://groups.google.com/group/keykit.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages