Reading some of the documentation on writing opcodes in C.
Looking at the rms code in ugens5.h and ugens5.c. Not very far yet.
Question for anyone who knows:
In rmsset I see
if (!*p->istor)
p->prvq =
0.0;
But I don't see anything actually assigning the value of *p->istor to p->prvq. Does this happen someplace else?
Because in the rms function, p->prvq is assigned to q unconditionally, and this is used for computations. The RMS struct (declaration? definition?) in
ugens5.h doesn't initialize prvq either.
I used this orc code:
asig init 20000
krms rms asig, 10, 20000
printk2 krms
and the output climbed to 20000 as it did when I left out iskip, rather than starting there as I expected. I didn't check if the output was exactly the same.
-Chuckk
--
http://www.badmuthahubbard.com