[Csnd] init from gk array

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] init from gk array

burton
hello all,

i am refactoring an orchestra around arrays and it seems the i() values of
gk arrays are not available at i-time the first time an instrument runs.

please run attached .csd where the first value is reported as 0 on the first
run, then 1 for subsequent instances of the same instrument (like the
behaviour of non-initialized k variables).

is this normal? (i am expecting a 1).

if so, is there a different approach available to init from a gk array?

thanks,
alex.

test_init.csd
<http://csound.1045644.n5.nabble.com/file/t339266/test_init.csd>  

macOS 10.13.6
Csound version 6.12 beta (double samples) Oct  5 2018
[commit: 12d25cfe8df7f2189d263ba753bede6fc8648341]



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] init from gk array

Steven Yi
If you're reading a value from a k[] array at init-time, you should
use i(karr, index):

https://csound.com/docs/manual/opi.html


On Fri, Oct 5, 2018 at 1:19 AM burton <[hidden email]> wrote:

>
> hello all,
>
> i am refactoring an orchestra around arrays and it seems the i() values of
> gk arrays are not available at i-time the first time an instrument runs.
>
> please run attached .csd where the first value is reported as 0 on the first
> run, then 1 for subsequent instances of the same instrument (like the
> behaviour of non-initialized k variables).
>
> is this normal? (i am expecting a 1).
>
> if so, is there a different approach available to init from a gk array?
>
> thanks,
> alex.
>
> test_init.csd
> <http://csound.1045644.n5.nabble.com/file/t339266/test_init.csd>
>
> macOS 10.13.6
> Csound version 6.12 beta (double samples) Oct  5 2018
> [commit: 12d25cfe8df7f2189d263ba753bede6fc8648341]
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] init from gk array

burton
ah! thanks for that!

if the behaviour of i(karr[n]) -- produces unpredictable results, wouldn't
be pertinent to emit a warning?

and perhaps the manual's INITIALIZATION AND PERFORMANCE PASS section (which
i've re-read a couple of times) could document the k array case...

alex.




--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] init from gk array

joachim-3
you probably mean the csound floss manual (which should not be confused
with the real csound reference manual).  good idea; i have added a
sentence after example 03A07:
http://write.flossmanuals.net/csound/a-initialization-and-performance-pass/

(it was already mentioned in the arrays chapter of the floss manual.)

        joachim



On 05/10/18 08:16, burton wrote:

> ah! thanks for that!
>
> if the behaviour of i(karr[n]) -- produces unpredictable results, wouldn't
> be pertinent to emit a warning?
>
> and perhaps the manual's INITIALIZATION AND PERFORMANCE PASS section (which
> i've re-read a couple of times) could document the k array case...
>
> alex.
>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] init from gk array

jpff
In reply to this post by burton
Latest code flags this as an error

⁣Sent from TypeApp ​

On Oct 5, 2018, 07:16, at 07:16, burton <[hidden email]> wrote:

>ah! thanks for that!
>
>if the behaviour of i(karr[n]) -- produces unpredictable results,
>wouldn't
>be pertinent to emit a warning?
>
>and perhaps the manual's INITIALIZATION AND PERFORMANCE PASS section
>(which
>i've re-read a couple of times) could document the k array case...
>
>alex.
>
>
>
>
>--
>Sent from:
>http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
>Csound mailing list
>[hidden email]
>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
[hidden email]
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