Add intelligent phase indicator

Bug #753301 reported by jus
118
This bug affects 33 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned

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)
description: updated
Revision history for this message
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)
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: easy weekend
RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 1.11.0
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

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

Changed in mixxx:
milestone: 1.11.0 → none
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

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

Revision history for this message
Quentin FAIDIDE (quentinfaidide) wrote :

I'll be happy to work on it !

RJ Skerry-Ryan (rryan)
tags: added: sync
Revision history for this message
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.

Revision history for this message
junglistric (ericzhang) wrote :

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

Revision history for this message
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.
http://www.mixxx.org/wiki/doku.php/bugfix_workflow

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.
https://github.com/mixxxdj/mixxx/pull/812
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.

Revision history for this message
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.

Revision history for this message
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:

https://github.com/mixxxdj/mixxx/blob/master/vamp-plugins/plugins/BarBeatTrack.h

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:
http://vamp-plugins.org/plugin-doc/qm-vamp-plugins.html#qm-barbeattracker

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

Cheers,
RJ

Revision history for this message
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.

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Revision history for this message
Be (be.ing) 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.

Revision history for this message
Be (be.ing) wrote :

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

Revision history for this message
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
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/5852

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

Related blueprints

Remote bug watches

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