Csound Csound-dev Csound-tekno Search About

[Csnd] init from gk array

Date2018-10-05 06:09
Fromburton
Subject[Csnd] init from gk array
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
  

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
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

Date2018-10-05 06:41
FromSteven Yi
SubjectRe: [Csnd] init from gk array
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  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
> 
>
> 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
> 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

Date2018-10-05 07:16
Fromburton
SubjectRe: [Csnd] init from gk array
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
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

Date2018-10-05 13:11
Fromjoachim heintz
SubjectRe: [Csnd] init from gk array
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
> 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

Date2018-10-06 10:56
FromJohn ff
SubjectRe: [Csnd] init from gk array
Latest code flags this as an error

⁣Sent from TypeApp ​

On Oct 5, 2018, 07:16, at 07: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
>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