[Csnd] Table does not get written via OSC?
Date | 2013-10-12 08:32 |
From | zappfinger |
Subject | [Csnd] Table does not get written via OSC? |
"Drawsynth" is a small project with Processing and Csound. The idea is to read a Csound table (saw, square, etc) via OSC and display it in Processing, then allowing one to draw in this picture and write it back to the table. Somehow the writing of the table does not work, although I see the values coming in. Here's a snippet: if kwrite == 1 then kval init 0 kidx = 0 loop1: kk OSClisten gihandle, "/write", "f", kval if (kk == 0) goto ex2 tablew kval, kidx, giBuffer printk2 kval kgoto loop1 ex2: ; loop_lt kidx, 1, 512, loop1 ;turnoff kwrite = 0 event "i", 3, 0, 2 ; activate playback instrument endif I can't see what is wrong here... Richard -- View this message in context: http://csound.1045644.n5.nabble.com/Table-does-not-get-written-via-OSC-tp5728259.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2013-10-12 09:43 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Table does not get written via OSC? |
Make sure kidx is incrementing as you would expect. It looks like when you loop back to loop1, it is always the same value. Is that what you want? On 12 Oct 2013, at 08:32, zappfinger wrote: > "Drawsynth" is a small project with Processing and Csound. The idea is to > read a Csound table (saw, square, etc) via OSC and display it in Processing, > then allowing one to draw in this picture and write it back to the table. > Somehow the writing of the table does not work, although I see the values > coming in. > Here's a snippet: > > if kwrite == 1 then > kval init 0 > kidx = 0 > loop1: > kk OSClisten gihandle, "/write", "f", kval > if (kk == 0) goto ex2 > tablew kval, kidx, giBuffer > printk2 kval > kgoto loop1 > ex2: > ; > loop_lt kidx, 1, 512, loop1 > ;turnoff > kwrite = 0 > event "i", 3, 0, 2 ; activate playback instrument > endif > > I can't see what is wrong here... > > Richard > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/Table-does-not-get-written-via-OSC-tp5728259.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug trackers > csound6: > https://sourceforge.net/p/csound/tickets/ > csound5: > https://sourceforge.net/p/csound/bugs/ > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > > Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie |
Date | 2013-10-12 10:05 |
From | zappfinger |
Subject | [Csnd] Re: Table does not get written via OSC? |
Yes it seems I'm messing my loops up. I have to make sure that only when a value comes in over OSC it gets written to the table and then the index needs to increment.... Richard -- View this message in context: http://csound.1045644.n5.nabble.com/Table-does-not-get-written-via-OSC-tp5728259p5728261.html Sent from the Csound - General mailing list archive at Nabble.com. |