Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Csound and reacTIVision

Date2007-12-15 17:03
Fromvictor
Subject[Csnd] Re: Csound and reacTIVision
I also tested it with Python OSC

import OSC
import socket

socks = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
mess = OSC.OSCMessage()
mess.setAddress("/foo/bar")
mess.append(1.0,'f')
mess.append(2.0,'f')
socks.sendto(mess.getBinary(),0,("localhost", 3333))

and csound says...

 i   1 time  1006.72789:     1.00000
 i   1 time  1006.72789:     2.00000

just as expected...

Victor

----- Original Message ----- 
From: "victor" 
To: 
Sent: Saturday, December 15, 2007 4:39 PM
Subject: [Csnd] Re: Re: Re: Re: Re: Csound and reacTIVision


> In fact if you add the instrument
>
> instr 2
>
> OSCsend 0, "localhost",3333, "/foo/bar", "ff",1,2
>
> endin
>
> to your CSD and add a score line instantiating it,
>
> i2 1 0.1
>
> you will have a good test for OSC. Works here...
>
> Victor
> ----- Original Message ----- 
> From: "victor" 
> To: 
> Sent: Saturday, December 15, 2007 3:24 PM
> Subject: [Csnd] Re: Re: Re: Re: Csound and reacTIVision
>
>
>>I just want complement that your csound code is correct. I have used
>> similar code to get messages from Python and PD, both of which
>> worked straight out of the box.
>>
>> You might want to test your setup with some other sender, I
>> suggest PD, because it's very simple.
>>
>> Victor
>>
>> ----- Original Message ----- 
>> From: "Andres Cabrera" 
>> To: 
>> Sent: Saturday, December 15, 2007 2:58 PM
>> Subject: [Csnd] Re: Re: Re: Csound and reacTIVision
>>
>>
>>> Hi Arda,
>>>
>>> I haven't checked the reactivision OSC namespaces, but they probably
>>> don't transmit anything on /foo/bar =). Apart from the namespace route,
>>> you must also know the type of information coming. For example "ff"
>>> means two floats are expected. I haven't checked, but I think csound
>>> shows nothing if the messages does not conform exactly to what is
>>> expected.
>>>
>>> Cheers,
>>> Andrés
>>>
>>> El sáb, 15-12-2007 a las 01:32 +0200, Arda Eden escribió:
>>>> A TUIO simulator creates a message like this:
>>>>
>>>> set obj 0 27 0.425 0.78 3.1415927 0.16233395910432108 
>>>> 0.16233395910432108 0.0 -4.908136E-4 0.0
>>>>
>>>> This happens on localhost(
>>>> 127.0.0.1:3333) port 3333 and i can watch it by using a network 
>>>> analyzer. I'm not sure if the first two string
>>>> parameters "set" and "obj" should be handled but at least i'm expecting 
>>>> to handle first two values "0" and "27". If i succeed i'll be able
>>>>
>>>> to control any instrument parameters. Below there is the data format 
>>>> for the TUIO protocol and an example csd code. I'm working on a linux
>>>> machine.
>>>>
>>>> TUIO protocol data format
>>>> ------------------------------------------------------
>>>>
>>>> s sessionID, temporary object ID, int32
>>>> i classID, fiducial ID number, int32
>>>> x, y, z position, float32, range 0...1
>>>> a, b, c angle, float32, range 0..2PI
>>>> X, Y ,Z movement vector (motion speed & direction), float32
>>>>
>>>> A, B, C rotation vector (rotation speed & direction), float32
>>>> m motion acceleration, float32
>>>> r rotation acceleration, float32
>>>> P free parameter, type defined by OSC packet header
>>>>
>>>> ;OSClisten.csd
>>>> ;---------------------
>>>>
>>>> 
>>>> 
>>>> -+rtaudio=alsa -o dac -B4096
>>>> 
>>>>
>>>> 
>>>>   sr = 44100
>>>>   ksmps = 100
>>>>   nchnls = 1
>>>>
>>>>   gihandle OSCinit 3333
>>>>
>>>>   instr   1
>>>>     kf1 init 0
>>>>     kf2 init 0
>>>> nxtmsg:
>>>>     kk  OSClisten gihandle, "/foo/bar", "ff", kf1, kf2
>>>> if (kk == 0) goto ex
>>>>     printk 0,kf1
>>>>     printk 0,kf2
>>>>     kgoto nxtmsg
>>>> ex:
>>>>   endin
>>>> 
>>>>
>>>> 
>>>> i1 0 3600
>>>> e
>>>> 
>>>> 
>>>>
>>>> By the way, i tried to change the parameter "ff" as "ss", "ii" and the
>>>> "print" statement. But there's no terminal output for "kf1" and "kf2".
>>>> THANKS.
>>>>
>>>>
>>>> Arda EDEN
>>>> Cumhuriyet University
>>>> Faculty of Fine Arts
>>>> Department of Music Technology
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2007-12-16 19:33
From"Arda Eden"
Subject[Csnd] Re: Re: Csound and reacTIVision
AttachmentsNone  None  

