Csound Csound-dev Csound-tekno Search About

k-rate lenarray operating on i-rate?

Date2016-01-10 08:28
FromHlöðver Sigurðsson
Subjectk-rate lenarray operating on i-rate?
First I want to excuse my flood of questions. Since Im working on a short article for the journal, I'm hoping to explore more extensively the possibilities of showcasing my Csound live coding app from clojure in non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)

https://www.refheap.com/113500

It may be a simple bug to fix, but if you play this in CsoundQt and change the values in fillarray in instrument 1 and do ctrl-shift-w (but still keeping the number lined up linearly otherwise it will behave weirdly), you noticed live changes, very good, but increasing and decreasing the amount of numbers in the array, causes no changes, as if the initialization value of lenarray gets stuck, despite being k-rate, so it's really behaving like i-rate?

-Hlödver
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

Date2016-01-10 09:31
FromVictor Lazzarini
SubjectRe: k-rate lenarray operating on i-rate?
Do you want to change the size of the array? I don't think you  can. Once it is created, it will keep its size, length, for the duration.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:

First I want to excuse my flood of questions. Since Im working on a short article for the journal, I'm hoping to explore more extensively the possibilities of showcasing my Csound live coding app from clojure in non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)

https://www.refheap.com/113500

It may be a simple bug to fix, but if you play this in CsoundQt and change the values in fillarray in instrument 1 and do ctrl-shift-w (but still keeping the number lined up linearly otherwise it will behave weirdly), you noticed live changes, very good, but increasing and decreasing the amount of numbers in the array, causes no changes, as if the initialization value of lenarray gets stuck, despite being k-rate, so it's really behaving like i-rate?

-Hlödver
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

Date2016-01-10 09:58
FromHlöðver Sigurðsson
SubjectRe: k-rate lenarray operating on i-rate?
Yes, that's what I wanted. A workaround could be dummy values and loop until it hits a dummy value. I was also trying to use Joachim Heinz's Strarray opcodes, would also be better just to write the string "0 1 2 3 3.5" directly instead of assigning fillarray. Is there a pratical reason for not allowing to vary the array size on k-rate? Out of bounds is always a risk, but with good programing that can be prevented. Also, if you have any idea how to solve this, I'm open to explore other ways.

2016-01-10 10:31 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
Do you want to change the size of the array? I don't think you  can. Once it is created, it will keep its size, length, for the duration.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:

First I want to excuse my flood of questions. Since Im working on a short article for the journal, I'm hoping to explore more extensively the possibilities of showcasing my Csound live coding app from clojure in non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)

https://www.refheap.com/113500

It may be a simple bug to fix, but if you play this in CsoundQt and change the values in fillarray in instrument 1 and do ctrl-shift-w (but still keeping the number lined up linearly otherwise it will behave weirdly), you noticed live changes, very good, but increasing and decreasing the amount of numbers in the array, causes no changes, as if the initialization value of lenarray gets stuck, despite being k-rate, so it's really behaving like i-rate?

-Hlödver
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

Date2016-01-10 13:56
FromVictor Lazzarini
SubjectRe: k-rate lenarray operating on i-rate?
Steven’s array design did not contemplate dynamic arrays. 
I think he has to decide what we should do, so I am not  willing to modify the behaviour here.

The only way I see with this is to use local variables, which would be re-created every time you
compile the code.

Regards
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 10 Jan 2016, at 09:58, Hlöðver Sigurðsson  wrote:
> 
> Yes, that's what I wanted. A workaround could be dummy values and loop until it hits a dummy value. I was also trying to use Joachim Heinz's Strarray opcodes, would also be better just to write the string "0 1 2 3 3.5" directly instead of assigning fillarray. Is there a pratical reason for not allowing to vary the array size on k-rate? Out of bounds is always a risk, but with good programing that can be prevented. Also, if you have any idea how to solve this, I'm open to explore other ways.
> 
> 2016-01-10 10:31 GMT+01:00 Victor Lazzarini :
> Do you want to change the size of the array? I don't think you  can. Once it is created, it will keep its size, length, for the duration.
> 
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
> 
> On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson  wrote:
> 
>> First I want to excuse my flood of questions. Since Im working on a short article for the journal, I'm hoping to explore more extensively the possibilities of showcasing my Csound live coding app from clojure in non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)
>> 
>> https://www.refheap.com/113500
>> 
>> It may be a simple bug to fix, but if you play this in CsoundQt and change the values in fillarray in instrument 1 and do ctrl-shift-w (but still keeping the number lined up linearly otherwise it will behave weirdly), you noticed live changes, very good, but increasing and decreasing the amount of numbers in the array, causes no changes, as if the initialization value of lenarray gets stuck, despite being k-rate, so it's really behaving like i-rate?
>> 
>> -Hlödver
>> 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

