Csound Csound-dev Csound-tekno Search About

[Csnd] iArr[] = kArr not working in Csound 7

Date2025-06-29 10:58
Fromjoachim heintz
Subject[Csnd] iArr[] = kArr not working in Csound 7
this code used to work in Csound 6:

instr 1
   gkBla[] = fillarray(1,2,3)
   printk(0,gkBla[0])
   turnoff
endin
schedule(1,0,1)

instr 2
   iBla[] = gkBla
   print(iBla[0])
endin
schedule(2,1,1)

but in Csound 7 i get this error message:
new alloc (instance 2) for instr 2:
PerfError in wrong mode 1
PERF ERROR in instr 2 (opcode ##array_get.x) line 20: Array dimension 1 
out of range for dimensions 0

it seems like creating an i-Array as copy of a k-Array is not supported 
(which breaks code from CS6 for me).
is this true, or is there another way to do it now?

cheers -
	joachim

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

Date2025-06-29 11:31
Fromvlz
SubjectRe: [Csnd] iArr[] = kArr not working in Csound 7
Looks like a parser error, selecting the wrong copy code. Can you open a ticket?

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 29 Jun 2025, at 10:58, joachim heintz  wrote:
> 
> this code used to work in Csound 6:
> 
> instr 1
>  gkBla[] = fillarray(1,2,3)
>  printk(0,gkBla[0])
>  turnoff
> endin
> schedule(1,0,1)
> 
> instr 2
>  iBla[] = gkBla
>  print(iBla[0])
> endin
> schedule(2,1,1)
> 
> but in Csound 7 i get this error message:
> new alloc (instance 2) for instr 2:
> PerfError in wrong mode 1
> PERF ERROR in instr 2 (opcode ##array_get.x) line 20: Array dimension 1 out of range for dimensions 0
> 
> it seems like creating an i-Array as copy of a k-Array is not supported (which breaks code from CS6 for me).
> is this true, or is there another way to do it now?
> 
> cheers -
>    joachim
> 
> 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

Date2025-06-29 11:44
Fromjoachim heintz
SubjectRe: [Csnd] iArr[] = kArr not working in Csound 7
ok done:
https://github.com/csound/csound/issues/2164

On 29/06/2025 12:31, vlz wrote:
> Looks like a parser error, selecting the wrong copy code. Can you open a ticket?
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 29 Jun 2025, at 10:58, joachim heintz  wrote:
>>
>> this code used to work in Csound 6:
>>
>> instr 1
>>   gkBla[] = fillarray(1,2,3)
>>   printk(0,gkBla[0])
>>   turnoff
>> endin
>> schedule(1,0,1)
>>
>> instr 2
>>   iBla[] = gkBla
>>   print(iBla[0])
>> endin
>> schedule(2,1,1)
>>
>> but in Csound 7 i get this error message:
>> new alloc (instance 2) for instr 2:
>> PerfError in wrong mode 1
>> PERF ERROR in instr 2 (opcode ##array_get.x) line 20: Array dimension 1 out of range for dimensions 0
>>
>> it seems like creating an i-Array as copy of a k-Array is not supported (which breaks code from CS6 for me).
>> is this true, or is there another way to do it now?
>>
>> cheers -
>>     joachim
>>
>> 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