[Csnd] Re: OSCListen not... listening?
| Date | 2008-11-30 07:07 |
| From | mark jamerson |
| Subject | [Csnd] Re: OSCListen not... listening? |
I think your problem may lie in the following line: if (kk == 1) igoto gogo It should be a kgoto. From: Edward Loveall <edward@edwardloveall.com> To: csound@lists.bath.ac.uk Sent: Saturday, November 29, 2008 10:19:37 PM 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> |
| Date | 2008-11-30 17:29 |
| From | Edward Loveall |
| Subject | [Csnd] Re: Re: OSCListen not... listening? |
| Thank you Mark for that observation. I thought that would at least fix the fact that a sound happened when I loaded up the CSD. I didn't and it's still not triggering kk. Maybe I'm using turnon wrong. Thank you though Mark, it was a silly error that I missed. -Edward On Nov 30, 2008, at 2:07 AM, mark jamerson wrote:
|