[Csnd] OSC=>Csound newb
Date | 2009-05-29 01:38 |
From | miquel parera |
Subject | [Csnd] OSC=>Csound newb |
Hello I try to send Open Sound Control Messages from python to Csound but in the first attempt Csound it's silent. Why? Python code:(works fine) import osc import time import random osc.init() for i in range(19): time.sleep(1) x = random.uniform(0.1, 1.0) y = random.uniform(0.1, 1.0) print x,y osc.sendMsg("/foo", [x,y], "127.0.0.1", 7770) Csound code .orc from manual; sr = 44100 ksmps = 100 nchnls = 2 gihandle OSCinit 7770 instr 1 kf1 init 0 kf2 init 0 nxtmsg: kk OSClisten gihandle, "/foo", "ff", kf1, kf2 if (kk == 0) goto ex printk 0,kf1 printk 0,kf2 kgoto nxtmsg ex: endin I launch two in two consoles and the prompt of csoud it's this but do not print the floats from python: PortAudio real-time audio module for Csound virtual_keyboard real time MIDI plugin for Csound PortMIDI real time MIDI plugin for Csound 0dBFS level = 32768.0 Csound version 5.08 (double samples) Apr 16 2008 libsndfile-1.0.17 orchname: /home/neix/nx/nx_work/nxInstrument015-Work/nx015-03.orc scorename: /tmp/fileWnMIza.sco rtmidi: PortMIDI module enabled rtaudio: PortAudio module enabled ... using blocking interface orch compiler: 18 lines read instr 1 Elapsed time at end of orchestra compile: real: 0.004s, CPU: 0.000s sorting score ... ... done Elapsed time at end of score sort: real: 0.005s, CPU: 0.000s Csound version 5.08 (double samples) Apr 16 2008 0dBFS level = 32768.0 OSC listener #0 started on port 7770 orch now loaded audio buffered in 256 sample-frame blocks writing 1024-byte blks of shorts to test.wav (WAV) SECTION 1: THANKS! |
Date | 2009-05-29 07:58 |
From | victor |
Subject | [Csnd] Re: OSC=>Csound newb |
Not sure about this one, but
should not if(...) goto be if(...) kgoto ?
Victor
|
Date | 2009-05-29 12:39 |
From | miquel parera |
Subject | [Csnd] Re: Re: OSC=>Csound newb |
Thanks, but i tried to equipare the two goto's with kgoto and with goto and don't work.
I googled for another simple example of OSC received data but no results...
2009/5/29, victor <Victor.Lazzarini@nuim.ie>:
|
Date | 2009-05-29 12:44 |
From | Victor.Lazzarini@nuim.ie |
Subject | [Csnd] Re: Re: Re: OSC=>Csound newb |
Attachments | None None |
Date | 2009-05-29 13:03 |
From | francibal |
Subject | [Csnd] Re: OSC=>Csound newb |
Ciao, I've tried your example with kgoto correction and it'works. I'm on windows vista, with Csound 5.10 and SimpleOSC 0.2.5.1 (www.ixi-software.net). Hope useful. ciao, fran -- View this message in context: http://www.nabble.com/OSC%3D%3ECsound-newb-tp23772514p23778726.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2009-05-30 01:06 |
From | miquel parera |
Subject | [Csnd] Re: Re: OSC=>Csound newb |
arrrrg!
I installed 5.10 and ixi's simpleOSC in my old Windows XP after read the last message. But in the prompt of csound5gui or winsound, after the SECTION 1:, nothing!
The actual code, with the victor's correction, it's this? File: receive.orc
sr = 44100 gihandle OSCinit 7770 instr 1 Sorry for my insistence 2009/5/29, francibal <ilterzouomo@fastwebnet.it>:
|
Date | 2009-05-30 09:15 |
From | francibal |
Subject | [Csnd] Re: Re: OSC=>Csound newb |
To me this works (.csd): |