'Reset key' doesn't work if a track doesn't have a key entered

Bug #1748001 reported by Benis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Benis

Bug Description

As above really. (Almost) none of the tracks in my library have any key information. For those that don't, pitch reset doesn't work, meaning I'm stuck if I've adjusted the pitch by an unknown fraction of a semitone (for example) and want to revert it.

In addition, the downward micro-adjustment for pitch doesn't work with or without a key set, but upward does.

This is in 2.1, r6510 currently.

Benis (beenisss)
description: updated
Benis (beenisss)
description: updated
Benis (beenisss)
description: updated
Revision history for this message
Benis (beenisss) wrote :

Looks like there are two separate issues here.

Regarding the small pitch adjustment buttons, if I run Mixxx in developer mode and hover over the buttons, the Up button has these characteristics:

LeftConnection:[Channel1],pitch_up Parameter: 0 Value: 0 Direction: FROM_AND_TO_WIDGET Emit: PRESS_AND_RELEASE
RightConnection:[Channel1],pitch_up Parameter: 0 Value: 0 Direction: FROM_WIDGET Emit: PRESS_AND_RELEASE
DisplayConnection:[Channel1],pitch_up Parameter: 0 Value: 0 Direction: FROM_AND_TO_WIDGET Emit: PRESS_AND_RELEASE

Whereas the Down button only has:
LeftConnection:[Channel1],pitch_down Parameter: 0 Value: 0 Direction: FROM_AND_TO_WIDGET Emit: PRESS_AND_RELEASE
DisplayConnection:[Channel1],pitch_down Parameter: 0 Value: 0 Direction: FROM_AND_TO_WIDGET Emit: PRESS_AND_RELEASE

Will update on the other issue once I get my head around Eclipse.

Changed in mixxx:
assignee: nobody → Benis (beenisss)
Revision history for this message
Benis (beenisss) wrote :

The issue with the pitch_down button is specific to the Tango skin.

The reset key issue is not.

Revision history for this message
Benis (beenisss) wrote :

Gonna log a separate bug for the pitch_down button issue as it actually affects both the key and the rate buttons.

Revision history for this message
Benis (beenisss) wrote :

I've been playing around with the Shade skin and it has changed my understanding of this issue a little.

Obviously all the skins have push buttons for changing the key independent of tempo. The Shade skin also has fine- and coarse-adjust sliders, and right-clicking on coarse adjust resets the key of the track. This works without the track having a key set.

If the track does have a key set, then this right-click action does the same thing as right-clicking the Sync Key button.

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

So do we still have an issue?
Can you describe what you do, what happens and what should happen?

Revision history for this message
Benis (beenisss) wrote :

It kinda depends what was in mind when the skins/key control code was written.

Basically, the key reset action resets the pitchRatio value to 1.0. On the Shade skin you can do this by right-clicking the coarse-adjust key slider, or by right-clicking Sync Key to reset it. However (and this is true for all skins) reset using the Sync Key button only works if the track has a key set. I don't know if this is intentional or not - I can sort of see the justification for it working this way, but given that you can reset the pitchRatio value without a track key being present (and the effect is identical with or without), it's kind of a pain that the button action only works for tracks with a key, when none of the other skins have a key slider.

The reason I originally raised this issue is that almost none of my tracks have key information and this makes it difficult to use reset. I actually want the reset behaviour to do something different (reset pitchTweakRatio to 1.0 rather than resetting pitchRatio) but I figured this issue (if it's considered valid) should be dealt with first.

There's also been some discussion on this in the key manipulation stream on Zulip:
https://mixxx.zulipchat.com/#narrow/stream/109122-general/topic/Key.20manipulation

As a side note, the response areas for manipulating the key sliders on Shade aren't aligned properly - in the attached screenshot the white boxes indicate the area where the skin responds to a click and drag action. Obviously this should be a few pixels lower in each case (which matters as the sliders are tiny.) I will have a look at this at some point if somebody else doesn't get to it first.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 2.1.2
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Do you wish to fix the bug yourselves, as it is assigned to you?
https://github.com/mixxxdj/mixxx/blob/201987e36da5b2da7781c9a02dd37b3b46520bb5/src/engine/keycontrol.cpp#L371
Is the effected line. Here we need something more intelligent, considdering the current rate and temp settings.

Revision history for this message
Benis (beenisss) wrote :

Yes, I've been looking at it and was planning to fix it.

Revision history for this message
Benis (beenisss) wrote :

By far the simplest way to resolve this seems to be just removing these lines from the `setEngineKey` code:

```
    if (thisFileKey == mixxx::track::io::key::INVALID ||
        newKey == mixxx::track::io::key::INVALID) {
        return;
    }
```

Removing it fixes the issue and doesn't appear to break anything else. I can't see any ill effects of running setEngineKey when the file or destination key are zero.

Have commented in more depth on Zulip: https://mixxx.zulipchat.com/#narrow/stream/109171-development/subject/Reset.20key.20button.2Ftracks.20with.20no.20key/near/130053817

Benis (beenisss)
Changed in mixxx:
status: Confirmed → Fix Committed
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/9126

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.