[Csnd] sprintfk
Date | 2011-08-17 09:22 |
From | Rene Jopi |
Subject | [Csnd] sprintfk |
Attachments | sprintfk.csd |
Hi list, What I am doing wrong ? I was expecting this csd to print : Value of knb : 1 -> but it prints only this line ! Value of knb : 2
Value of knb : 3 Value of knb : 4 Value of knb : 5 Value of knb : 6 <CsoundSynthesizer> <CsOptions> -dm0 -odac -+rtaudio=null -+rtmidi=null
</CsOptions> <CsInstruments> instr 1 knb line 1.1, p3, 6.1
String sprintfk "Value of knb : %d \n", knb
ktrig metro 1
puts String, ktrig endin </CsInstruments> <CsScore>
i 1 0 10 </CsScore> </CsoundSynthesizer> I am on Ubuntu... Cheers, Rene
|
Date | 2011-08-17 10:24 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] sprintfk |
This should do it. instr 1 knb line 1.1, p3, 6.1 String sprintfk "Value of knb : %d \n", knb ktrig = int(knb) puts String, ktrig endin best
Oeyvind 2011/8/17 Rene Jopi <rene.jopi@gmail.com> Hi list, |
Date | 2011-08-17 11:05 |
From | Rene Jopi |
Subject | Re: [Csnd] sprintfk |
Hi, But in my example ktrig is changing every second, so puts should print more than one line. Cheers, Rene
2011/8/17 Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no>
|
Date | 2011-08-17 11:27 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] sprintfk |
IIRC puts needs the value to actually change Not only from zero to 1, but that the nonzero value needs to be new, ... I might be wrong... you could test kcount init 0 ktrig metro 1
kcount = kcount + ktrig then use kcount as the trigger variable to puts Oeyvind 2011/8/17 Rene Jopi <rene.jopi@gmail.com>
|
Date | 2011-08-17 11:45 |
From | Rene Jopi |
Subject | Re: [Csnd] sprintfk |
Working too, you are right :) Thanks, Rene 2011/8/17 Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no>
|