Just thinking out loud here, regarding arrays, I think that would be a post-new-parser thing, yes? At least, a little easier to implement with a formal parser, I think. It would have come in incredibly handy though for the last instrument I worked on! I wonder though, right now local arrays of audio signals are much easier to do now with the new ftgentmp which will remove the generated ftable at dealloc time, together with using tableiw and table. So the functionality of local arrays is there, but the syntactic-sugar is not. Seem like array functionality in the parser could be done by building upon the table opcode family for the read/writes. What would be the syntax for declaring an array, something as simple as: vals[8] for an 8 member array? Hm... also this would end up needing to be an expression rather than an opcode I think, and currently there is no expression code for reading and writing to an array I think. And then to do something like in your example: as[ic] oscil 1000, 100*(ic+1), 1 the out argument would have to accept not only pointers to values but also this kind of expression statement, so that might mean it would have to require a temp variable: atmp oscil 1000, 100*(ic+1), 1 as[ic] = atmp but then that would not work either as = is an opcode. Hmm... okay, so a little more work than I first thought! steven On 8/17/05, Victor Lazzarini wrote: > This reminds me of a question: will it be possible in the future > to have arrays of signals [& ugens], within, say, for loops? > > something like > > amix = 0 > for ic=0, ic < 10, ic++ > as[ic] oscil 1000, 100*(ic+1), 1 > amix = as[ic] + amix > endfor > > which you can currently do with recursion in UDOs, but > not (afaik) in any other way. > > Victor > > At 20:13 16/08/2005, you wrote: > >And just to mention, I think the loop opcodes are very handy! =) > > > >On 8/16/05, Istvan Varga wrote: > > > Victor Lazzarini wrote: > > > > > > > what does loop_l (etc) do? > > > > > > loop_l indx, incr, imax, label > > > > > > is identical to > > > > > > indx = indx + incr > > > if (indx < imax) igoto label > > > > > > loop_l kndx, kncr, kmax, label > > > > > > is the same as > > > > > > kndx = kndx + kncr > > > if (kndx < kmax) kgoto label > > > > > > loop_le, loop_g, and loop_ge are similar, but use <=, >, and >= instead > > > of <, respectively. Also, loop_g and loop_ge decrement the iterator > > variable. > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > > > _______________________________________________ > > > Csound-devel mailing list > > > Csound-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/csound-devel > > > > > > > > >------------------------------------------------------- > >SF.Net email is Sponsored by the Better Software Conference & EXPO > >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > >_______________________________________________ > >Csound-devel mailing list > >Csound-devel@lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/csound-devel > > Victor Lazzarini > Music Technology Laboratory > Music Department > National University of Ireland, Maynooth > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net