PDA

View Full Version : OSC & Quartz Composer



vicco
03-04-2009, 04:39 PM
A student and I are working on a projects that involves Wii IR Motion Tracking, Dance combined with Quartz Composer Visuals. In the past we've used MIDI successfully but were interested in harnessing the great OSC.

I started with this link:

http://www.osculator.net/wiki/UsersManual/OSCForward

First it mentions OSC Forward as Event Type, which I notice in the new version is OSC Routing. Two questions, what exactly does OSCulator output and how do I get Quartz Composer to receive these messages. I've routed to Console Log and find it is message

/wii/1/ir/xys/1 [0:x] so I've added the message "/wii/1/ir/xys/1" to OSC Receiver in QC but don't know include the [0:x] or individual parameters.

I realize this may be more suited for the Quartz Composer forum.

camille
03-04-2009, 09:49 PM
Hi!


First it mentions OSC Forward as Event Type, which I notice in the new version is OSC Routing.

Right, and this is an error, thanks. The manual is being rewritten, and this change will be corrected.


Two questions, what exactly does OSCulator output and how do I get Quartz Composer to receive these messages. I've routed to Console Log and find it is message /wii/1/ir/xys/1 [0:x] so I've added the message "/wii/1/ir/xys/1" to OSC Receiver in QC but don't know include the [0:x] or individual parameters.

I realize this may be more suited for the Quartz Composer forum.

No this is the right place to talk about this.
First, some things you have to know:


OSC support in Quartz Composer is still buggy as of version 3.1 : if messages are sent too quickly, read data is corrupted.
Console Log is a way to log the messages and see what is happening. The format of the logging is not the syntax of OSC: "[0: x] is just there to tell that argument at index 0 (the first argument really) is named 'x'. Thus in your example the OSC message's address is /wii/1/ir/xys/1.


There are two ways to route the content of a message: You either forward a whole message and all it's arguments, or you forward every single arguments. The simplest way is to forward a whole message with all its arguments.

In the Parameters window, you can add "routes" and give them a rewrite address. The rewrite address is a way to change the original message's address to something you have chosen. So I would also recommend you create a custom route, and define a specific address so you know exactly what should be received by Quartz Composer.

If the case you know you are sending messages but you don't know their format, there is an easy and simple solution to get the exact format: Route the message to another OSCulator document. Just press Command-N to create a new document and it will appear in the list of route destinations. Then send you messages, and you will see how they look like because OSCulator automatically discovers the message it receives.

ok, so I said OSC was not recommended for Quartz Composer.

I really recommend to use HID. This is a much simpler protocol to understand, and there is a ready made example in the 'Sample Patches' folder. I invite you to give a look at this example and come back to me if you have troubles using HID. HID is a protocol used for joysticks or more generally controllers, but in fact can be used with OSCulator with good success.

I hope this answers your questions.

Best Regards,
Camille

balam
10-19-2010, 05:11 AM
Hi
how do hou send from Osc to QC
I like to route wii data to quartzcomposer have done lots of reading but cannot figure it out.
any pointing , adivice will be really great

cheers

camille
10-19-2010, 11:30 AM
Hi,

Basically everything in the previous post of explained.
Best way to send data to QC is to use the Virtual HID joystick. In QC, use the HID receiver to get data.

There will be nothing complicated related to OSC to configure, and the stream of data is much more reliable, hence the recommendation.


Best,
Cam

balam
10-19-2010, 01:55 PM
Thanks for the info
I did see your post about hid protocol . Howe ever I do not seem to find the right way to map 3exes (roll, yaw,pitch)
Any good suggestions.

camille
10-19-2010, 02:41 PM
You can use joystick 1-x for pitch, joystick 1-y for roll and joystick 2-x for yaw.
Eventually you might find that using only 2 attitude axes is sufficiently expressive. Yaw is often used for specific purposes.