[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 :wink:
Ø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

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.

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

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

Prof. Victor Lazzarini
Maynooth University
Ireland

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

-Partev

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

Prof. Victor Lazzarini
Maynooth University
Ireland

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](https://csound.com/docs/manual/faustdsp.html) — 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

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

-Partev

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

Prof. Victor Lazzarini
Maynooth University
Ireland

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

Prof. Victor Lazzarini
Maynooth University
Ireland

EmojiOh, interesting. Not familiar with that term. Okay then.
Hmmm,…
Thanks. Hmmm,…

-Partev

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

Prof. Victor Lazzarini
Maynooth University
Ireland

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

Prof. Victor Lazzarini
Maynooth University
Ireland

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

Thanks.
-Partev

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

Prof. Victor Lazzarini
Maynooth University
Ireland