Csound Csound-dev Csound-tekno Search About

[Csnd] lenarray broken?

Date2014-02-06 23:17
FromLuis Antunes Pena
Subject[Csnd] lenarray broken?

Hello,

it looks like lenarry can't deal with k-variables:


this

klen2 lenarray karr2
is allways 0
and this is working as expected.

ilen2 lenarray karr2


Here's the file I used to test:

instr 1

karr1[] fillarray 10, 11, 13, 16, 20

karr2[] fillarray 5, 6, 4, 5, 3, 2

ilen1 lenarray karr1

klen2 lenarray karr2

ilen2 lenarray karr2

prints "\\n ilen1: %d\\t klen2: %d\\tilen2: %d\\n", ilen1, klen2, ilen2 endin


-Luis

--
signatur http://luisantunespena.eu

Date2014-02-06 23:55
Fromjoachim heintz
SubjectRe: [Csnd] lenarray broken?
well, you can't expect a k-array to report something at i-time, can you?
this works:




sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1

instr 1
karr1[] fillarray 10, 11, 13, 16, 20
karr2[] fillarray 5, 6, 4, 5, 3, 2
klen1 lenarray karr1
klen2 lenarray karr2
printks "\\n klen1: %d\\t klen2: %d\n", 0, klen1, klen2
turnoff
endin



i 1 0 1



->  klen1: 5	 klen2: 6


	joachim


Am 07.02.2014 00:17, schrieb Luis Antunes Pena:
> Hello,
>
> it looks like *lenarry* can't deal with k-variables:
>
>
> this
>
> klen2 lenarray karr2
> is allways 0
> and this is working as expected.
>
> ilen2 lenarray karr2
>
>
> Here's the file I used to test:
>
> instr 1
>
> karr1[] fillarray 10, 11, 13, 16, 20
>
> karr2[] fillarray 5, 6, 4, 5, 3, 2
>
> ilen1 lenarray karr1
>
> klen2 lenarray karr2
>
> ilen2 lenarray karr2
>
> prints "\\n ilen1: %d\\t klen2: %d\\tilen2: %d\\n", ilen1, klen2, ilen2
> endin
>
>
> -Luis
>
> --
> signatur http://luisantunespena.eu

Date2014-02-07 00:08
FromAndres Cabrera
SubjectRe: [Csnd] lenarray broken?
Hi,

This is related to the recent question about assignment to k-rate arrays happening on the perf pass rather than the init pass.

Cheers,
Andrés


On Thu, Feb 6, 2014 at 3:55 PM, joachim heintz <jh@joachimheintz.de> wrote:
well, you can't expect a k-array to report something at i-time, can you?
this works:

<CsoundSynthesizer>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1


instr 1
karr1[] fillarray 10, 11, 13, 16, 20
karr2[] fillarray 5, 6, 4, 5, 3, 2
klen1 lenarray karr1
klen2 lenarray karr2
printks "\\n klen1: %d\\t klen2: %d\n", 0, klen1, klen2
turnoff
endin

</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>

->  klen1: 5     klen2: 6


        joachim


Am 07.02.2014 00:17, schrieb Luis Antunes Pena:
Hello,

it looks like *lenarry* can't deal with k-variables:



this

klen2 lenarray karr2
is allways 0
and this is working as expected.

ilen2 lenarray karr2


Here's the file I used to test:

instr 1

karr1[] fillarray 10, 11, 13, 16, 20

karr2[] fillarray 5, 6, 4, 5, 3, 2

ilen1 lenarray karr1

klen2 lenarray karr2

ilen2 lenarray karr2

prints "\\n ilen1: %d\\t klen2: %d\\tilen2: %d\\n", ilen1, klen2, ilen2
endin


-Luis

--
signatur http://luisantunespena.eu


Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2014-02-07 17:04
FromLuis Antunes Pena
SubjectRe: [Csnd] lenarray broken?
Thanks Joachim. I'm still trying to learn how to work with arrays.
For example one thing I don't understand is this: why is copy of an array only possible at k-rate but not at i-rate?

instr 1

iarr1[] fillarray 54, 56, 58

karr1[] fillarray 71, 72

;iarr2[] = iarr1

karr2[] = karr1
endin


-Luis


Am 07.02.14 00:55, schrieb joachim heintz:
well, you can't expect a k-array to report something at i-time, can you?
this works:

<CsoundSynthesizer>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1

instr 1
karr1[] fillarray 10, 11, 13, 16, 20
karr2[] fillarray 5, 6, 4, 5, 3, 2
klen1 lenarray karr1
klen2 lenarray karr2
printks "\\n klen1: %d\\t klen2: %d\n", 0, klen1, klen2
turnoff
endin

</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>

->  klen1: 5     klen2: 6


    joachim


Am 07.02.2014 00:17, schrieb Luis Antunes Pena:
Hello,

it looks like *lenarry* can't deal with k-variables:


this

klen2 lenarray karr2
is allways 0
and this is working as expected.

ilen2 lenarray karr2


Here's the file I used to test:

instr 1

karr1[] fillarray 10, 11, 13, 16, 20

karr2[] fillarray 5, 6, 4, 5, 3, 2

ilen1 lenarray karr1

klen2 lenarray karr2

ilen2 lenarray karr2

prints "\\n ilen1: %d\\t klen2: %d\\tilen2: %d\\n", ilen1, klen2, ilen2
endin


-Luis

--
signatur http://luisantunespena.eu


Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





--
signatur http://luisantunespena.eu