Date2016-01-10 20:03
FromRory Walsh
SubjectRe: k-rate lenarray operating on i-rate?

Dynamic arrays were discussed and iirc the devs said it would not be that much work to implement. There was talk of holding off till Csound 7, but as far as I'm concerned the sooner this happens the better.

On 10 Jan 2016 1:58 pm, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
Steven’s array design did not contemplate dynamic arrays.
I think he has to decide what we should do, so I am not  willing to modify the behaviour here.

The only way I see with this is to use local variables, which would be re-created every time you
compile the code.

Regards
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 10 Jan 2016, at 09:58, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
>
> Yes, that's what I wanted. A workaround could be dummy values and loop until it hits a dummy value. I was also trying to use Joachim Heinz's Strarray opcodes, would also be better just to write the string "0 1 2 3 3.5" directly instead of assigning fillarray. Is there a pratical reason for not allowing to vary the array size on k-rate? Out of bounds is always a risk, but with good programing that can be prevented. Also, if you have any idea how to solve this, I'm open to explore other ways.
>
> 2016-01-10 10:31 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
> Do you want to change the size of the array? I don't think you  can. Once it is created, it will keep its size, length, for the duration.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>
>> First I want to excuse my flood of questions. Since Im working on a short article for the journal, I'm hoping to explore more extensively the possibilities of showcasing my Csound live coding app from clojure in non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)
>>
>> https://www.refheap.com/113500
>>
>> It may be a simple bug to fix, but if you play this in CsoundQt and change the values in fillarray in instrument 1 and do ctrl-shift-w (but still keeping the number lined up linearly otherwise it will behave weirdly), you noticed live changes, very good, but increasing and decreasing the amount of numbers in the array, causes no changes, as if the initialization value of lenarray gets stuck, despite being k-rate, so it's really behaving like i-rate?
>>
>> -Hlödver
>> 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

Date2016-01-10 20:28
FromSteven Yi
SubjectRe: k-rate lenarray operating on i-rate?
I think arrays can be re-defined at perf-time with different dimensions.

Hloover: could you try using:

kPatLen = lenarray:k(kPattern)

to force the use of the k-rate version of lenarray?

If that's not it, we may need to look at if the redefined gkDebug[] is
the same pointer after recompilation.

Rory: last I spoke with Victor, it came up that dynamically resizable
arrays has problems once you go to more than one dimension. It's here
where I see users possibly want to use a list of lists, so that the
list elements of the top-level list may be of different sizes.  It
gets a little complicated at that point, and thus we'll still need
further thinking through of all this.

