Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Parser Update

Date2006-09-24 11:21
FromVictor Lazzarini
SubjectRe: [Cs-dev] Parser Update
I understand. It might be worthwhile looking at
the problem, whenever there is time. I was thinking
that the mechanism for recursive opcodes could be
adapted for opcode arrays.

In fact, recursive opcodes are great for doing the
bank of opcodes thing, resulting in very compact
code. I love it. However, it is not easiest of the
codes to read and understand. I am also not so sure
about performance penalties.

Dynamic allocation of opcodes and instruments is
also something very desirable, is it not?

Victor

>
> Hi Victor,
>
> Arrays of opcodes seem tricky as the opcodes need to be
> allocated at run-time versus being compiled down as the
> array intiailization is a variable.  I don't think there
> is currently any dynamic opcode allocation within the
> engine, so that would have be added there, as well as in
> the language.
>
> Though, it is possible to do variable amount of opcodes
> already using recursive UDO's, though the mechanism for
> that is different that allocating opcodes at runtime.
>
> steven
>
>
> On 9/22/06, 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
> >
> > for ki=0, ki < 10, ki = ki + 1
> > a1[ki] oscil 10000, kfun*ki, 1
> > endfor
> >
> > Of course this is just an example, perhaps we will
> > need to call a-, k-, i-variable arrays something else
> > (va, vk, vi ?).
> >
> > This would also mean that 10 separate oscillators would
> > be created, and the outputs are stored in a1[0]-a1[9].
> >
> > Now this is not only syntatic sugar, but a major
> > addition to the language. Not sure how it would
> > implemented, but it would be very nice.
> >
> > > Hi All,
> > >
> > > Just another update with the new parser.  I've now
> > > gotten to the point of getting labels and goto's
> > > working.  From here on my list I have:
> > >
> > > -if-goto
> > > -if-then-elseif-else
> > > -UDO's
> > > -functions
> > > -polymorphic opcodes (need to check if this isn't
> > > done) -macros
> > > -memory clean up
> > > -cleaning up grammar
> > > -error reporting
> > > -general cleaning up of files
> > >
> > > I am mostly going in the above order and am continuing
> > > to work by creating a test first then working to make
> > > the test work.
> > >
> > > Also, I thought CsoundAV had some sort of while loop
> > > construct using:
> > >
> > > while (bool expression)
> > >   .. opcode statements ..
> > > wend
> > >
> > > but I could not find anything like this in the
> > > documentation (maybe it was just a suggested idea on
> > > the mailing list a long time ago).  The question I'm
> > > wondering is should while loops and for loops be added
> > > to Csound? It's all syntactic sugar, but it's
> > > convenient.  (For-loops would need a different
> > > delimiter though between statements as semicolons are
> > comments). >
> > > steven
> > >
> > >
> > >
> ----------------------------------------------------------
> > > --------------- 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
> >
> 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
> 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

Date2006-09-24 14:54
From"Steven Yi"
SubjectRe: [Cs-dev] Parser Update
AttachmentsNone