Hello everyone. In establishing tests for the soft-takeover algorithm, I realized that its desired behavior needs to be explicitly defined. I would like to do that via this thread to get consensus. This initial message is long to acquaint you with all of the details. (As with many things in technology, what is a simple concept is quite complex to implement reliably.)
The purpose of soft-takeover is given in our wiki (http://mixxx.org/wiki/doku.php/midi_scripting#soft-takeover): " To prevent sudden wide parameter changes when the on-screen control [the value of the ControlObject] diverges from a hardware control, use soft-takeover. While it's active on a particular parameter, manipulating the control on the hardware will have no effect until the position of the hardware control is close to that of the software, at which point it will take over and operate as usual. " The algorithm works by looking at the previous and new values from the hardware, how much time has passed between receiving these values, and the current value of the ControlObject in question. I've constructed a truth table that lists every possible combination and whether the new hardware value in each case should be ignored or not. You can view it on the Web here: https://github.com/mixxxdj/mixxx/blob/master/src/test/SoftTakeoverTruthTable.csv - 'Sides' denotes if the previous and new hardware values are on the same or opposite sides of the current CO value. - 'prev distance' is whether the previous HW value is close to (within 3/128 units) or far away from the current value of the CO. It's a way to determine if the previous HW value affected the CO or not. - 'new distance' is whether the new HW value is close to or far away from the current value of the CO - 'new value arrives' is whether the new HW value arrives soon after (within 50ms) or some time after the previous HW value - 'Ignore' is whether or not the new value should be ignored in this case The default action is to use the new hardware value (ignore == FALSE) except when the new value is far from the current CO value. This is the definition of an abrupt jump and the very thing soft-takeover seeks to eliminate. What I'd like for everyone to do now is review that table. If you think a particular combination is incorrect in (not) ignoring its new value, please state which combination and why. I will now do so here for my exceptions to the above-stated defaults using text diagrams of a slider where p is the previous HW value, n is the new one, and pipe (|) is the current CO value: opposite close far soon FALSE ----p|--n-- Ordinarily this would be ignored due to the abrupt jump, but because the new value arrives soon after the previous one and it crosses the current CO value, the user is quickly whipping the control, so we should not ignore the new value. opposite far far soon FALSE --p--|--n-- Same reasoning as above. The crossing of the CO value and the speed at which the new value arrives says this is a quickly-moving control so we should not ignore the new value. same close far soon FALSE ---|p----n- Even though it's an abrupt jump, since the previous HW value affected the CO and the new value arrives soon after that, it's a quickly-moving control so we should not ignore the new value. Thank you for your attention and input. Once we nail down how soft-takeover should behave, we can make sure the tests reflect that behavior (then fix the algorithm if any fail.) Sincerely, Sean M. Pappalardo "D.J. Pegasus" Mixxx Developer - Controller Specialist
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________ 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