[Csnd] a-var to k-var assignment
Date | 2017-09-17 21:21 |
From | Guillermo Senna |
Subject | [Csnd] a-var to k-var assignment |
Is this supposed to be valid? It is on 6.09.1. aVec init 42 ; I tried vaset at
perf-time and it also works. kControl = aVec ; Downsampling error? printk2 kControl ; kControl = 42.0000
Cheers! |
Date | 2017-09-18 10:50 |
From | Rory Walsh |
Subject | Re: [Csnd] a-var to k-var assignment |
Hi Guillermo. I'm not sure if this is now valid, but you can use always the downsamp opcode. https://csound.github.io/docs/manual/downsamp.html On 17 September 2017 at 21:21, Guillermo Senna <gsenna@gmail.com> wrote:
|
Date | 2017-09-18 20:01 |
From | Guillermo Senna |
Subject | Re: [Csnd] a-var to k-var assignment |
Hey Rory, Thanks for the tip! I'd also read about the k() converter in the new Springer book, but there I see: Finally, audio variables and expressions cannot be assigned directly to control variables. This is because we are going from many values (the vector), to a single one (a scalar). So either there was a recent change, the book is wrong or the code is wrong. Cheers! On 18/09/17 06:50, Rory Walsh wrote: > Hi Guillermo. I'm not sure if this is now valid, but you can use always the > downsamp opcode. > https://csound.github.io/docs/manual/downsamp.html > > On 17 September 2017 at 21:21, Guillermo Senna |
Date | 2017-09-18 20:09 |
From | Victor Lazzarini |
Subject | Re: [Csnd] a-var to k-var assignment |
In principle, we can't, but the code might have become more permissible. It's probably copying the first element of the vector. So the book is right, even if the parser is not enforcing it. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 18 Sep 2017, at 20:02, Guillermo Senna |
Date | 2017-09-18 20:11 |
From | Guillermo Senna |
Subject | Re: [Csnd] a-var to k-var assignment |
Thanks, Victor. Indeed, copying the first element is the behaviour I was observing. On 18/09/17 16:09, Victor Lazzarini wrote: > In principle, we can't, but the code might have become more permissible. It's probably copying the first element of the vector. > > So the book is right, even if the parser is not enforcing it. > > Victor Lazzarini > Dean of Arts, Celtic Studies, and Philosophy > Maynooth University > Ireland > >> On 18 Sep 2017, at 20:02, Guillermo Senna |