Hi Richard, The oparray syntax of SAOL seems strange or I'm misunderstanding it. It seem you create an array of opcodes by using opcodeType[number], but no variable name. If that's right, then it wouldn't be possible to have two arrays of opcodes of the same type in the same instrument, which seems odd. Templates seem like something that can easily be done outside of Csound using any scripting language, but could be implemented I guess in much the same way the preprocessor is done (not yet implemented in new parser). Signal variable arrays could be done similiarly to functions, but might require an extra field in INSTRTXT, so something like: a1[] arrayinit 10 a1[0] = 10 a1[1] = a1[0] + 5 gets translated to: a1[] arrayinit 10 __a1 array_get a1, 0 __a1 = 10 __a2 array_get a1, 1 __a2 = __a1 + 5 with the array_get and array_set being changed to have some kind of uniquely private opcode name. steven On 9/22/06, Richard Dobson wrote: > Re specifically opcode arrays, I think note should be taken of the SAOL > semantics for this (not least as one use for a Csound backend would be > as a fast SAOL interpreter - there is a case for ensuring that the > Csound semantics for arrays facilitates an easy translation to SAOL): > > http://www.cs.berkeley.edu/~lazzaro/sa/book/opcodes/filter/index.html#oparray > > The notation below might be a problem for any opcodes that have multiple > or variable numbers of outputs, or even for any opcodes without any > outputs. SAOL clearly distinguishes between signal-variable arrays, and > opcode arrays, as can be seen in the example in the link above. > > Of course, to support all of SAOL, Csound would need to support > templates too, which is no doubt "another thing altogether". > > Richard Dobson > > Victor Lazzarini wrote: > > I think definitely we should look into adding > > loops, as well as variable/opcode arrays. I am > > thinking on the lines of the following syntax: > > > > a1[] arrayinit 10 > > > .. > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net