3 ms·
You need an accurate timing resolution of less than 1ms for useful groove nudging, and it's really tough to get PCs or Macs to be that precise on any OS. If yo
by TheOtherHobbes 11y ago
You need an accurate timing resolution of less than 1ms for useful groove nudging, and it's really tough to get PCs or Macs to be that precise on any OS.
If you use a high level language like Ruby, js, or Python the actual timing will be randomised anyway.
For maximum accuracy you need a low level scheduler written in C++ with a few special tricks. Of you can farm out the timing to something like JUCE - which isn't quite perfect, but is good enough for most applications.
- pierrec 11y agoIt seems you're forgetting that everything is buffered and all events are timecoded. This is how pretty much all music software works, and it means the final audio is synchronized down to sample precision, regardless of any hardware latency. If the hardware is too slow and you're doing realtime, the audio will stutter, but this doesn't affect timing precision within the audio stream. For example, when a VST plugin is asked to process a block of audio, it receives a buffer and an array of events with their exact positions in the buffer. All components are connected to each other in this manner. So even if you're using a slow language, timing will definitely not be randomized, though perhaps, as you add more code, you will reach the point where it's too slow for realtime slightly earlier than if you were using a highly efficient compiled language.
- earlz 11y agoRegardless of the complications of real-time audio with Ruby, I wasn't intending that. I was talking about generating MIDI files (with very fine resolution timing) and then playing back the already generated MIDI files, so I had no worries about that. I was only trying to figure out an easier way than drawing on a piano roll