[Csnd] how to clear/zera a-array
Date | 2022-01-10 08:46 |
From | Tarmo Johannes |
Subject | [Csnd] how to clear/zera a-array |
Hi! What is the best way to set all elements of an audio array to 0? If the array is declared as gaOutput[] init 10 clear gaOutput does not work clear gaOutput[0], gaOutput[1], etc works but is cumbersome for longer arrays gaOutput fillarray 0 does not wor with a-arrays. I am sure there is an elegent way but I cannot find it. Thanks! tarmo |
Date | 2022-01-10 09:03 |
From | 00000008a49663bc-dmarc-request@LISTSERV.HEANET.IE |
Subject | Re: [Csnd] how to clear/zera a-array |
Hello, this is not elegant but maybe can be wrapped in a udo kIndx = 0 while kIndx < lenarray(aArr) do aArr[kIndx] = 0 kIndx = kIndx + 1 od
|
Date | 2022-01-10 09:16 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] how to clear/zera a-array |
Looks like we need an overload of fillarray for audio variables.
|
Date | 2022-01-10 09:33 |
From | Tarmo Johannes |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] how to clear/zera a-array |
Thanks! And most logical would be to have <clear> zeroing the arrays too. tarmo Kontakt Victor Lazzarini (<Victor.Lazzarini@mu.ie>) kirjutas kuupäeval E, 10. jaanuar 2022 kell 11:16:
|
Date | 2022-01-10 11:11 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] how to clear/zera a-array |
That's done now. Tested with
asig[] diskin "fox.wav"
clear asig
|