Csound Csound-dev Csound-tekno Search About

[Csnd] Accumulate a-rate variables

Date2018-08-01 13:30
FromVincent Michalke
Subject[Csnd] Accumulate a-rate variables
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)


Date2018-08-01 13:42
FromVictor Lazzarini
SubjectRe: [Csnd] Accumulate a-rate variables
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  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 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