Date2007-12-16 22:36
From"Arda Eden"
Subject[Csnd] Re: Re: Csound and reacTIVision
AttachmentsNone  None  

Date2007-12-18 11:15
From"Arda Eden"
Subject[Csnd] Re: Re: Csound and reacTIVision
AttachmentsNone  None  

Date2007-12-18 11:20
From"Arda Eden"
Subject[Csnd] Re: Re: Csound and reacTIVision
AttachmentsNone  None  

Date2007-12-18 11:27
FromDave Phillips
Subject[Csnd] Re: Re: Re: Csound and reacTIVision
Arda Eden wrote:
> My reactivision system is working properly now.
> I've written an article about it. Do you know anywhere that i can 
> publish it ?
Hi Arda,

If your article is readable on-line I'll read it and see if it's usable 
by the Linux Journal. You might also consider submitting it to the 
Computer Music Journal. I'm sure the Csound Journal would publish it as 
well.

What OS have you been working with ?

Btw: I've written a rather lengthy article on Jean-Pierre Lemoine's 
AVSynthesis, it will be published by the Linux Journal (hard-copy) some 
time in the coming year. Which is just to say that they publish articles 
on such topics. :)

Best,

dp


Date2007-12-18 11:49
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Re: Csound and reacTIVision
Hi Dave,

that's great about your article on AVSynthesis, look forward to reading it,

best

Victor

At 11:27 18/12/2007, you wrote:
>Arda Eden wrote:
>>My reactivision system is working properly now.
>>I've written an article about it. Do you know anywhere that i can publish 
>>it ?
>Hi Arda,
>
>If your article is readable on-line I'll read it and see if it's usable by 
>the Linux Journal. You might also consider submitting it to the Computer 
>Music Journal. I'm sure the Csound Journal would publish it as well.
>
>What OS have you been working with ?
>
>Btw: I've written a rather lengthy article on Jean-Pierre Lemoine's 
>AVSynthesis, it will be published by the Linux Journal (hard-copy) some 
>time in the coming year. Which is just to say that they publish articles 
>on such topics. :)
>
>Best,
>
>dp
>
>
>
>Send bugs reports to this list.
>To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
>csound"

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


Date2007-12-18 12:16
FromDave Phillips
Subject[Csnd] Re: Re: Re: Re: Re: Csound and reacTIVision
Victor Lazzarini wrote:
> that's great about your article on AVSynthesis, look forward to 
> reading it,
Thanks, Victor, I hope you'll enjoy it. I'll notify the list when it's 
published. Obviously Csound5 gets attention in this article, but I'll be 
writing an article specifically on Cs5 for LJ later in the coming year. 
I have a contract for four hard-copy articles for them, topics to be my 
choice, and Csound development will be one of my selected topics. I'm 
also planning to interview Paul Davis. I haven't decided on the topic 
for the fourth article. Any suggestions ?

It's also one of my life's ambitions to interview jpff (seriously). I 
think it would make a great submission to the Csound Journal. And it 
would finally lay to rest the rumor that John actually worked with 
Charles Babbage... ;-)

Someone *really* needs to write an article about Csound for the Computer 
Music Journal. Considering Csound's presence in that journal over the 
years, an update on its development is sorely needed. I hereby nominate 
Steven Yi to write such an article (maybe with a little help from his 
friends ?).  :)

Best always,

dp

Date2007-12-18 13:06
From"Arda Eden"
Subject[Csnd] Re: Re: Re: Re: Csound and reacTIVision
AttachmentsNone  None  

Date2007-12-18 14:01
From"Dr. Richard Boulanger"
Subject[Csnd] Re: Re: Re: Csound and reacTIVision
Congratulations Arda.

