Why are you sending numeric data as strings? I would send them as floats (or doubles). The problem might be with Sprintf, possibly. Try to send one table at a time, too. You might be triggering too many events. ----- Original Message ----- From: Ed Costello Date: Thursday, September 22, 2011 2:17 am Subject: Re: [Csnd] Best way to send Table values over OSC To: csound@lists.bath.ac.uk > After some playing around I came up with something that works but not for very long, the OSC stops sending after a few seconds and if I try to restart QuteCsound it crashes. > > > > > > > sr = 44100 > ksmps = 128 > nchnls = 2 > 0dbfs = 1 > > #define Tables #2# > #define Widgets #3# > > instr Init, 1 > > turnon $Tables > turnon $Widgets > gk_Slider1 init 0 > > > endin > > instr Tables, 2 > > gi_TableSize = 16 > gi_WriteTable ftgen 100, 0, gi_TableSize, 7, 1, gi_TableSize, gi_TableSize > gi_ExponentialTable ftgen 101, 0, gi_TableSize, 5, 1, 0, 0.0001, 0, 1, 16, 0.001 > > endin > > instr Widgets, 3 > > kvalue invalue "slider1" > > if kvalue != gk_Slider1 then > > gk_Slider1 = kvalue > event "i", "TableEdit", 0, 1 > endif > > endin > > instr TableEdit > > kndx = 0 > > loop: > kres table kndx, gi_ExponentialTable > tablew kres * gk_Slider1, kndx, gi_WriteTable > > loop_lt kndx, 1, gi_TableSize, loop > event "i", "OSCSend", 0, 1 > turnoff > > > > > > endin > > > instr OSCSend > > S_Table = "" > indx = 0 > > loop: > ires table indx, gi_WriteTable > Sout sprintf "%f ", ires > S_Table strcat Sout, S_Table > > loop_lt indx, 1, gi_TableSize, loop > > OSCsend 0, "", 4444, "/csound", "s", S_Table > > > endin > > > > i "Init" 0 10000 > > > > I'm using a slider widget and every time it moves it triggers an instrument which reads from a table, scales its values and then writes them to the table I want to send over OSC. This then triggers the OSCSend instrument which concatenates the table numbers to a string and sends them over OSC. Along with the crashing Csound also complains of buffer overflows if my table is too big, I'm using a size of 16 here, but it complains at 32. Any ideas? > > On 22 September 2011 00:50, wrote: > I would have thought a k-rate loop would be better. However, I'm not sure OSC is designed to handle big amounts of data. > > Victor> > > ----- Original Message ----- > From: Ed Costello > Date: Wednesday, September 21, 2011 11:43 pm > Subject: Re: [Csnd] Best way to send Table values over OSC > To: csound@lists.bath.ac.uk > > > Can you print the values of a table to a string? If so yes it should work. > > > > On 21 September 2011 21:41, joachim heintz wrote: > > perhaps it's possible to send the table values as a string? > > > > Am 21.09.2011 19:34, schrieb Ed Costello: > > > Hi, > > > > > > I am using Csound with Quartz Composer, I am linking the programs using > > > OSC. I was just wondering if there is an easier way of sending a large > > > amount of table values in one OSC message. I am aware that you can use > > > the table opcode to read values and assign them variables that are > > > passed to an OSCSend, but is there a better way of doing this with large > > > tables? > > > Thanks > > > Ed > > > > > > Send bugs reports to the Sourceforge bug tracker > > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > > 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, > National University of Ireland, Maynooth > Dr Victor Lazzarini, Senior Lecturer, Dept. of Music, National University of Ireland, Maynooth Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"