>> i must be missing something or do both of you assume the song tempo is
>> constant?
>
>  Of course not :)   Every time the tempo changes, I change
>usec_per_tick.  That's the only thing that needs to change.  You keep
>track of your current position, the time of the last beat (24ppq pulse,
>and only the last pulse), and that's it.

softwerk is a little different. first, song tempo *is* constant, since
there isn't really a tempo in the usual MIDI sense. and secondly,
softwerk has at least 2 distinct levels of timing:

         internal-clock ticks
         gate and interval units

i don't use the tired, worn out western notions of notes, bars, beats
etc ;) 

>> i use double as the type of real time mostly out of laziness; do you
>> think there is too much computational overhead? one could switch to
>> uint.uint then. i don't even have an idea how many cycles a double /
>> takes ...

on x86, double is typically measured as adding about 6% to the cost in
a program that is already very float-math heavy.

--p

Reply via email to