Quantized loops start one beat too early when being exactly on the beat

Bug #1313063 reported by Marco Angerer
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
RJ Skerry-Ryan

Bug Description

When your play position is exactly on the beat and you want to prepare a loop (deck is not playing) with the quantize-option activated, the beginning of the loop will be one beat too early.
This seems to happen at > 50% of all songs.

Steps to reproduce the problem:
1. Activate the quantize-option (magnet)
2. Set a HotCue on any beat
3. Go to this HotCue
4. Start a loop >= 1 -> will start one beat too early

I use Mixxx 1.12.0 alpha on Ubuntu 14.04 with an Intel Core i5

Marco Angerer (hektikr)
description: updated
summary: - "Magnetic" loops start one beat too early when being exactly on the beat
+ Quantized loops start one beat too early when being exactly on the beat
Marco Angerer (hektikr)
description: updated
Revision history for this message
Owen Williams (ywwg) wrote :
Changed in mixxx:
assignee: nobody → Owen Williams (ywwg)
importance: Undecided → Medium
status: New → In Progress
milestone: none → 1.12.0
Revision history for this message
Marco Angerer (hektikr) wrote :

GOT IT:

replace ll. 146 ff. in beatgrid.cpp with

double beatFraction = (dSamples - firstBeatSample()) / m_dBeatLength;
    double prevBeat = floorf(beatFraction);
    double nextBeat = ceilf(beatFraction);

    // If the position is within 1/100th of the next or previous beat, treat it
    // as if it is that beat.
    const double kEpsilon = .01;

    if (fabs(nextBeat - beatFraction) < kEpsilon) {
     beatFraction = nextBeat;
     //but now we have to update prevBeat
     prevBeat = nextBeat;
    } else if (fabs(prevBeat - beatFraction) < kEpsilon) {
     beatFraction = prevBeat;
     //in this case nextBeat has to be updated
     nextBeat = prevBeat;
    }

Revision history for this message
Marco Angerer (hektikr) wrote :
Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
Owen Williams (ywwg) wrote :

the bug isn't committed until we accept the pr

Changed in mixxx:
status: Fix Committed → In Progress
Revision history for this message
Marco Angerer (hektikr) wrote :

I'm new, so: Uups ;)

When do you normally accept pull requests? When Mixxx 1.12 will be released?

Revision history for this message
Owen Williams (ywwg) wrote :

One of the other developers will take a look at the pull request and decide if the fix is good. I wouldn't worry about making it in to the next release.

Owen Williams (ywwg)
Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

This is still present for BeatMaps -- I'll work on it.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

(I mean I have a fix in progress)

Owen Williams (ywwg)
Changed in mixxx:
status: Fix Committed → Confirmed
Revision history for this message
Owen Williams (ywwg) wrote :

@rryan any progress on the beatmap fix?

Changed in mixxx:
assignee: Owen Williams (ywwg) → RJ Ryan (rryan)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
Changed in mixxx:
status: Confirmed → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7450

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.