On Sun, Jan 10, 2016 at 3:03 PM, Rory Walsh  wrote:
> Dynamic arrays were discussed and iirc the devs said it would not be that
> much work to implement. There was talk of holding off till Csound 7, but as
> far as I'm concerned the sooner this happens the better.
>
> On 10 Jan 2016 1:58 pm, "Victor Lazzarini"  wrote:
>>
>> Steven’s array design did not contemplate dynamic arrays.
>> I think he has to decide what we should do, so I am not  willing to modify
>> the behaviour here.
>>
>> The only way I see with this is to use local variables, which would be
>> re-created every time you
>> compile the code.
>>
>> Regards
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>> > On 10 Jan 2016, at 09:58, Hlöðver Sigurðsson  wrote:
>> >
>> > Yes, that's what I wanted. A workaround could be dummy values and loop
>> > until it hits a dummy value. I was also trying to use Joachim Heinz's
>> > Strarray opcodes, would also be better just to write the string "0 1 2 3
>> > 3.5" directly instead of assigning fillarray. Is there a pratical reason for
>> > not allowing to vary the array size on k-rate? Out of bounds is always a
>> > risk, but with good programing that can be prevented. Also, if you have any
>> > idea how to solve this, I'm open to explore other ways.
>> >
>> > 2016-01-10 10:31 GMT+01:00 Victor Lazzarini :
>> > Do you want to change the size of the array? I don't think you  can.
>> > Once it is created, it will keep its size, length, for the duration.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson  wrote:
>> >
>> >> First I want to excuse my flood of questions. Since Im working on a
>> >> short article for the journal, I'm hoping to explore more extensively the
>> >> possibilities of showcasing my Csound live coding app from clojure in
>> >> non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)
>> >>
>> >> https://www.refheap.com/113500
>> >>
>> >> It may be a simple bug to fix, but if you play this in CsoundQt and
>> >> change the values in fillarray in instrument 1 and do ctrl-shift-w (but
>> >> still keeping the number lined up linearly otherwise it will behave
>> >> weirdly), you noticed live changes, very good, but increasing and decreasing
>> >> the amount of numbers in the array, causes no changes, as if the
>> >> initialization value of lenarray gets stuck, despite being k-rate, so it's
>> >> really behaving like i-rate?
>> >>
>> >> -Hlödver
>> >> 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

Date2016-01-10 20:48
FromRory Walsh
SubjectRe: k-rate lenarray operating on i-rate?

Ah stop!! Who needs lists of lists of lists! That's stuff of the future ;) we need to be catching up with the present!

But I guess the idea for you guys is to implement it once and implement it right. I can't argue with that. I'll just have to ask the Santa of Csound for dynamic lists again next year.

On 10 Jan 2016 8:28 pm, "Steven Yi" <stevenyi@gmail.com> wrote:
I think arrays can be re-defined at perf-time with different dimensions.

Hloover: could you try using:

kPatLen = lenarray:k(kPattern)

to force the use of the k-rate version of lenarray?

If that's not it, we may need to look at if the redefined gkDebug[] is
the same pointer after recompilation.

Rory: last I spoke with Victor, it came up that dynamically resizable
arrays has problems once you go to more than one dimension. It's here
where I see users possibly want to use a list of lists, so that the
list elements of the top-level list may be of different sizes.  It
gets a little complicated at that point, and thus we'll still need
further thinking through of all this.

On Sun, Jan 10, 2016 at 3:03 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> Dynamic arrays were discussed and iirc the devs said it would not be that
> much work to implement. There was talk of holding off till Csound 7, but as
> far as I'm concerned the sooner this happens the better.
>
> On 10 Jan 2016 1:58 pm, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
>>
>> Steven’s array design did not contemplate dynamic arrays.
>> I think he has to decide what we should do, so I am not  willing to modify
>> the behaviour here.
>>
>> The only way I see with this is to use local variables, which would be
>> re-created every time you
>> compile the code.
>>
>> Regards
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>> > On 10 Jan 2016, at 09:58, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
>> >
>> > Yes, that's what I wanted. A workaround could be dummy values and loop
>> > until it hits a dummy value. I was also trying to use Joachim Heinz's
>> > Strarray opcodes, would also be better just to write the string "0 1 2 3
>> > 3.5" directly instead of assigning fillarray. Is there a pratical reason for
>> > not allowing to vary the array size on k-rate? Out of bounds is always a
>> > risk, but with good programing that can be prevented. Also, if you have any
>> > idea how to solve this, I'm open to explore other ways.
>> >
>> > 2016-01-10 10:31 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>> > Do you want to change the size of the array? I don't think you  can.
>> > Once it is created, it will keep its size, length, for the duration.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>> >
>> >> First I want to excuse my flood of questions. Since Im working on a
>> >> short article for the journal, I'm hoping to explore more extensively the
>> >> possibilities of showcasing my Csound live coding app from clojure in
>> >> non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)
>> >>
>> >> https://www.refheap.com/113500
>> >>
>> >> It may be a simple bug to fix, but if you play this in CsoundQt and
>> >> change the values in fillarray in instrument 1 and do ctrl-shift-w (but
>> >> still keeping the number lined up linearly otherwise it will behave
>> >> weirdly), you noticed live changes, very good, but increasing and decreasing
>> >> the amount of numbers in the array, causes no changes, as if the
>> >> initialization value of lenarray gets stuck, despite being k-rate, so it's
>> >> really behaving like i-rate?
>> >>
>> >> -Hlödver
>> >> 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

