k-rate lenarray operating on i-rate?
Date | 2016-01-10 08:28 |
From | Hlöðver Sigurðsson |
Subject | k-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 |
Date | 2016-01-10 09:31 |
From | Victor Lazzarini |
Subject | Re: 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
|
Date | 2016-01-10 09:58 |
From | Hlöðver Sigurðsson |
Subject | Re: 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>:
|
Date | 2016-01-10 13:56 |
From | Victor Lazzarini |
Subject | Re: 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 |
Date | 2016-01-10 20:03 |
From | Rory Walsh |
Subject | Re: 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:
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
Steven’s array design did not contemplate dynamic arrays. |
Date | 2016-01-10 20:28 |
From | Steven Yi |
Subject | Re: 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 |
Date | 2016-01-10 20:48 |
From | Rory Walsh |
Subject | Re: 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:
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
I think arrays can be re-defined at perf-time with different dimensions. |
Date | 2016-01-10 21:16 |
From | Hlöðver Sigurðsson |
Subject | Re: 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 2016-01-10 21:48 GMT+01:00 Rory Walsh <rorywalsh@ear.ie>:
|
Date | 2016-01-10 21:38 |
From | Steven Yi |
Subject | Re: 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 |