I think all the Csounders would like to read your paper/tutorial in the next Csound Journal.  (Contact Steven Yi)

Here is a link to my piece wiiSoundQuest.  It uses some interesting OSCsound instruments that might be of use to you in your future work.

http://csounds.com/OSCsoundWiiSoundQuest.zip

All the best,

Dr. B.


On Dec 18, 2007, at 6:15 AM, Arda Eden wrote:

I DID IT ... :)
My reactivision system is working properly now.
I've written an article about it. Do you know anywhere that i can publish it ?

On Dec 17, 2007 12:36 AM, Arda Eden < ardaeden@gmail.com> wrote:
Hi there,
Please ignore my previous message because i found the answer my self. TUIO protocol uses the path "/tuio/2Dobj". I tried it but there is still some problem. I can't read the messages using OSC. Thank you very much. I think i should work on this some more.

By the way, you're doing a great job. I'm teaching csound in my electronic music class at the University. Csound is really one of my great experiences and i'm proud to be here with you my friends. Thank you.



On Dec 16, 2007 9:33 PM, Arda Eden <ardaeden@gmail.com> wrote:
Thank you very much. Now i have some opinions about this OSC stuff. But i think i have to learn more about TUIO protocol (the way that it sends messages). So now my only problem is about the second parameter of OSClisten opcode. I couldn't understand what "/foo/bar" or any similar parameter does here. I read the latest csound manual but it's not enough. Can anyone tell me it's meaning ?


On Dec 15, 2007 7:03 PM, victor <Victor.Lazzarini@nuim.ie> wrote:
I also tested it with Python OSC

import OSC
import socket

socks = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
mess = OSC.OSCMessage()
mess.setAddress("/foo/bar")
mess.append(1.0,'f')
mess.append(2.0,'f')
socks.sendto(mess.getBinary(),0,("localhost", 3333))

and csound says...

 i   1 time  1006.72789:     1.00000
 i   1 time  1006.72789:     2.00000

just as expected...

Victor

----- Original Message -----
From: "victor" <Victor.Lazzarini@nuim.ie>
To: < csound@lists.bath.ac.uk>
Sent: Saturday, December 15, 2007 4:39 PM
Subject: [Csnd] Re: Re: Re: Re: Re: Csound and reacTIVision


