Visualize distance / closeness to a key when pitch shifting.

Bug #1258624 reported by RJ Skerry-Ryan
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Nicu Badescu

Bug Description

Right now we just snap to the nearest key when pitch adjusting. We should give some feedback on how far you are between the keys.

Tags: key
RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 1.12.0
status: New → Confirmed
importance: Undecided → Medium
tags: added: key
Revision history for this message
Nicu Badescu (badescunicu) wrote :

I want to give this a try. Can you give me some further details? I don't fully understand what I'm supposed to do.

Thank you!

Revision history for this message
jus (jus) wrote :

The `visual_key` widget displays the current musical key of the loaded track after pitch shifting. But you down know, how far you are away from the estimated (`original`) musical `key` of the track.

I understand, that the goal is to simply translate the `visual_key` <-> `key` distance and print a value between -12 and + 12 to a widget. The value represents, how many semitones you are away from the original musical key of the loaded track.
Western style music is divided into 12 equally spaced semitones (1 semitone=100 cent).

Some programs allow you to adjust the key in fines steps ( in the cent range, see above), but in Mixxx the `pitch` control allows to changes the key in 12 steps down to an octave lower, and in 12 steps up to an octave higher.

E.g. if a track is in the key of `C`, a `key_distance` widget could translate to:

  C Db D Eb E F Gb G Ab A Bb B C Db D Eb E F Gb G Ab A Bb B C
-12|-11|-10|-09|-08|-07|-06|-05|-04|-03|-02|-01|+-0|+01|+02|+03|+04|+05|+06|+07|+08|+09|+10|+11|+12

Revision history for this message
jus (jus) wrote :

Sorry, my nice example is misaligned.
Hope it is useful though. Base C is supposed to be +-0, lower C=-12, higher C=+12

Lauchpad formatting is just awful...

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi Jus, what is the use case for your idea of a key distance widgets?

For me, an slightly different display would be more useful.

If you have an C track in deck 1 and a key shifted track to C in deck 2, you have not indicator other then you ears when the shifted track is at full C.

For now we assume that all tracks are recorded at a full key with a standard concert pitch at A440. So it would be possible to add a distance display in cents to the key value like
C (+13 ¢)
This way you you are sure that you are not off tune if you pitch the track to a displayed value of
C (±0 ¢)

For reference see the discussion in https://github.com/mixxxdj/mixxx/pull/47

Changed in mixxx:
assignee: nobody → Nicu Badescu (badescunicu)
Owen Williams (ywwg)
Changed in mixxx:
milestone: 1.12.0 → 1.13.0
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi Nicu,

do you make progress in this? Do you need help?
For me this is essential for the harmonic mixing use case.
Maybe this can slip to 1.12 if we have a solution soon.

Thank you,

Daniel

Revision history for this message
Nicu Badescu (badescunicu) wrote :

Hello Daniel,

I am very sorry for taking so long on this. I've been busy with the GSoC proposal for Cover Art Support recently.
If you give me one more week I promise I'll do my best to implement this feature.

I took a look on the code, I've found the part responsible for the visual_key, but I can't find a way to visualize it on the skin.
Is there a preference I should activate?

Thanks for your patience,
Nicu Badescu

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi Nico,

I am not sure where you get stucked exactly. Yo might want to do a pull request, This way we can discuss you changes even if they are unfinished.

What is the way you try to solve it? Will it be part of the
https://github.com/mixxxdj/mixxx/blob/master/src/widget/wkey.cpp

You find a skin featuring the key widget here:
https://github.com/mixxxdj/developer_skins/blob/master/Deere1366x768-WXGA-master-sync-key/skin.xml

Just clone the whole repository to your res folder and start Mixxx with
./mixxx --resourceParth res --developer

Revision history for this message
Nicu Badescu (badescunicu) wrote :

I've managed to use the developer skins and see the visual key widget.

I have also read through this pull request (https://github.com/mixxxdj/mixxx/pull/47) and
implementing this feature is harder than it appears.

Is this a good starting point? The KeyUtils::scaleKeyOctaves method?
https://github.com/mixxxdj/mixxx/blob/master/src/track/keyutils.cpp#L236

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Yes! It is.

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
Nicu Badescu (badescunicu) wrote :

Fix commited. See https://github.com/mixxxdj/mixxx/pull/215 for reference.

Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
milestone: 2.1 → 1.12.0
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/7215

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.