Hi!
I was wondering if there is any undocumented script control or method
that I could use to implement a beatjumping functionality to jump the
playhead by one beat forward or backwards in a way similar to how Torq
does it. I have not found a control to do this, so I have tried to do
this on the script by computing:
rate' = 1 + rate * rateRange
playposition' = playposition + 60 * rate' / delta / bpm / duration
Where "delta" is the number of beats we want to jump and the rest are
the standard Mixxx controls.
First thing that I have noticed is that there seems to be a rounding
error that make the play position disalign forward from the beatgrid
when pressing the button several times. I have fixed this problem by
replacing the 60 by 59.9, but, depending on the file, it still gets a
bit forward or backwards when pressed several times.
The second problem with this aproach is that properly synced tracks get
quickly off when applying this operation while they play. This seems to
be so because the play position is not compensated when setted taking
into account the time spent during the computation of the script. This
have got a bit better, yet way from perfect, by adding the following
correction:
if play
playposition'' = playposition + latency / 1000.0 / duration
Because of all these problems, I would like to know:
1. Is there any undocumented control or engine function that would let
me better implement this function?
2. Does anybody know why I get this rounding errors in the non-playing
case? A error that size seems to me that it is clearly not a problem of
this floating point computation, but some offsetting that is applied to
the playing position in the engine when set.
3. Should we modify the playposition control such that it compensates
the elapsed time when set, or add a delta_playposition control instead
for these purposes?
Thanks!
JP
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel