[Csnd] OSCListen not... listening?
Date | 2008-11-30 04:19 |
From | Edward Loveall |
Subject | [Csnd] OSCListen not... listening? |
Hi all. I've been fooling around trying to get processing and OSC to talk to each other for while now and am running into 2 problems. 1. I am able to get OSC data in and scene correctly. However, in the manual entry for OSCListen it states "kans -- set to 1 if a new message was received, or zero if not." I can't get a 1 out of that thing even when csound is reacting to OSC messages otherwise. 2. I'm trying to trigger an instr when said osc messages are in. Maybe my problems are above, but maybe someone knows a better way. Here's my instrument: <CsoundSynthesizer> <CsOptions> -odac -d </CsOptions> <CsInstruments> sr = 48000 ksmps = 100 nchnls = 2 gihandle OSCinit 8000 instr 1 ki1 init 0 kk OSClisten gihandle, "/note", "i", ki1 if (kk == 1) igoto gogo gogo: turnon 3 printk 0.1, ki1 endin instr 3 ki1 init 0 ki2 init 0 kk OSClisten gihandle, "/note", "i", ki1 kenv expseg ampdb(80), 4, 0.0001 aosc oscili kenv-0.0001, cpsmidinn(ki1+60), 1 outs aosc,aosc endin </CsInstruments> <CsScore> f1 0 8192 10 1 i1 0 100 e </CsScore> </CsoundSynthesizer> |