[Csnd] GEN11 and the extended guard point
Date | 2020-05-12 16:34 |
From | Guillermo Senna |
Subject | [Csnd] GEN11 and the extended guard point |
Attachments | GEN11_gp.csd |
Hi, I want to use a pulse made with GEN11 as an envelope. If I use a table with a 2^n+1 size I get a notch in the middle of the envelope. Is this the expected behaviour for the closed-form summation formula used inside GEN11? The pulse looks fine with a 2^n size. I'm attaching a file that shows the issue, but please don't run it! Render the code and import the resulting audio with something like Audacity. Cheers. 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 |
Date | 2020-05-12 21:47 |
From | Guillermo Senna |
Subject | Re: [Csnd] GEN11 and the extended guard point |
I think I now what's happening. This conditional (https://github.com/csound/csound/blob/a739e0b3c152aa5a34bd7407cc938c8908005db0/Engine/fgens.c#L865) is not evaluating as true (as I think it should) when phs equals the last index of the table (i.e., the guard point). This is because sin(3.1415926535897931) isn't exactly 0, but 1.2246467991473532e-16. I don't know if it's worth trying to fix this. Cheers. On 12/5/20 12:34, Guillermo Senna wrote: > Hi, > > I want to use a pulse made with GEN11 as an envelope. If I use a table > with a 2^n+1 size I get a notch in the middle of the envelope. Is this > the expected behaviour for the closed-form summation formula used inside > GEN11? The pulse looks fine with a 2^n size. I'm attaching a file that > shows the issue, but please don't run it! Render the code and import the > resulting audio with something like Audacity. > > Cheers. > > 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 |
Date | 2020-05-12 21:52 |
From | john |
Subject | Re: [Csnd] GEN11 and the extended guard point |
Thnks for the analysis. I will look at it to see if tereis a simple fix; t too latetonight. On Tue, 12 May 2020, Guillermo Senna wrote: > I think I now what's happening. This conditional > (https://github.com/csound/csound/blob/a739e0b3c152aa5a34bd7407cc938c8908005db0/Engine/fgens.c#L865) > is not evaluating as true (as I think it should) when phs equals the > last index of the table (i.e., the guard point). This is because > sin(3.1415926535897931) isn't exactly 0, but 1.2246467991473532e-16. > > I don't know if it's worth trying to fix this. > > Cheers. > > On 12/5/20 12:34, Guillermo Senna wrote: >> Hi, >> >> I want to use a pulse made with GEN11 as an envelope. If I use a table >> with a 2^n+1 size I get a notch in the middle of the envelope. Is this >> the expected behaviour for the closed-form summation formula used inside >> GEN11? The pulse looks fine with a 2^n size. I'm attaching a file that >> shows the issue, but please don't run it! Render the code and import the >> resulting audio with something like Audacity. >> >> Cheers. >> >> > > 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 |
Date | 2020-05-13 21:01 |
From | john |
Subject | Re: [Csnd] GEN11 and the extended guard point |
I have committed what I think is a fix. Just hope it does not break anything else On Tue, 12 May 2020, john wrote: > Thnks for the analysis. I will look at it to see if tereis a simple fix; t > too latetonight. > > > > On Tue, 12 May 2020, Guillermo Senna wrote: > >> I think I now what's happening. This conditional >> (https://github.com/csound/csound/blob/a739e0b3c152aa5a34bd7407cc938c8908005db0/Engine/fgens.c#L865) >> is not evaluating as true (as I think it should) when phs equals the >> last index of the table (i.e., the guard point). This is because >> sin(3.1415926535897931) isn't exactly 0, but 1.2246467991473532e-16. >> >> I don't know if it's worth trying to fix this. 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 |
Date | 2020-05-13 22:40 |
From | Guillermo Senna |
Subject | Re: [Csnd] GEN11 and the extended guard point |
Thanks! Cheers. On 13/5/20 17:01, john wrote: > I have committed what I think is a fix. Just hope it does not break > anything else > > > On Tue, 12 May 2020, john wrote: > >> Thnks for the analysis. I will look at it to see if tereis a simple >> fix; t too latetonight. >> >> >> >> On Tue, 12 May 2020, Guillermo Senna wrote: >> >>> I think I now what's happening. This conditional >>> (https://github.com/csound/csound/blob/a739e0b3c152aa5a34bd7407cc938c8908005db0/Engine/fgens.c#L865) >>> >>> is not evaluating as true (as I think it should) when phs equals the >>> last index of the table (i.e., the guard point). This is because >>> sin(3.1415926535897931) isn't exactly 0, but 1.2246467991473532e-16. >>> >>> I don't know if it's worth trying to fix this. > > 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 |