hot cue causes tempo re-adjust with vinyl control

Bug #1424898 reported by Erikmjacobs
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Owen Williams

Bug Description

Running Mixxx master: 835dc24168a9ba076d6534cbb073dd9aa299ee1b
Linux localhost.localdomain 3.17.8-300.fc21.x86_64 #1 SMP Thu Jan 8 23:32:49 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
EBOX44
Pioneer CDJ-800
Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
Asus H97M-E motherboard
MSI Radeon R6950

Set up:
1) Follow vinyl timecode setup per documentation
2) load track into deck #1
3) Set a hot cue on deck #1 (eg: Z)

Steps to reproduce:
1) Play the CDJ so that deck #1 starts playing
2) Listen for a moment
3) Press Z to return to your hot-cue

For about 500ms the pitch on the playing track is adjusted up, and then comes back to normal.

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

can't reproduce -- I don't own a CDJ but piping the serato CD audio into mixxx and jumping around, I can't reproduce this. I think we talked on IRC about maybe getting a desktop recording, I think I'm going to need that to figure out what's going on.

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

I'm basically using this exact setup:

http://mixxx.org/manual/latest/_images/mixxx_setup_timecode_cdj.png

I have the output of my physical mixer plugged into the microphone input of the computer and playing through the speakers attached to the computer, although connecting the speakers directly to the mixer makes no difference in this scenario.

No problem on a recording -- can you be super specific about how you want me to record and what?

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

Just a recording of what you describe -- pick a track with a steady chord so we can easily hear the pitch variations, and show various combinations of stop-start-hotcue etc. Only needs to be 15 seconds long, probably.

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

Need to figure out how to record the audio and video simultaneously with recordmydesktop. We'll see!

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

I cannot figure out how to get the audio to record with recordmydesktop. I tried via the CLI and with gtk-recordmydesktop.

I also tried with both directing Mixxx's output (Master) to my default sound device, as well as using the microphone input on my computer.

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

cell phone video would be fine too :)

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

I noticed that this only occurs when key locking is set.

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

So, I should clarify -- when key locking is enabled, the pitch bends are MUCH MORE noticeable.

When key locking is disabled, the pitch bends are not all that noticeable except at extreme adjustment levels (eg 10% or more).

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

aha that helps, I'll see if I can figure out what's going on.

Revision history for this message
Owen Williams (ywwg) wrote :
Changed in mixxx:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Owen Williams (ywwg)
milestone: none → 1.12.0
Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

Still appears to be happening.

Commit: 3ff82f7bc1d585c0a19b8cdcfb05533a0ff10a1f
git log shows your PR is in here.

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

And you're sure you rebuilt? :). I see the play button turning off when you push hotcue, which was causing the problem before. Can you try editing src/vinylcontrol/steadypitch.cpp and change this block:

if (resyncDetected(time))
    {
        m_dLastTime = time;
        // Rereport the last value since we don't want to interrupt steady
        // pitch in case of resync due to looping or cuepoints.
        if (fabs(pitch - m_dSteadyPitch) < m_dPitchThreshold)
        {
            //fabricate an old time by take current time and applying
            //last known duration
            m_dSteadyPitchTime = time - (m_dLastSteadyDur * m_iPlayDirection);
            return m_dLastSteadyDur;
        }
        reset(pitch, time);
        return 0.0;
    }

so it has a couple debug statements?:

if (resyncDetected(time))
    {
        m_dLastTime = time;
        // Rereport the last value since we don't want to interrupt steady
        // pitch in case of resync due to looping or cuepoints.
        if (fabs(pitch - m_dSteadyPitch) < m_dPitchThreshold)
        {
            //fabricate an old time by take current time and applying
            //last known duration
            m_dSteadyPitchTime = time - (m_dLastSteadyDur * m_iPlayDirection);
            qDebug() << "reporting artificial time";
            return m_dLastSteadyDur;
        }
        qDebug() << "unsteady, resetting";
        reset(pitch, time);
        return 0.0;
    }

and then try it (no need for a recording)

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

Sorry, I'm a dummy. I pulled the latest code but forgot to recompile. I have been living in RPM/script land for too long. I'll try it again in a bit :)

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

OK, when hitting a hot-cue button this works perfectly - no pitch change.

When starting from pause there is still sometimes a pitch change, but I'm not sure if that's "working as intended" due to Vinyl actually doing that IRL...

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

the "steady pitch" code needs a certain amount of ramp-up before it's convinced the pitch is steady. This is so you can scratch the record without strange audio artifacts. Also note that in the newest versions of the code, if you use Rubberband for keylock it might reduce the pitch wobbling even more.

Maybe I can make the code more responsive for CDJs, since those should be good enough to support instant-start.

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

OK I tweaked the code so that when using a CDJ, it assumes the pitch is steady and there should no longer be a delay before the correct keylock pitch engages. However there is still latency when starting from zero because xwaxlib needs to read a buffer or two before it knows how fast the CD is playing -- so if you want that instant start it's still better to loop your in point, raise the fader, and disable the loop, rather than try to bang the play button at just the right time.

Revision history for this message
Erikmjacobs (erikmjacobs) wrote :

Seems like it's working really good now. Thanks!

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/7872

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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