Date2016-01-10 21:16
FromHlöðver Sigurðsson
SubjectRe: k-rate lenarray operating on i-rate?
Hi guys!

I did try kPatLen = lenarray:k(kPattern) but the result was the same. However, after I had contact with Joachim Heinz, I was able to implement his opcode StrGetNum and StrayLen. I will post this solution but I still have a lot to do, but this concept bring me closer to something very useful in terms of live evaluation.

https://www.refheap.com/113513


About arrays, if I may express my opinion about the future development of them. Then I feel like mulivectorial arrays should be initialized differently. By reading the manual, it seems that the only way to initialize them is to do something like kMultiArray[][] init 10, 10 Where sometimes I may want an array like this [5, 5, [3, 4] 5, 6, [4, 7]]. But to make the most use of an array like that, I think more functions need to exist, like map etc. And the need to use fillarray is bit unneccecary I think because the compiler shouldn't be able confuse:
kArray [1, 2, 3] ;to be anything else than
kArray fillarray 1, 2, 3 ;?


But these were just ideas, but the good news is that I can continue with what I was doing :-)

thanks for your time



2016-01-10 21:48 GMT+01:00 Rory Walsh <rorywalsh@ear.ie>:

Ah stop!! Who needs lists of lists of lists! That's stuff of the future ;) we need to be catching up with the present!

But I guess the idea for you guys is to implement it once and implement it right. I can't argue with that. I'll just have to ask the Santa of Csound for dynamic lists again next year.

On 10 Jan 2016 8:28 pm, "Steven Yi" <stevenyi@gmail.com> wrote:
I think arrays can be re-defined at perf-time with different dimensions.

Hloover: could you try using:

kPatLen = lenarray:k(kPattern)

to force the use of the k-rate version of lenarray?

If that's not it, we may need to look at if the redefined gkDebug[] is
the same pointer after recompilation.

Rory: last I spoke with Victor, it came up that dynamically resizable
arrays has problems once you go to more than one dimension. It's here
where I see users possibly want to use a list of lists, so that the
list elements of the top-level list may be of different sizes.  It
gets a little complicated at that point, and thus we'll still need
further thinking through of all this.

On Sun, Jan 10, 2016 at 3:03 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> Dynamic arrays were discussed and iirc the devs said it would not be that
> much work to implement. There was talk of holding off till Csound 7, but as
> far as I'm concerned the sooner this happens the better.
>
> On 10 Jan 2016 1:58 pm, "Victor Lazzarini" <Victor.Lazzarini@nuim.ie> wrote:
>>
>> Steven’s array design did not contemplate dynamic arrays.
>> I think he has to decide what we should do, so I am not  willing to modify
>> the behaviour here.
>>
>> The only way I see with this is to use local variables, which would be
>> re-created every time you
>> compile the code.
>>
>> Regards
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>>
>> > On 10 Jan 2016, at 09:58, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
>> >
>> > Yes, that's what I wanted. A workaround could be dummy values and loop
>> > until it hits a dummy value. I was also trying to use Joachim Heinz's
>> > Strarray opcodes, would also be better just to write the string "0 1 2 3
>> > 3.5" directly instead of assigning fillarray. Is there a pratical reason for
>> > not allowing to vary the array size on k-rate? Out of bounds is always a
>> > risk, but with good programing that can be prevented. Also, if you have any
>> > idea how to solve this, I'm open to explore other ways.
>> >
>> > 2016-01-10 10:31 GMT+01:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
>> > Do you want to change the size of the array? I don't think you  can.
>> > Once it is created, it will keep its size, length, for the duration.
>> >
>> > Victor Lazzarini
>> > Dean of Arts, Celtic Studies, and Philosophy
>> > Maynooth University
>> > Ireland
>> >
>> > On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson <hlolli@GMAIL.COM> wrote:
>> >
>> >> First I want to excuse my flood of questions. Since Im working on a
>> >> short article for the journal, I'm hoping to explore more extensively the
>> >> possibilities of showcasing my Csound live coding app from clojure in
>> >> non-api csound, wherever possible. So I hope I'm forgiven meanwhile :-)
>> >>
>> >> https://www.refheap.com/113500
>> >>
>> >> It may be a simple bug to fix, but if you play this in CsoundQt and
>> >> change the values in fillarray in instrument 1 and do ctrl-shift-w (but
>> >> still keeping the number lined up linearly otherwise it will behave
>> >> weirdly), you noticed live changes, very good, but increasing and decreasing
>> >> the amount of numbers in the array, causes no changes, as if the
>> >> initialization value of lenarray gets stuck, despite being k-rate, so it's
>> >> really behaving like i-rate?
>> >>
>> >> -Hlödver
>> >> 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

