-
February 21st, 2014, 07:55 PM
#1
Accurate timer needed for drum sequencer
Hi. I am developing a drum sequencer using VB.net but having trouble with the accuracy of the timing. I've tried the Forms timer, the System timer and I'm now using the Threading version, which I'm timing against a Stopwatch. The only other option I've found is the QueryPerformanceCounter, but that would require polling, which would be a nightmare. At 120 beats per minute, there are 125 milliseconds between beats. This seems to work out most of the time, then there are a couple at 140, which I don't understand. I'm completely new to multithreading, although I've learnt a lot from my mistakes over the last month or so. If anyone knows of a way of getting super-accurate timing, but in a Timer-type environment, using events, please let met know. Or some way of conditionally increasing the priority of the Threading.Timer.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|