> In fact if you add the instrument
>
> instr 2
>
> OSCsend 0, "localhost",3333, "/foo/bar", "ff",1,2
>
> endin
>
> to your CSD and add a score line instantiating it,
>
> i2 1 0.1
>
> you will have a good test for OSC. Works here...
>
> Victor
> ----- Original Message -----
> From: "victor" < Victor.Lazzarini@nuim.ie >
> To: <csound@lists.bath.ac.uk>
> Sent: Saturday, December 15, 2007 3:24 PM
> Subject: [Csnd] Re: Re: Re: Re: Csound and reacTIVision
>
>
>>I just want complement that your csound code is correct. I have used
>> similar code to get messages from Python and PD, both of which
>> worked straight out of the box.
>>
>> You might want to test your setup with some other sender, I
>> suggest PD, because it's very simple.
>>
>> Victor
>>
>> ----- Original Message -----
>> From: "Andres Cabrera" < mantaraya36@gmail.com>
>> To: <csound@lists.bath.ac.uk>
>> Sent: Saturday, December 15, 2007 2:58 PM
>> Subject: [Csnd] Re: Re: Re: Csound and reacTIVision
>>
>>
>>> Hi Arda,
>>>
>>> I haven't checked the reactivision OSC namespaces, but they probably
>>> don't transmit anything on /foo/bar =). Apart from the namespace route,
>>> you must also know the type of information coming. For example "ff"
>>> means two floats are expected. I haven't checked, but I think csound
>>> shows nothing if the messages does not conform exactly to what is
>>> expected.
>>>
>>> Cheers,
>>> Andrés
>>>
>>> El sáb, 15-12-2007 a las 01:32 +0200, Arda Eden escribió:
>>>> A TUIO simulator creates a message like this:
>>>>
>>>> set obj 0 27 0.425 0.78 3.1415927 0.16233395910432108
>>>> 0.16233395910432108 0.0 -4.908136E-4 0.0
>>>>
>>>> This happens on localhost(
>>>> 127.0.0.1:3333) port 3333 and i can watch it by using a network
>>>> analyzer. I'm not sure if the first two string
>>>> parameters "set" and "obj" should be handled but at least i'm expecting
>>>> to handle first two values "0" and "27". If i succeed i'll be able
>>>>
>>>> to control any instrument parameters. Below there is the data format
>>>> for the TUIO protocol and an example csd code. I'm working on a linux
>>>> machine.
>>>>
>>>> TUIO protocol data format
>>>> ------------------------------------------------------
>>>>
>>>> s sessionID, temporary object ID, int32
>>>> i classID, fiducial ID number, int32
>>>> x, y, z position, float32, range 0...1
>>>> a, b, c angle, float32, range 0..2PI
>>>> X, Y ,Z movement vector (motion speed & direction), float32
>>>>
>>>> A, B, C rotation vector (rotation speed & direction), float32
>>>> m motion acceleration, float32
>>>> r rotation acceleration, float32
>>>> P free parameter, type defined by OSC packet header
>>>>
>>>> ;OSClisten.csd
>>>> ;---------------------
>>>>
>>>> <CsoundSynthesizer>
>>>> <CsOptions>
>>>> -+rtaudio=alsa -o dac -B4096
>>>> </CsOptions>
>>>>
>>>> <CsInstruments>
>>>>   sr = 44100
>>>>   ksmps = 100
>>>>   nchnls = 1
>>>>
>>>>   gihandle OSCinit 3333
>>>>
>>>>   instr   1
>>>>     kf1 init 0
>>>>     kf2 init 0
>>>> nxtmsg:
>>>>     kk  OSClisten gihandle, "/foo/bar", "ff", kf1, kf2
>>>> if (kk == 0) goto ex
>>>>     printk 0,kf1
>>>>     printk 0,kf2
>>>>     kgoto nxtmsg
>>>> ex:
>>>>   endin
>>>> </CsInstruments>
>>>>
>>>> <CsScore>
>>>> i1 0 3600
>>>> e
>>>> </CsScore>
>>>> </CsoundSynthesizer>
>>>>
>>>> By the way, i tried to change the parameter "ff" as "ss", "ii" and the
>>>> "print" statement. But there's no terminal output for "kf1" and "kf2".
>>>> THANKS.
>>>>
>>>>
>>>> Arda EDEN
>>>> Cumhuriyet University
>>>> Faculty of Fine Arts
>>>> Department of Music Technology
>>>
>>>
>>>
>>> Send bugs reports to this list.
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



--

Arda EDEN
Cumhuriyet University
Faculty of Fine Arts
Department of Music Technology



--

Arda EDEN
Cumhuriyet University
Faculty of Fine Arts
Department of Music Technology



--
Arda EDEN
Cumhuriyet University
Faculty of Fine Arts
Department of Music Technology


Date2007-12-18 19:12
FromDavid Worrall
Subject[Csnd] Re: Re: Csound and reacTIVision
I agree with this - v5 +new API is +MacCsound are _such_  big  
advances. Without an update in CMJ, many of the oldies (and thus also  
the teachers of the youngies)  just don't know about it.
Only thing I'd recommend is not "Someone"  by "A few of you"

I'm not on top of v5 enough yet to drive this, but I'd be happy to  
act as coordinator/editor.

ciao4now,

David
On 18/12/2007, at 11:16 PM, Dave Phillips wrote:

> ...
> Someone *really* needs to write an article about Csound for the  
> Computer Music Journal. Considering Csound's presence in that  
> journal over the years, an update on its development is sorely  
> needed. I hereby nominate Steven Yi to write such an article (maybe  
> with a little help from his friends ?).  :)
>
> Best always,
>
> dp
>


Date2007-12-19 02:59
From"Steven Yi"
Subject[Csnd] Re: Re: Re: Re: Re: Csound and reacTIVision
AttachmentsNone  

Date2007-12-19 03:04
From"Steven Yi"
Subject[Csnd] Re: Re: Re: Re: Re: Re: Csound and reacTIVision
AttachmentsNone  

Date2007-12-19 16:45
From"Arda Eden"
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Csound and reacTIVision
AttachmentsNone  None  

Date2007-12-19 20:43
From"Steven Yi"
Subject[Csnd] Re: Re: Re: Re: Re: Re: Re: Re: Csound and reacTIVision
AttachmentsNone