do you facing a specific issue? Here how it works: The new value is stored almost immediately in the global atomic double. A latency and jitter comes in when we look at the threads. Let's look at the midi wheel to audio sample pass: The midi values are sampled in a 1 ms (5 ms Linux) cycle. MIDI supports rates up to 0.32 ms. This means a steady wheel turn of a high speed midi device results in a buffer of 15 midi messages that are processed at once. (unfortunately the midi timestamp is ignored) the result is stored into the COs immediately waiting for the audio thread which consumes the value every 23 ms (default audio buffer size). If the engine thread is not scheduled before the midi thread runs again the Co value is overwritten by a new one. The routing samples are passed through on or two extra threads (depending on the API implementation. Which introduces another delay of > 23 ms.
How to improve It: -sync the midi thread with the engine thread to eliminate the random jitter. -Take the midi timestamp into account to calculate the wheel speed And acceleration. - Add a filter like we have for mouse scratching that removes the remaining jitter bits from the calculated values. We have currently an other Issue: Let's say you want to play a track for 10 ms. You press play and pause on the controller. Now it depends on the schedule moment of the engine thread if the track is played 23 ms or not. In case play and pause are processed between a engine callback play is overwritten by pause. IMHO this behaviour is correct in this case. If we need follow every Co change the consumer can register a change callback. In this case every single change (or update if you wish) is delivered either as a direct callback or queued on the threads qt message queue. Kind regards, Daniel
------------------------------------------------------------------------------
_______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel