[Csnd] Array question

Hello, everyone

This might be a somewhat beginner question, but I am stuck as I am trying to figure Csound out. I am attaching the .csd file of what I have as of now. The exercise assigned was as follows:

; Delta =3;
; Count = 0;
; Count2 = 0;
; X = 0.3;
; Array[] init 10;

// Loop and increase delta by Count2 / numberOfIterations
// Within that loop call a second loop that fills an Array with:
// X = Delta * X * (1.0 - X);
// Then set X equal to the new value;
// Delta >= 3 && Delta <=4

So, as far as I understand, is to create an array with 10 numbers, move Delta by an increment, another array and so on.

Could someone shed some light on this, please?

Thank you.

Best,
Gabriel

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

Iterative.csd (465 Bytes)

I’m not an expert, but I think your array only has one element (and that element is initialized to be the number 10). See the documentation here: https://flossmanual.csound.com/csound-language/arrays

Bryan

The init overload for Arrays behaves differently,

kArr[] init size

so it is indeed a 10-element array, initialised to 10.

Whoops! I completely misread the manual. Apologies for spreading confusion.

Bryan