akanik
12-08-2007, 07:23 PM
Currently, I'm working on a 16 step sample sequencer in flash CS3.
I'm using the following code to execute a function which plays the
appropriate samples. This function is called based on the tempo, which
is set by the user. The value of 150 is not static.
...
var metronome:Timer = new Timer(150,0);
metronome.addEventListener(TimerEvent.TIMER,playSt eps);
...
Problem is, the timer is totally inaccurate. You can audibly hear it speeding up and slowing down the execution times, rendering my project frustratingly useless.
Is there an alternative method (ANY POSSIBLE WAY) to execute my function at small millisecond intervals without this ridiculous inaccuracy in timing?
This is for a final project and is the ONLY remaining issue with the program.
Thanks for ANY help.
- Nick
I'm using the following code to execute a function which plays the
appropriate samples. This function is called based on the tempo, which
is set by the user. The value of 150 is not static.
...
var metronome:Timer = new Timer(150,0);
metronome.addEventListener(TimerEvent.TIMER,playSt eps);
...
Problem is, the timer is totally inaccurate. You can audibly hear it speeding up and slowing down the execution times, rendering my project frustratingly useless.
Is there an alternative method (ANY POSSIBLE WAY) to execute my function at small millisecond intervals without this ridiculous inaccuracy in timing?
This is for a final project and is the ONLY remaining issue with the program.
Thanks for ANY help.
- Nick