Add intelligent phase indicator

Bug #753301 reported by jus on 2011-04-07
This bug affects 18 people
Affects Status Importance Assigned to Milestone

Bug Description

Our Sync button syncs only the tempo, but not the phase.
While this is a separate issue you can currently only adjust the phase of two songs by ear until the beats are aligned.
This is not beginner friendly.

Mixxx misses an intelligent phase indicator (4/4 beat indicator) that indicates where a song is in a 4/4 beat measure.
This would add a visual reference for syncing tracks.

A simple (pseudo) way of doing this now would be to draw every 4th line of the beat grid different/thicker than the rest.

The option to have a separate phase indicator widget would be nice though.

Related branches

jus (jus) on 2011-04-07
description: updated
RAFFI TEA (raffitea) wrote :

I like the idea. Traktor has such a feature which is called "phasemeter".
The feature is especially useful in skins where the waveforms are not on top of each other like the "Deere skin".

RJ Skerry-Ryan (rryan) on 2011-04-09
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: easy weekend
RJ Skerry-Ryan (rryan) on 2011-11-28
Changed in mixxx:
milestone: none → 1.11.0
RJ Skerry-Ryan (rryan) wrote :

Don't think anyone is working on this...

Changed in mixxx:
milestone: 1.11.0 → none
RJ Skerry-Ryan (rryan) wrote :

I think this should be in 1.12 now that we have master sync. Any takers?

I'll be happy to work on it !

RJ Skerry-Ryan (rryan) on 2014-03-18
tags: added: sync
RJ Skerry-Ryan (rryan) wrote :

The bug description sounds like Bug #888810 but Tobias's comment in #1 is referring to the sync offset. Now that we have master sync I think visualizing your "offset" from the master is quite useful if your beatgrids are correct. This will also visualize what the "quantize mode" sync adjustment of master sync is doing.

junglistric (ericzhang) wrote :

I'd be happy to work on it. Please let me know.

Daniel Schürmann (daschuer) wrote :

Cool, what is your plan? Do you have a powerful development environment?
This link should help to set one up.

Here some ideas:

To solve this bug, we need a bunch of smaller changes in Mixxx.

We need a way to store downbeats in our BeatGrid and BeatMap classes.
Please keep in mind that only "most" music has a 4/4 measure.

We need a way to render downbeats on the waveform.

We need to investigate if the is a way to detect downbeats (bars).

I think the code is in place to detect the phase offset between beats. You may extend this to get the downbeat offset.

The phase indicator widget, can base on the slider widgets. This can connect to a new phase ControlObject.
Unfortunately we need a high update rate for this, similar to the spinny or the Waveform display.
So you may consider to integrate the phase indicator to the spinny or the waveform.

A GUI Mockup could be helpful to discuss, a scribble with you favorite drawing tool would be fine.

We need a method (workflow) to add the downbeat infos to the track metadata.

It would be great, if we where able to add an auto downbeat detection.
So a research about it would also help a lot.

There is currently a related PR waiting for review.
Reading this will help to get into the code. And I would be happy about any comment and test.

You see a lot of places to start. :-)

If you have some other ideas, fine.
Just ask, so that we can give you a helping hand.

junglistric (ericzhang) wrote :

Cool, I have done beat and tempo detection, though I need to use the FFT so it will probably need some sort of FFT library to be incorporated. I've worked with Xcode in OSX.

Due to other incoming commitments I'm not sure how much time I have to work on this, but I'll keep you posted.

RJ Skerry-Ryan (rryan) wrote :

Hi junglistric -- BTW we have a "bar and beat tracker" algorithm checked into our codebase from the Queen Mary university which could be used as a starting point for a phase meter:

We don't currently use it, so part of the work would be to run that analysis as part of our "analyzer queue" and then plumb the results of the analysis into other parts of Mixxx (i.e. the UI for display and the master sync code to inform synchronization).

The algorithm is described here:

The plugin already computes the FFT so if you'd like to develop your own approach you could reuse some of that code.


Daniel Schürmann (daschuer) wrote :

> Due to other incoming commitments I'm not sure how much time I have to work on this, but I'll keep you posted.

Don't stress yourselves. We can merge your work whenever it is finished.

To answer you original question: libfftw3-double3

Mixxx is already linked to it via rubberband. However using an established QM plug-In seams to a good approach.

Be ( wrote :

As far as I can tell there are no libraries available that implement beats-per-measure detection. Without that, a phase indicator would have to assume a number of beats per measure (4 would be the most sensible default), which would inevitably be wrong sometimes. If we cannot automatically detect the beats-per-measure, we could at least implement a way for users to manually define that for a track.

Be ( wrote :

The Queen Mary Bar and Beat Tracker algorithm takes the beats-per-bar as a parameter; it does not compute that.

Winko (winko) wrote :

As a DJ I would love to see the number of beats (beat-grid lines) that I spin forward or backwards from the moment that I start spinning forward or backwards. It would be nice to see the number in the center of the spinners section (+# or -#). Because it would make mixing process so much easier and faster as you don’t have to worry about counting beats, while there so many other things going on.

tags: added: beatgrid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints