Csound Csound-dev Csound-tekno Search About

TBVCF changes with sample-rate

Date2015-12-29 12:13
FromPeter Burgess
SubjectTBVCF changes with sample-rate
AttachmentsTESTSYNTHCSD.csd  
The TBVCF opcode has different results depending on the sample rate. I wrote my instrument in 44100, and now want to step up my sample-rate up.

Attached is an example in 44100, with 3 other sample rates commented out. Any ideas why this happens?

Pete
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

Date2015-12-29 12:42
Fromjpff
SubjectRe: TBVCF changes with sample-rate
I do not know this code but I see...
      q1   = res/(1.0 + sqrt(dist));
       fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
       q    = q1*fco1*fco1*0.0005;
       fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
soo tere is some sample rate dependency.  Somene needs to read the code 
carefully!

On Tue, 29 Dec 2015, Peter Burgess wrote:

> The TBVCF opcode has different results depending on the sample rate. I wrote
> my instrument in 44100, and now want to step up my sample-rate up.
> 
> Attached is an example in 44100, with 3 other sample rates commented out. Any
> ideas why this happens?
> 
> Pete
> 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

Date2015-12-29 12:54
FromPeter Burgess
SubjectRe: TBVCF changes with sample-rate
Ok, that’s interesting. I reckon the 44100 could probably be altered to acknowledge the current sample rate. I'll have a go at that later. If it works out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
I do not know this code but I see...
     q1   = res/(1.0 + sqrt(dist));
      fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
      q    = q1*fco1*fco1*0.0005;
      fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
soo tere is some sample rate dependency.  Somene needs to read the code carefully!


On Tue, 29 Dec 2015, Peter Burgess wrote:

The TBVCF opcode has different results depending on the sample rate. I wrote
my instrument in 44100, and now want to step up my sample-rate up.

Attached is an example in 44100, with 3 other sample rates commented out. Any
ideas why this happens?

Pete
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

Date2015-12-29 14:23
Fromjpff
SubjectRe: TBVCF changes with sample-rate
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of 
interest.  This is Hans Mikelson's code so he may know more
==John ff

On Tue, 29 Dec 2015, Peter Burgess wrote:

> Ok, that’s interesting. I reckon the 44100 could probably be altered to
> acknowledge the current sample rate. I'll have a go at that later. If it works
> out, I'll post it.
> 
> Cheers for the help!
> 
> Pete
> 
> On Tue, Dec 29, 2015 at 12:42 PM, jpff  wrote:
>       I do not know this code but I see...
>            q1   = res/(1.0 + sqrt(dist));
>             fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
>             q    = q1*fco1*fco1*0.0005;
>             fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
>       soo tere is some sample rate dependency.  Somene needs to read the
>       code carefully!
>
>       On Tue, 29 Dec 2015, Peter Burgess wrote:
>
>       The TBVCF opcode has different results depending on the
>       sample rate. I wrote
>       my instrument in 44100, and now want to step up my
>       sample-rate up.
>
>       Attached is an example in 44100, with 3 other sample rates
>       commented out. Any
>       ideas why this happens?
>
>       Pete

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

Date2015-12-29 14:28
FromPeter Burgess
SubjectRe: TBVCF changes with sample-rate
Wow, that's strange. Doesn't that mean that you're just cancelling out the sampling rate (assuming sr is 44100)?. I haven't looked at the full code yet mind. Is Hans Mikelson on the list?

On Tue, Dec 29, 2015 at 2:23 PM, jpff <jpff@codemist.co.uk> wrote:
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of interest.  This is Hans Mikelson's code so he may know more
==John ff


On Tue, 29 Dec 2015, Peter Burgess wrote:

Ok, that’s interesting. I reckon the 44100 could probably be altered to
acknowledge the current sample rate. I'll have a go at that later. If it works
out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
      I do not know this code but I see...
           q1   = res/(1.0 + sqrt(dist));
            fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
            q    = q1*fco1*fco1*0.0005;
            fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
      soo tere is some sample rate dependency.  Somene needs to read the
      code carefully!

      On Tue, 29 Dec 2015, Peter Burgess wrote:

      The TBVCF opcode has different results depending on the
      sample rate. I wrote
      my instrument in 44100, and now want to step up my
      sample-rate up.

      Attached is an example in 44100, with 3 other sample rates
      commented out. Any
      ideas why this happens?

      Pete

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

Date2015-12-29 14:48
FromPeter Burgess
SubjectRe: TBVCF changes with sample-rate
On a slightly related matter, can I access onedsr in a csd? and is there also a constant that I can access in a csd for the niquist frequency? that would be handy

On Tue, Dec 29, 2015 at 2:28 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Wow, that's strange. Doesn't that mean that you're just cancelling out the sampling rate (assuming sr is 44100)?. I haven't looked at the full code yet mind. Is Hans Mikelson on the list?

On Tue, Dec 29, 2015 at 2:23 PM, jpff <jpff@codemist.co.uk> wrote:
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of interest.  This is Hans Mikelson's code so he may know more
==John ff


On Tue, 29 Dec 2015, Peter Burgess wrote:

Ok, that’s interesting. I reckon the 44100 could probably be altered to
acknowledge the current sample rate. I'll have a go at that later. If it works
out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
      I do not know this code but I see...
           q1   = res/(1.0 + sqrt(dist));
            fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
            q    = q1*fco1*fco1*0.0005;
            fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
      soo tere is some sample rate dependency.  Somene needs to read the
      code carefully!

      On Tue, 29 Dec 2015, Peter Burgess wrote:

      The TBVCF opcode has different results depending on the
      sample rate. I wrote
      my instrument in 44100, and now want to step up my
      sample-rate up.

      Attached is an example in 44100, with 3 other sample rates
      commented out. Any
      ideas why this happens?

      Pete

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

Date2015-12-29 15:06
FromRory Walsh
SubjectRe: TBVCF changes with sample-rate
sr will give the sample rate, so sr/2 will give you the Nyquist.

On 29 December 2015 at 14:48, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
On a slightly related matter, can I access onedsr in a csd? and is there also a constant that I can access in a csd for the niquist frequency? that would be handy

On Tue, Dec 29, 2015 at 2:28 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Wow, that's strange. Doesn't that mean that you're just cancelling out the sampling rate (assuming sr is 44100)?. I haven't looked at the full code yet mind. Is Hans Mikelson on the list?

On Tue, Dec 29, 2015 at 2:23 PM, jpff <jpff@codemist.co.uk> wrote:
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of interest.  This is Hans Mikelson's code so he may know more
==John ff


On Tue, 29 Dec 2015, Peter Burgess wrote:

Ok, that’s interesting. I reckon the 44100 could probably be altered to
acknowledge the current sample rate. I'll have a go at that later. If it works
out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
      I do not know this code but I see...
           q1   = res/(1.0 + sqrt(dist));
            fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
            q    = q1*fco1*fco1*0.0005;
            fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
      soo tere is some sample rate dependency.  Somene needs to read the
      code carefully!

      On Tue, 29 Dec 2015, Peter Burgess wrote:

      The TBVCF opcode has different results depending on the
      sample rate. I wrote
      my instrument in 44100, and now want to step up my
      sample-rate up.

      Attached is an example in 44100, with 3 other sample rates
      commented out. Any
      ideas why this happens?

      Pete

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

Date2015-12-29 15:57
FromPeter Burgess
SubjectRe: TBVCF changes with sample-rate
I know, but I'm wondering if it is already saved as a constant, if it is then there's no point me doing it. It's just occured to me though, that onedsr is probably something Hans Mikelson calculates in the opcode, not something that's automatically stored by csound... so maybe my question is irrelevant. I should look at the code for tbvcf before I waffle on any more

On Tue, Dec 29, 2015 at 3:06 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
sr will give the sample rate, so sr/2 will give you the Nyquist.

On 29 December 2015 at 14:48, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
On a slightly related matter, can I access onedsr in a csd? and is there also a constant that I can access in a csd for the niquist frequency? that would be handy

On Tue, Dec 29, 2015 at 2:28 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Wow, that's strange. Doesn't that mean that you're just cancelling out the sampling rate (assuming sr is 44100)?. I haven't looked at the full code yet mind. Is Hans Mikelson on the list?

On Tue, Dec 29, 2015 at 2:23 PM, jpff <jpff@codemist.co.uk> wrote:
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of interest.  This is Hans Mikelson's code so he may know more
==John ff


On Tue, 29 Dec 2015, Peter Burgess wrote:

Ok, that’s interesting. I reckon the 44100 could probably be altered to
acknowledge the current sample rate. I'll have a go at that later. If it works
out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
      I do not know this code but I see...
           q1   = res/(1.0 + sqrt(dist));
            fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
            q    = q1*fco1*fco1*0.0005;
            fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
      soo tere is some sample rate dependency.  Somene needs to read the
      code carefully!

      On Tue, 29 Dec 2015, Peter Burgess wrote:

      The TBVCF opcode has different results depending on the
      sample rate. I wrote
      my instrument in 44100, and now want to step up my
      sample-rate up.

      Attached is an example in 44100, with 3 other sample rates
      commented out. Any
      ideas why this happens?

      Pete

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

