[PD] OSC help
Urs Liska
pd at ursliska.de
Thu Oct 6 13:18:54 CEST 2005
P.S.
Three more things (might be obvious, but nevertheless):
- You have to connect the [dumpOSC] to a [OSCroute] to do anything
sensible with the received data.
- You can also make very good use of just [OSCroute] even without using
the network functionality. [OSCroute] is basically a string parser. You
can use OSC also as a means of patch organization.
- If you want to send messages through [sendOSC] that you don't manually
type into message boxes (as in the help files) you may run into problems:
If you are constructing OSC messages somewhere in your patch you have to
transform them into the [send( message which didn't work for me right away.
An OSC message is treated as a list with arbitrary number of elements:
The namespace (e.g. /synth/voices/4/noteon) is one element followed by
any number of arguments of arbitrary type (e.g. 69 127 vcf 345 for
notenumber, velocity, any command, any value).
To transform this into [send /synth/voices/4/noteon 69 127 vcf 345( -
which you can send to [sendOSC] you can use the following construction
(Pd 0.39):
|
[list prepend send]
|
[list trim]
|
[sendOSC]
Good luck
Urs
(who has gone through this only a few weeks ago
Urs Liska schrieb:
> Hi Philip,
>
> to get you running, a few hints:
>
> - OSC implementation on Pd isn't complete (if you come from the official
> OSC definition) but working well for what it already does.
>
> - The individual objects can only be loaded when the _library_ [OSC] is
> loaded. This is achieved either by adding it to the -lib startup flag or
> by putting a [OSC] dummy object in a patch.
> If you didn't do either and open one of the help patches it may look
> like it is not working.
>
> What you will do is:
> - Put a [dumpOSC] object in the patch that listens to OSC messages.
> Its only argument is the port number. It won't accept further messages.
> It will give you all received OSC messages at its outlet.
>
> - Put a [sendOSC] object in the patch that sends OSC messages
> (In fact you will probably put a [dumpOSC] at the 'input' side or your
> patch and a [sendOSC] at the 'output').
> First you have to send it a [connect host port( message like [connect
> localhost 9999(
> Then you can send it [send OSCmessage( messages like
> [send /synth/voices/[12]/on 1(
> You can also bundle messages with the [[( and []( messages, but AFAIK a
> Pd OSC server won't recognise the bundling.
>
> - Put many [OSCroute] objects anywhere in your patch.
> This module is just responsible for routing the messages according to
> their namespace.
>
> HTH
> Urs
>
>
> Phillip Stearns schrieb:
>
>> Hello Everyone
>>
>> OK this might seem strange but the help files for OSC
>> don't help. I'm running windows XP (yeah cause that's
>> what I'm stuck with). Can anyone tell me what
>> messages/commands/arguments/etc can be sent to each of
>> the different OSC objects:
>>
>> OSC
>> dumpOSC
>> sendOSC
>> OSCroute
>>
>> Also, is this the complete set of OSC objects? If
>> not, what other objects exist and what do they do? How do you use them?
>>
>> I'm trying to write a patch that talks through an
>> OscGroupClient to a group server. So far I've been
>> able to connect to the server from my command line but
>> within PD, I have no idea how to send to the server. Are there any
>> clear resources on any of this?
>>
>> Thanks In Advance,
>> Phil
>>
>>
>>
>> __________________________________ Yahoo! Mail - PC Magazine Editors'
>> Choice 2005 http://mail.yahoo.com
>>
>> _______________________________________________
>> PD-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>
--
Urs Liska
Glümerstr. 5
D-79102 Freiburg
www.graft-music.com
www.suonomobile.de
[Pd 0.39.0, WinXP]
More information about the Pd-list
mailing list