Date2014-02-08 10:44
Fromjoachim heintz
SubjectRe: [Csnd] lenarray broken?
i think this is simply because some of the features we already have for 
k-arrays are not yet implemented for i-arrays. we should collect what is 
missing, and then discuss it here or on the developer list. if you can 
contribute to such a list while working with arrays, it would be great 
(you can send here or to me off-list if you prefer).
it tried to put together some explanations and examples about arrays 
here (in case you don't know it): http://en.flossmanuals.net/csound/arrays

	joachim


Am 07.02.2014 18:04, schrieb Luis Antunes Pena:
> Thanks Joachim. I'm still trying to learn how to work with arrays.
> For example one thing I don't understand is this: why is copy of an
> array only possible at k-rate but not at i-rate?
>
> instr 1
>
> iarr1[] fillarray 54, 56, 58
>
> karr1[] fillarray 71, 72
>
> ;iarr2[] = iarr1
>
> karr2[] = karr1
> endin
>
>
> -Luis
>
>
> Am 07.02.14 00:55, schrieb joachim heintz:
>> well, you can't expect a k-array to report something at i-time, can you?
>> this works:
>>
>> 
>> 
>>
>> sr = 44100
>> ksmps = 128
>> nchnls = 2
>> 0dbfs = 1
>>
>> instr 1
>> karr1[] fillarray 10, 11, 13, 16, 20
>> karr2[] fillarray 5, 6, 4, 5, 3, 2
>> klen1 lenarray karr1
>> klen2 lenarray karr2
>> printks "\\n klen1: %d\\t klen2: %d\n", 0, klen1, klen2
>> turnoff
>> endin
>>
>> 
>> 
>> i 1 0 1
>> 
>> 
>>
>> ->  klen1: 5     klen2: 6
>>
>>
>>     joachim
>>
>>
>> Am 07.02.2014 00:17, schrieb Luis Antunes Pena:
>>> Hello,
>>>
>>> it looks like *lenarry* can't deal with k-variables:
>>>
>>>
>>> this
>>>
>>> klen2 lenarray karr2
>>> is allways 0
>>> and this is working as expected.
>>>
>>> ilen2 lenarray karr2
>>>
>>>
>>> Here's the file I used to test:
>>>
>>> instr 1
>>>
>>> karr1[] fillarray 10, 11, 13, 16, 20
>>>
>>> karr2[] fillarray 5, 6, 4, 5, 3, 2
>>>
>>> ilen1 lenarray karr1
>>>
>>> klen2 lenarray karr2
>>>
>>> ilen2 lenarray karr2
>>>
>>> prints "\\n ilen1: %d\\t klen2: %d\\tilen2: %d\\n", ilen1, klen2, ilen2
>>> endin
>>>
>>>
>>> -Luis
>>>
>>> --
>>> signatur http://luisantunespena.eu
>>
>>
>> Send bugs reports to the Sourceforge bug trackers
>> csound6:
>> https://sourceforge.net/p/csound/tickets/
>> csound5:
>> https://sourceforge.net/p/csound/bugs/
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>>
>>
>>
>
>
> --
> signatur http://luisantunespena.eu

Date2014-02-09 16:08
FromLuis Antunes Pena
SubjectRe: [Csnd] lenarray broken?
Joachim, sure I would like to give my contribution to the development of the arrays.
The Floss manual was very, very usefull!
Thanks,
Luís


Am 08.02.14 11:44, schrieb joachim heintz:
i think this is simply because some of the features we already have for k-arrays are not yet implemented for i-arrays. we should collect what is missing, and then discuss it here or on the developer list. if you can contribute to such a list while working with arrays, it would be great (you can send here or to me off-list if you prefer).
it tried to put together some explanations and examples about arrays here (in case you don't know it): http://en.flossmanuals.net/csound/arrays

    joachim


Am 07.02.2014 18:04, schrieb Luis Antunes Pena:
Thanks Joachim. I'm still trying to learn how to work with arrays.
For example one thing I don't understand is this: why is copy of an
array only possible at k-rate but not at i-rate?

instr 1

iarr1[] fillarray 54, 56, 58

karr1[] fillarray 71, 72

;iarr2[] = iarr1

karr2[] = karr1
endin


-Luis


Am 07.02.14 00:55, schrieb joachim heintz:
well, you can't expect a k-array to report something at i-time, can you?
this works:

<CsoundSynthesizer>
<CsInstruments>

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1

instr 1
karr1[] fillarray 10, 11, 13, 16, 20
karr2[] fillarray 5, 6, 4, 5, 3, 2
klen1 lenarray karr1
klen2 lenarray karr2
printks "\\n klen1: %d\\t klen2: %d\n", 0, klen1, klen2
turnoff
endin

</CsInstruments>
<CsScore>
i 1 0 1
</CsScore>
</CsoundSynthesizer>

->  klen1: 5     klen2: 6


    joachim


Am 07.02.2014 00:17, schrieb Luis Antunes Pena:
Hello,

it looks like *lenarry* can't deal with k-variables:


this

klen2 lenarray karr2
is allways 0
and this is working as expected.

ilen2 lenarray karr2


Here's the file I used to test:

instr 1

karr1[] fillarray 10, 11, 13, 16, 20

karr2[] fillarray 5, 6, 4, 5, 3, 2

ilen1 lenarray karr1

klen2 lenarray karr2

ilen2 lenarray karr2

prints "\\n ilen1: %d\\t klen2: %d\\tilen2: %d\\n", ilen1, klen2, ilen2
endin


-Luis

--
signatur http://luisantunespena.eu


Send bugs reports to the Sourceforge bug trackers
csound6:
https://sourceforge.net/p/csound/tickets/
csound5:
https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body
"unsubscribe csound"





--
signatur http://luisantunespena.eu


Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"





--
signatur http://luisantunespena.eu