Csound Csound-dev Csound-tekno Search About

[Csnd] Array question

Date2024-08-30 17:49
FromGabriel Borin
Subject[Csnd] Array question
AttachmentsIterative.csd  
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

Date2024-08-30 21:01
FromBryan Tysinger
SubjectRe: [Csnd] Array question
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

On Fri, Aug 30, 2024 at 9:59 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
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
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-08-30 21:24
Fromvlz
SubjectRe: [Csnd] Array question
The init overload for Arrays behaves differently,

kArr[] init size

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

On 30 Aug 2024, at 21:01, Bryan Tysinger <bryantysinger@gmail.com> wrote:


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

On Fri, Aug 30, 2024 at 9:59 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
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
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-08-30 21:39
FromBryan Tysinger
SubjectRe: [Csnd] Array question
Whoops!  I completely misread the manual.  Apologies for spreading confusion.

Bryan

On Fri, Aug 30, 2024 at 1:24 PM vlz <viclazzarini@gmail.com> wrote:
The init overload for Arrays behaves differently,

kArr[] init size

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

On 30 Aug 2024, at 21:01, Bryan Tysinger <bryantysinger@gmail.com> wrote:


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

On Fri, Aug 30, 2024 at 9:59 AM Gabriel Borin <gabriel.s.borin@gmail.com> wrote:
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
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