Csound Csound-dev Csound-tekno Search About

[Csnd] tempo accuracy

Date1999-11-11 12:48
FromvanDongen/Gilcher
Subject[Csnd] tempo accuracy
I'm working with the tempoopcode, to create a tempo instrument (so I can 
make tempo changes other than linear accellerando and have a global tempo 
variable for delay-times etc.)

This is a little test orc+sco
It should generate 16 notes in 10 seconds, going from 60 to 120 bpm, the 
16 th note at exactly 10 seconds.

sr		=		44100
kr		=		4410
ksmps	=		10
nchnls	=	1	

instr 1
kbps	line 1,10,2
     tempo 60*kbps,60
endin


instr 2
a1	pluck	10000,220,220,0,3,.3
	  out a1
endin


i1 0 15
i2 0 1
i2 +
i2
i2
i2
i2
i2
i2
i2
i2
i2
i2
i2
i2
i2
i2
e

the note amplitude's when rendering are given like this,

.....
B 10.000 .. 11.000 T 11.000 TT 11.000 M:   9983.2
B 11.000 .. 12.000 T 12.000 TT 12.000 M:   9989.3
B 12.000 .. 13.000 T 12.538 TT 12.538 M:   9960.9
B 13.000 .. 14.000 T 14.000 TT 14.000 M:   9996.9
B 14.000 .. 15.000 T 14.509 TT 14.509 M:   9964.0
B 15.000 .. 16.000 T 15.496 TT 15.496 M:   9974.1

Which may have to do with the 'uninterpret score beats' flag neccesary 
for the orc.
It does render an accellerando from 60 bpm to about 120.
It is however inaccurate. In this case rather minor (the last note is 
about .33 seconds to late) but with a larger score of about 5 minutes 
this adds up.

If the beats-per-second is a function: bps=f(t), shouldn't the total 
number of beats in time T be the intergration of f(t) of period T? 
Which in the above example gives exactly 15 beats in 10 seconds. 
Is my math wrong or is the some inaccuracy in csound, in my case 3.58 ppc 
(macintosh)

regards

Gerard van Dongen




--