Csound Csound-dev Csound-tekno Search About

[Csnd] Manual example for lfo, question/error

Date2024-09-01 14:17
FromOeyvind Brandtsegg
Subject[Csnd] Manual example for lfo, question/error
Hi,

I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:

kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500

not sure what to do about it but thought I'd let someone know ;-)
Øyvind

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

Date2024-09-01 15:22
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it. 

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg  wrote:
> 
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi, 
> 
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
> 
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
> 
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
> 
> 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

Date2024-09-01 19:15
FromOeyvind Brandtsegg
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error
Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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

Date2024-09-01 19:52
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error
That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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

Date2024-09-01 20:37
FromPartev Sarkissian <0000060b2ef1338e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error

As I recall from books by Julius Smith, that there is 
a difference between fdelay and vdelay. 


-Partev 



On Sunday, September 1, 2024 at 07:53:07 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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

Date2024-09-01 20:50
FromPartev Sarkissian <0000060b2ef1338e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error

While looking this up in the manual, came across a spelling error 
while in the "f" opcodes. 

faustaudio Instantiates and runs a compiled Faust program.
faustdsp Instantiates a Faust program. 

I don't think it's instantaneous, so I'm guessing "initiates". 
Could be confusing, did a double-take myself, thought I'd 
give a heads up on that. 


-Partev 


On Sunday, September 1, 2024 at 08:38:11 PM GMT+1, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



As I recall from books by Julius Smith, that there is 
a difference between fdelay and vdelay. 


-Partev 



On Sunday, September 1, 2024 at 07:53:07 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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
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

Date2024-09-01 20:52
Fromvlz
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error
No, it's instantiate alright. Puts an instance of the program in memory.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 20:50, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



While looking this up in the manual, came across a spelling error 
while in the "f" opcodes. 

faustaudio Instantiates and runs a compiled Faust program.
faustdsp Instantiates a Faust program. 

I don't think it's instantaneous, so I'm guessing "initiates". 
Could be confusing, did a double-take myself, thought I'd 
give a heads up on that. 


-Partev 


On Sunday, September 1, 2024 at 08:38:11 PM GMT+1, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



As I recall from books by Julius Smith, that there is 
a difference between fdelay and vdelay. 


-Partev 



On Sunday, September 1, 2024 at 07:53:07 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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
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

Date2024-09-01 21:00
FromPartev Sarkissian <0000060b2ef1338e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error

Emoji Oh, interesting. Not familiar with that term. Okay then. 
Hmmm,... 
Thanks. Hmmm,... 


-Partev


On Sunday, September 1, 2024 at 08:52:33 PM GMT+1, vlz <viclazzarini@gmail.com> wrote:


No, it's instantiate alright. Puts an instance of the program in memory.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 20:50, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



While looking this up in the manual, came across a spelling error 
while in the "f" opcodes. 

faustaudio Instantiates and runs a compiled Faust program.
faustdsp Instantiates a Faust program. 

I don't think it's instantaneous, so I'm guessing "initiates". 
Could be confusing, did a double-take myself, thought I'd 
give a heads up on that. 


-Partev 


On Sunday, September 1, 2024 at 08:38:11 PM GMT+1, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



As I recall from books by Julius Smith, that there is 
a difference between fdelay and vdelay. 


-Partev 



On Sunday, September 1, 2024 at 07:53:07 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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
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

Date2024-09-01 21:10
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error
It's a very common term in object-oriented programming.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 21:00, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



Emoji Oh, interesting. Not familiar with that term. Okay then. 
Hmmm,... 
Thanks. Hmmm,... 


-Partev


On Sunday, September 1, 2024 at 08:52:33 PM GMT+1, vlz <viclazzarini@gmail.com> wrote:


No, it's instantiate alright. Puts an instance of the program in memory.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 20:50, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



While looking this up in the manual, came across a spelling error 
while in the "f" opcodes. 

faustaudio Instantiates and runs a compiled Faust program.
faustdsp Instantiates a Faust program. 

I don't think it's instantaneous, so I'm guessing "initiates". 
Could be confusing, did a double-take myself, thought I'd 
give a heads up on that. 


-Partev 


On Sunday, September 1, 2024 at 08:38:11 PM GMT+1, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



As I recall from books by Julius Smith, that there is 
a difference between fdelay and vdelay. 


-Partev 



On Sunday, September 1, 2024 at 07:53:07 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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
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

Date2024-09-01 21:16
FromPartev Sarkissian <0000060b2ef1338e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Manual example for lfo, question/error

Aahh,... should've known. Don't do much of that. 
That explains it.

Thanks. 
-Partev 



On Sunday, September 1, 2024 at 09:10:50 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


It's a very common term in object-oriented programming.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 21:00, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



Emoji Oh, interesting. Not familiar with that term. Okay then. 
Hmmm,... 
Thanks. Hmmm,... 


-Partev


On Sunday, September 1, 2024 at 08:52:33 PM GMT+1, vlz <viclazzarini@gmail.com> wrote:


No, it's instantiate alright. Puts an instance of the program in memory.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 20:50, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



While looking this up in the manual, came across a spelling error 
while in the "f" opcodes. 

faustaudio Instantiates and runs a compiled Faust program.
faustdsp Instantiates a Faust program. 

I don't think it's instantaneous, so I'm guessing "initiates". 
Could be confusing, did a double-take myself, thought I'd 
give a heads up on that. 


-Partev 


On Sunday, September 1, 2024 at 08:38:11 PM GMT+1, Partev Sarkissian <0000060b2ef1338e-dmarc-request@listserv.heanet.ie> wrote:



As I recall from books by Julius Smith, that there is 
a difference between fdelay and vdelay. 


-Partev 



On Sunday, September 1, 2024 at 07:53:07 PM GMT+1, Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie> wrote:


That and perhaps saying for vdelay that delaytime is modulo max delay.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 1 Sep 2024, at 19:15, Oeyvind Brandtsegg <obrandts@gmail.com> wrote:


Thanks for the clarification re vdelay, but what I intended to say is that the advanced manual example for lfo should perhaps be changed, so it generates valid delay times(?) 
It says ; By Stefano Cucchi 2020
Maybe if Stefano is here, he would chime in.
all best
Øyvind



søn. 1. sep. 2024 kl. 16:22 skrev Victor Lazzarini <000010b17ddd988e-dmarc-request@listserv.heanet.ie>:
The code in question is:

        buf[indx] = in[nn];
        fv1 = indx - fdel * esr;
        /* Make sure inside the buffer      */
        /*
         * See comment above--same fix applied here.  heh 981101
         */
        while (UNLIKELY(fv1 < FL(0.0)))
          fv1 += (MYFLT)maxd;
        while (UNLIKELY(fv1 >= (MYFLT)maxd))
          fv1 -= (MYFLT)maxd;

and fdel is the delay time input. There is no check to make sure it's non-negative,
so there’s a wraparound. Not the right thing in my book, but I didn’t write it.
As usual, we can’t change it.

I don’t think it is documented. Maybe one for the manual issues.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 1 Sep 2024, at 14:17, Oeyvind Brandtsegg <obrandts@GMAIL.COM> wrote:
>
> *Warning*
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> Hi,
>
> I stumbled upon this while marking student assignments. I wanted to double check the manual for the lfo opcode. So I also checked the example (example 500 Advanced example of the lfo opcode).
> The delay time for vdelay will be modulated in strange ways, as kAmpDELAY1 goes negative:
>
> kAmpDELAY1 lfo, 100, 1.35, 1 kAmpDELAY1 = kAmpDELAY1 + 50 ; DELAY SIGNAL adel1 vdelay asig1, kAmpDELAY1, 500
>
> not sure what to do about it but thought I'd let someone know ;-)
> Øyvind
>
> 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
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
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