Date2015-12-29 15:59
FromPeter Burgess
SubjectRe: TBVCF changes with sample-rate
Going back to my orriginal subject, I've just noticed that distort1 also changes when I switch up to sr = 96000. I'm guessing there's a similar reason

On Tue, Dec 29, 2015 at 3:57 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
I know, but I'm wondering if it is already saved as a constant, if it is then there's no point me doing it. It's just occured to me though, that onedsr is probably something Hans Mikelson calculates in the opcode, not something that's automatically stored by csound... so maybe my question is irrelevant. I should look at the code for tbvcf before I waffle on any more

On Tue, Dec 29, 2015 at 3:06 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
sr will give the sample rate, so sr/2 will give you the Nyquist.

On 29 December 2015 at 14:48, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
On a slightly related matter, can I access onedsr in a csd? and is there also a constant that I can access in a csd for the niquist frequency? that would be handy

On Tue, Dec 29, 2015 at 2:28 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Wow, that's strange. Doesn't that mean that you're just cancelling out the sampling rate (assuming sr is 44100)?. I haven't looked at the full code yet mind. Is Hans Mikelson on the list?

On Tue, Dec 29, 2015 at 2:23 PM, jpff <jpff@codemist.co.uk> wrote:
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of interest.  This is Hans Mikelson's code so he may know more
==John ff


On Tue, 29 Dec 2015, Peter Burgess wrote:

Ok, that’s interesting. I reckon the 44100 could probably be altered to
acknowledge the current sample rate. I'll have a go at that later. If it works
out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
      I do not know this code but I see...
           q1   = res/(1.0 + sqrt(dist));
            fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
            q    = q1*fco1*fco1*0.0005;
            fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
      soo tere is some sample rate dependency.  Somene needs to read the
      code carefully!

      On Tue, 29 Dec 2015, Peter Burgess wrote:

      The TBVCF opcode has different results depending on the
      sample rate. I wrote
      my instrument in 44100, and now want to step up my
      sample-rate up.

      Attached is an example in 44100, with 3 other sample rates
      commented out. Any
      ideas why this happens?

      Pete

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

Date2015-12-29 16:08
FromPeter Burgess
SubjectRe: TBVCF changes with sample-rate
sorry, it might not be distort1, think it's actually moogvcf2. Guess that might make sense, i'll look into it...

On Tue, Dec 29, 2015 at 3:59 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Going back to my orriginal subject, I've just noticed that distort1 also changes when I switch up to sr = 96000. I'm guessing there's a similar reason

On Tue, Dec 29, 2015 at 3:57 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
I know, but I'm wondering if it is already saved as a constant, if it is then there's no point me doing it. It's just occured to me though, that onedsr is probably something Hans Mikelson calculates in the opcode, not something that's automatically stored by csound... so maybe my question is irrelevant. I should look at the code for tbvcf before I waffle on any more

On Tue, Dec 29, 2015 at 3:06 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
sr will give the sample rate, so sr/2 will give you the Nyquist.

On 29 December 2015 at 14:48, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
On a slightly related matter, can I access onedsr in a csd? and is there also a constant that I can access in a csd for the niquist frequency? that would be handy

On Tue, Dec 29, 2015 at 2:28 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Wow, that's strange. Doesn't that mean that you're just cancelling out the sampling rate (assuming sr is 44100)?. I haven't looked at the full code yet mind. Is Hans Mikelson on the list?

On Tue, Dec 29, 2015 at 2:23 PM, jpff <jpff@codemist.co.uk> wrote:
Nore the csound->onedsr is 1/sr so this suggests fco1/8.0 might be of interest.  This is Hans Mikelson's code so he may know more
==John ff


On Tue, 29 Dec 2015, Peter Burgess wrote:

Ok, that’s interesting. I reckon the 44100 could probably be altered to
acknowledge the current sample rate. I'll have a go at that later. If it works
out, I'll post it.

Cheers for the help!

Pete

On Tue, Dec 29, 2015 at 12:42 PM, jpff <jpff@codemist.co.uk> wrote:
      I do not know this code but I see...
           q1   = res/(1.0 + sqrt(dist));
            fco1 = pow(fco*260.0/(1.0+q1*0.5),0.58);
            q    = q1*fco1*fco1*0.0005;
            fc   = fco1*(double)csound->onedsr*(44100.0/8.0);
      soo tere is some sample rate dependency.  Somene needs to read the
      code carefully!

      On Tue, 29 Dec 2015, Peter Burgess wrote:

      The TBVCF opcode has different results depending on the
      sample rate. I wrote
      my instrument in 44100, and now want to step up my
      sample-rate up.

      Attached is an example in 44100, with 3 other sample rates
      commented out. Any
      ideas why this happens?

      Pete

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