Hi Dr. B and John, I think that dam should be altered or fixed to operate correctly, as I think it is faulty in its current form, and that this not just an enhancement but a real fix. I don't have the Csound book here with me in Warsaw, but I would imagine that fixing the opcode and having the original in the book won't diminish the pedagogical value of the book version. On the other hand, not fixing dam and introducing a dam2 means it'll live on forever broken, which doesn't seem to make much sense. Regarding the fix, perhaps we could do direct calculation but depending on detection of threshold change, so perhaps adding a previousThreshold and powerVal value to the struct and having code like: if(p->kthreshold != p->previousThreshold) { [calculate value] } Taking a quick look at the code just now I'm a bit lost still, but maybe it'd be just better to calculate every time? steven On 2/19/07, Dr. Richard Boulanger wrote: > If fixing it breaks the chapter in The Csound Book, maybe you could > make a dam2 opcode that *fixes* *improves* it. > > Rick > > On Feb 19, 2007, at 5:46 AM, jpff wrote: > > > I too thought that there was something odd; if the table depends on a > > krate object then it needs to be recalculated whenever it changes. > > So I think i can to the same conclusion as you! I do not really > > understand the algorithm -- would remaking the table lead to > > glitching? If the opcode used with a constant krate object in which > > case a table is cool. If the normal use has a varying krate object > > then direct calculation probably wins. > > The other point of this opcode is that is was written for the Csound > > book as an example of how to write an opcode. In fixing it we may > > damage the book. > > Anyone have suggestions/advice? > > ==John ffitch > > > > ---------------------------------------------------------------------- > > --- > > 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