[Csnd] Accumulate a-rate variables

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Accumulate a-rate variables

Vincent
In the following examples i get different results depending on the ksmps value, is this expected behaviour? I thought the a-rate should not be affected by ksmps.
(Using latest build on ubuntu 18.04)
 

instr 1

andx init 0

andx += 1

printk 0.1,k(andx)

endin

schedule(1,0,1)

Csound mailing list [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Accumulate a-rate variables

Victor Lazzarini-2
yes, that’s expected as k(andx) will downsample the signal. Different ksmps values will be printed because
you are not printing at every k-period. Try using

 printk2 k(andx)

and you will see that it will print the same sequence (and the length of it will be dependent on ksmps)
Using printk 0, k(andx) will have the same result.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 1 Aug 2018, at 13:30, Vincent Michalke <[hidden email]> wrote:
>
> In the following examples i get different results depending on the ksmps value, is this expected behaviour? I thought the a-rate should not be affected by ksmps.
> (Using latest build on ubuntu 18.04)
>  
> instr 1
> andx init 0
> andx += 1
> printk 0.1,k(andx)
> endin
> schedule(1,0,1)
> Csound mailing list [hidden email] 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
[hidden email]
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