Csound Csound-dev Csound-tekno Search About

[Csnd] Re: RMS C code question

Date2007-11-11 12:27
FromVictor Lazzarini
Subject[Csnd] Re: RMS C code question
instruments take up existing allocated memory, if
there is any. So if you don't reset the dataspace,
previous values will still be there.

>
> 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
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with
> body "unsubscribe csound"

Date2007-11-11 15:02
From"Chuckk Hubbard"
Subject[Csnd] Re: Re: RMS C code question
AttachmentsNone