Csound Csound-dev Csound-tekno Search About

[Csnd] What are tpidsr, pidsr, mpidsr, and mtpdsr?

Date2017-09-08 20:29
FromEmmett Palaima
Subject[Csnd] What are tpidsr, pidsr, mpidsr, and mtpdsr?
Hi, I was studying the code for resonr in order to get a better idea of how bandpass filters are designed, and ran into a couple coefficient defined in the csound header whose precise definition I could not find. 

Those are tpidsr, pidsr, mpidsr, and mtpdsr found on line 1493 of csoundCore.h

My guess is that these are some sort of value divided by the sample rate (perhaps variations on pi / sr), but I'd like to get a precise definition if possible. 

Can anyone tell me exactly what values these coefficients hold?

Thanks!
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-09-08 20:34
FromSteven Yi
SubjectRe: [Csnd] What are tpidsr, pidsr, mpidsr, and mtpdsr?
These values get set in Engine/csound_orc_compile.c:686:

    csound->tpidsr = TWOPI_F / csound->esr;               /* now set
internal  */
    csound->mtpdsr = -(csound->tpidsr);                   /*    consts
        */
    csound->pidsr = PI_F / csound->esr;
    csound->mpidsr = -(csound->pidsr);
    csound->onedksmps = FL(1.0) / (MYFLT) csound->ksmps;
    csound->sicvt = FMAXLEN / csound->esr;
    csound->kicvt = FMAXLEN / csound->ekr;
    csound->onedsr = FL(1.0) / csound->esr;
    csound->onedkr = FL(1.0) / csound->ekr;
    csound->global_kcounter  = csound->kcounter;

and they're pretty much as you suspected:

tpidsr = two pi divided by sr
mtpdsr = minute two pi divided by sr

etc.



On Fri, Sep 8, 2017 at 3:29 PM, Emmett Palaima  wrote:
> Hi, I was studying the code for resonr in order to get a better idea of how
> bandpass filters are designed, and ran into a couple coefficient defined in
> the csound header whose precise definition I could not find.
>
> Those are tpidsr, pidsr, mpidsr, and mtpdsr found on line 1493 of
> csoundCore.h
>
> My guess is that these are some sort of value divided by the sample rate
> (perhaps variations on pi / sr), but I'd like to get a precise definition if
> possible.
>
> Can anyone tell me exactly what values these coefficients hold?
>
> Thanks!
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-09-08 20:36
FromJohn ff
SubjectRe: [Csnd] What are tpidsr, pidsr, mpidsr, and mtpdsr?
tpidsr is TwoPiDividedbySr.

Others follow the same pattern
⁣Sent from TypeApp ​

On Sep 8, 2017, 20:30, at 20:30, Emmett Palaima  wrote:
>Hi, I was studying the code for resonr in order to get a better idea of
>how
>bandpass filters are designed, and ran into a couple coefficient
>defined in
>the csound header whose precise definition I could not find.
>
>Those are tpidsr, pidsr, mpidsr, and mtpdsr found on line 1493 of
>csoundCore.h
>
>
>My guess is that these are some sort of value divided by the sample
>rate
>(perhaps variations on pi / sr), but I'd like to get a precise
>definition
>if possible.
>
>Can anyone tell me exactly what values these coefficients hold?
>
>Thanks!
>
>Csound mailing list
>Csound@listserv.heanet.ie
>https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>Send bugs reports to
>        https://github.com/csound/csound/issues
>Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-09-09 01:36
FromEmmett Palaima
SubjectRe: [Csnd] What are tpidsr, pidsr, mpidsr, and mtpdsr?
When you said minute did you mean to say minus? That seems to be what the code is doing. I think minute pi has a meaning in relation to radians however, so I'd just like to make sure. 

On Fri, Sep 8, 2017 at 3:36 PM, John ff <jpff@codemist.co.uk> wrote:
tpidsr is TwoPiDividedbySr.

Others follow the same pattern
⁣Sent from TypeApp ​

On Sep 8, 2017, 20:30, at 20:30, Emmett Palaima <epalaima@BERKLEE.EDU> wrote:
>Hi, I was studying the code for resonr in order to get a better idea of
>how
>bandpass filters are designed, and ran into a couple coefficient
>defined in
>the csound header whose precise definition I could not find.
>
>Those are tpidsr, pidsr, mpidsr, and mtpdsr found on line 1493 of
>csoundCore.h
><https://github.com/csound/csound/blob/495bb9cfd5bc4d19ce02a988fba3764b4141c850/include/csoundCore.h>
>
>My guess is that these are some sort of value divided by the sample
>rate
>(perhaps variations on pi / sr), but I'd like to get a precise
>definition
>if possible.
>
>Can anyone tell me exactly what values these coefficients hold?
>
>Thanks!
>
>Csound mailing list
>Csound@listserv.heanet.ie
>https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>Send bugs reports to
>        https://github.com/csound/csound/issues
>Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-09-09 02:08
FromSteven Yi
SubjectRe: [Csnd] What are tpidsr, pidsr, mpidsr, and mtpdsr?
Yes, that was a typo, and should have been "minus". :)

On Fri, Sep 8, 2017 at 8:36 PM, Emmett Palaima  wrote:
> When you said minute did you mean to say minus? That seems to be what the
> code is doing. I think minute pi has a meaning in relation to radians
> however, so I'd just like to make sure.
>
> On Fri, Sep 8, 2017 at 3:36 PM, John ff  wrote:
>>
>> tpidsr is TwoPiDividedbySr.
>>
>> Others follow the same pattern
>> ⁣Sent from TypeApp
>>
>> On Sep 8, 2017, 20:30, at 20:30, Emmett Palaima 
>> wrote:
>> >Hi, I was studying the code for resonr in order to get a better idea of
>> >how
>> >bandpass filters are designed, and ran into a couple coefficient
>> >defined in
>> >the csound header whose precise definition I could not find.
>> >
>> >Those are tpidsr, pidsr, mpidsr, and mtpdsr found on line 1493 of
>> >csoundCore.h
>>
>> > >
>> >
>> >My guess is that these are some sort of value divided by the sample
>> >rate
>> >(perhaps variations on pi / sr), but I'd like to get a precise
>> >definition
>> >if possible.
>> >
>> >Can anyone tell me exactly what values these coefficients hold?
>> >
>> >Thanks!
>> >
>> >Csound mailing list
>> >Csound@listserv.heanet.ie
>> >https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> >Send bugs reports to
>> >        https://github.com/csound/csound/issues
>> >Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here