Date2016-01-10 21:38
FromSteven Yi
SubjectRe: k-rate lenarray operating on i-rate?
The example of [5,5, [3,4], 5, 6, [4, 7]] is similar to what I was
talking about for lists of lists. I've mentioned before that lists and
arrays are different things and I think we need to keep that in mind.
As for array literals/static initialisation, this has been implemented
in the features/parser3 branch for a while, as this example file
shows:

https://github.com/csound/csound/blob/feature/parser3/tests/commandline/test_arrays_static_init.csd

map, filter, and reduce would also be nice to have but they require
opcode instances as types.  That's been discussed for both the above
operations but also for the new processing graph as well as the UGen
API.  I would say that this would all happen this year, just a matter
of when, and that they will all happen for CS7 as it really should use
multi-character type names for its implementation, IMO.

On Sun, Jan 10, 2016 at 4:16 PM, Hlöðver Sigurðsson  wrote:
> Hi guys!
>
> I did try kPatLen = lenarray:k(kPattern) but the result was the same.
> However, after I had contact with Joachim Heinz, I was able to implement his
> opcode StrGetNum and StrayLen. I will post this solution but I still have a
> lot to do, but this concept bring me closer to something very useful in
> terms of live evaluation.
>
> https://www.refheap.com/113513
>
>
> About arrays, if I may express my opinion about the future development of
> them. Then I feel like mulivectorial arrays should be initialized
> differently. By reading the manual, it seems that the only way to initialize
> them is to do something like kMultiArray[][] init 10, 10 Where sometimes I
> may want an array like this [5, 5, [3, 4] 5, 6, [4, 7]]. But to make the
> most use of an array like that, I think more functions need to exist, like
> map etc. And the need to use fillarray is bit unneccecary I think because
> the compiler shouldn't be able confuse:
> kArray [1, 2, 3] ;to be anything else than
> kArray fillarray 1, 2, 3 ;?
>
>
> But these were just ideas, but the good news is that I can continue with
> what I was doing :-)
>
> thanks for your time
>
>
>
> 2016-01-10 21:48 GMT+01:00 Rory Walsh :
>>
>> Ah stop!! Who needs lists of lists of lists! That's stuff of the future ;)
>> we need to be catching up with the present!
>>
>> But I guess the idea for you guys is to implement it once and implement it
>> right. I can't argue with that. I'll just have to ask the Santa of Csound
>> for dynamic lists again next year.
>>
>> On 10 Jan 2016 8:28 pm, "Steven Yi"  wrote:
>>>
>>> I think arrays can be re-defined at perf-time with different dimensions.
>>>
>>> Hloover: could you try using:
>>>
>>> kPatLen = lenarray:k(kPattern)
>>>
>>> to force the use of the k-rate version of lenarray?
>>>
>>> If that's not it, we may need to look at if the redefined gkDebug[] is
>>> the same pointer after recompilation.
>>>
>>> Rory: last I spoke with Victor, it came up that dynamically resizable
>>> arrays has problems once you go to more than one dimension. It's here
>>> where I see users possibly want to use a list of lists, so that the
>>> list elements of the top-level list may be of different sizes.  It
>>> gets a little complicated at that point, and thus we'll still need
>>> further thinking through of all this.
>>>
>>> On Sun, Jan 10, 2016 at 3:03 PM, Rory Walsh  wrote:
>>> > Dynamic arrays were discussed and iirc the devs said it would not be
>>> > that
>>> > much work to implement. There was talk of holding off till Csound 7,
>>> > but as
>>> > far as I'm concerned the sooner this happens the better.
>>> >
>>> > On 10 Jan 2016 1:58 pm, "Victor Lazzarini" 
>>> > wrote:
>>> >>
>>> >> Steven’s array design did not contemplate dynamic arrays.
>>> >> I think he has to decide what we should do, so I am not  willing to
>>> >> modify
>>> >> the behaviour here.
>>> >>
>>> >> The only way I see with this is to use local variables, which would be
>>> >> re-created every time you
>>> >> compile the code.
>>> >>
>>> >> Regards
>>> >> ========================
>>> >> Dr Victor Lazzarini
>>> >> Dean of Arts, Celtic Studies and Philosophy,
>>> >> Maynooth University,
>>> >> Maynooth, Co Kildare, Ireland
>>> >> Tel: 00 353 7086936
>>> >> Fax: 00 353 1 7086952
>>> >>
>>> >> > On 10 Jan 2016, at 09:58, Hlöðver Sigurðsson 
>>> >> > wrote:
>>> >> >
>>> >> > Yes, that's what I wanted. A workaround could be dummy values and
>>> >> > loop
>>> >> > until it hits a dummy value. I was also trying to use Joachim
>>> >> > Heinz's
>>> >> > Strarray opcodes, would also be better just to write the string "0 1
>>> >> > 2 3
>>> >> > 3.5" directly instead of assigning fillarray. Is there a pratical
>>> >> > reason for
>>> >> > not allowing to vary the array size on k-rate? Out of bounds is
>>> >> > always a
>>> >> > risk, but with good programing that can be prevented. Also, if you
>>> >> > have any
>>> >> > idea how to solve this, I'm open to explore other ways.
>>> >> >
>>> >> > 2016-01-10 10:31 GMT+01:00 Victor Lazzarini
>>> >> > :
>>> >> > Do you want to change the size of the array? I don't think you  can.
>>> >> > Once it is created, it will keep its size, length, for the duration.
>>> >> >
>>> >> > Victor Lazzarini
>>> >> > Dean of Arts, Celtic Studies, and Philosophy
>>> >> > Maynooth University
>>> >> > Ireland
>>> >> >
>>> >> > On 10 Jan 2016, at 08:28, Hlöðver Sigurðsson 
>>> >> > wrote:
>>> >> >
>>> >> >> First I want to excuse my flood of questions. Since Im working on a
>>> >> >> short article for the journal, I'm hoping to explore more
>>> >> >> extensively the
>>> >> >> possibilities of showcasing my Csound live coding app from clojure
>>> >> >> in
>>> >> >> non-api csound, wherever possible. So I hope I'm forgiven meanwhile
>>> >> >> :-)
>>> >> >>
>>> >> >> https://www.refheap.com/113500
>>> >> >>
>>> >> >> It may be a simple bug to fix, but if you play this in CsoundQt and
>>> >> >> change the values in fillarray in instrument 1 and do ctrl-shift-w
>>> >> >> (but
>>> >> >> still keeping the number lined up linearly otherwise it will behave
>>> >> >> weirdly), you noticed live changes, very good, but increasing and
>>> >> >> decreasing
>>> >> >> the amount of numbers in the array, causes no changes, as if the
>>> >> >> initialization value of lenarray gets stuck, despite being k-rate,
>>> >> >> so it's
>>> >> >> really behaving like i-rate?
>>> >> >>
>>> >> >> -Hlödver
>>> >> >> 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