Csound Csound-dev Csound-tekno Search About

value of global k-array at i time

Date2016-12-06 12:22
FromTarmo Johannes
Subjectvalue of global k-array at i time

Hi,

 

I am a bit confused from this part in release notes of 6.08 about arrays:

 

---

In particular, i(k[i]) will continue not to work, as before, but the new operator
i(k[],i) is provided to cover this case.

----

 

I tried different syntaxes but failed, what do I have to do to get a value from global k-array in instrument at i-time?

 

gkArr[] array 1,2,3

 

instr 1

print i(gkArr[1]) ; ? now returnd always 0

endin

 

 

tarmo


Date2016-12-06 12:54
FromJohn ff
SubjectRe: value of global k-array at i time
Try "i(karr,ii)"

Sent from TypeApp
On 6 Dec 2016, at 12:24, Tarmo Johannes <tarmo.johannes@OTSAKOOL.EDU.EE> wrote:

Hi,

 

I am a bit confused from this part in release notes of 6.08 about arrays:

 

---

In particular, i(k[i]) will continue not to work, as before, but the new operator
i(k[],i) is provided to cover this case.

----

 

I tried different syntaxes but failed, what do I have to do to get a value from global k-array in instrument at i-time?

 

gkArr[] array 1,2,3

 

instr 1

print i(gkArr[1]) ; ? now returnd always 0

endin

 

 

tarmo

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-12-06 19:39
FromTarmo Johannes
SubjectRe: value of global k-array at i time
Thanks, that was it! Now got it.

For others who might have similar problem, that should work:

schedule 1,0,0

instr 1
karr[] fillarray 1,2,3
print i(karr,1)
endin

Output is correct:

SECTION 1:
new alloc for instr 1:
instr 1:  #i0 = 2.000

tarmo

On Tuesday 06 December 2016 12:54:45 you wrote:
> Try "i(karr,ii)" ⁣
> 
> Sent from TypeApp ​
> 
> On 6 Dec 2016, 12:24, at 12:24, Tarmo Johannes 
 wrote:
> >Hi,
> >
> >I am a bit confused from this part in release notes of 6.08 about
> >arrays:
> >
> >---
> >In particular, i(k[i]) will continue not to work, as before, but the
> >new operatori(k[],i) is
> >provided to cover this case.
> >----
> >
> >I tried different syntaxes but failed, what do I have to do to get a
> >value from global
> >k-array in instrument at i-time?
> >
> >gkArr[] array 1,2,3
> >
> >instr 1
> >
> >	print i(gkArr[1]) ; ? now returnd always 0
> >
> >endin
> >
> >
> >tarmo
> >
> >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