Csound Csound-dev Csound-tekno Search About

[Csnd] a-var to k-var assignment

Date2017-09-17 21:21
FromGuillermo 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!


Date2017-09-18 10:50
FromRory Walsh
SubjectRe: [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:

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!

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

Date2017-09-18 20:01
FromGuillermo Senna
SubjectRe: [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  wrote:
>
>> 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!
>> 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

Date2017-09-18 20:09
FromVictor Lazzarini
SubjectRe: [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  wrote:
> 
> 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  wrote:
>>> 
>>> 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!
>>> 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

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

Date2017-09-18 20:11
FromGuillermo Senna
SubjectRe: [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  wrote:
>>
>> 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  wrote:
>>>>
>>>> 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!
>>>> 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
> 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