Would it be because you are sending doubles not floats?
----- Original Message -----
From: miquel parera <computer.music.neix@gmail.com>
Date: Friday, May 29, 2009 12:40 pm
Subject: [Csnd] Re: Re: OSC=>Csound newb
To: csound@lists.bath.ac.uk
>
>
>Not sure about this one, but should not if(...) goto be if(...) kgoto ?
>
>Victor
>
>
>----- Original Message -----
>From: miquel parera
>
>To: csound@lists.bath.ac.uk
>Sent: Friday, May 29, 2009 1:38 AM
>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!
>
>
>