Vinyl control Issue, pitch stability

Bug #849464 reported by David Oriot
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Triaged
Medium
Owen Williams
1.10
Won't Fix
Medium
Owen Williams
1.11
Won't Fix
Undecided
Unassigned
2.0
Won't Fix
Undecided
Unassigned
2.1
Won't Fix
Undecided
Unassigned
2.3
Won't Fix
Medium
Owen Williams

Bug Description

The vynil control feature of mixx works quite well at first sight, but using this feature in a real mix or just when listening to songs with lyrics reveals that there's a problem with the vynil control.

The resulting playback pitch, when using vynil control feature, seems to variate (slightly & quickly) sometimes.
I've made the following test setup :

I've generated a wav file, 44100Hz, 16 bits, with a 1KHz genrated sine wave inside.
I've used this track in mixx as current track, playing it with the vynil control feature.
I've recorded mixxx playback with the record feature.

The resulting playback shows that the pitch is not constant (hearable 1KHz tone variations).

I've recorded the signal from the Serato vynil I'm using.
This recording shows that the turntable (SL1200 MKII) is stable, (straight 1KHz)

Recordings of the input vynil & the played sine wave with mixx are in the attached archive.

All the resulting files have been analysed with a spectrum analyser (see jpg files), in order to show the cleanliness of the vynil input sine and the "ugliness" of the output of the played sine wav file with mixx.
Note : The horizontal scale is in Hertz, and the vertical scale (not shown) is time.

Setup :
Pentium-M 1.5GHz / 512 MB RAM (30-45% CPU used by mixxx, 300MB of free RAM)
WinXP SP3
Dedicated laptop to mixxx (no evil resident programs, lightweight windows...)
Beringher UCA202 USB sound card

Tests have been conducted with ASIO4ALL (v2.10) driver AND windows Driver, results are same.
Serato Scratch Live vynils, CV02

Regards,

David

Revision history for this message
David Oriot (david-oriot) wrote :
Revision history for this message
Owen Williams (ywwg) wrote :

What version of Mixxx are you using?

Changed in mixxx:
assignee: nobody → Owen Williams (ywwg)
Revision history for this message
David Oriot (david-oriot) wrote : Re: [Bug 849464] Re: Vynil control Issue, pitch stability

Hello Owen,

I'm using mixxx v1.9, win32.

2011/9/14 Owen Williams <email address hidden>

> What version of Mixxx are you using?
>
> ** Changed in: mixxx
> Assignee: (unassigned) => Owen Williams (ywwg)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/849464
>
> Title:
> Vynil control Issue, pitch stability
>
> Status in Mixxx:
> New
>
> Bug description:
> The vynil control feature of mixx works quite well at first sight, but
> using this feature in a real mix or just when listening to songs with
> lyrics reveals that there's a problem with the vynil control.
>
> The resulting playback pitch, when using vynil control feature, seems to
> variate (slightly & quickly) sometimes.
> I've made the following test setup :
>
> I've generated a wav file, 44100Hz, 16 bits, with a 1KHz genrated sine
> wave inside.
> I've used this track in mixx as current track, playing it with the vynil
> control feature.
> I've recorded mixxx playback with the record feature.
>
> The resulting playback shows that the pitch is not constant (hearable
> 1KHz tone variations).
>
> I've recorded the signal from the Serato vynil I'm using.
> This recording shows that the turntable (SL1200 MKII) is stable, (straight
> 1KHz)
>
> Recordings of the input vynil & the played sine wave with mixx are in
> the attached archive.
>
> All the resulting files have been analysed with a spectrum analyser (see
> jpg files), in order to show the cleanliness of the vynil input sine and the
> "ugliness" of the output of the played sine wav file with mixx.
> Note : The horizontal scale is in Hertz, and the vertical scale (not
> shown) is time.
>
> Setup :
> Pentium-M 1.5GHz / 512 MB RAM (30-45% CPU used by mixxx, 300MB of free
> RAM)
> WinXP SP3
> Dedicated laptop to mixxx (no evil resident programs, lightweight
> windows...)
> Beringher UCA202 USB sound card
>
>
> Tests have been conducted with ASIO4ALL (v2.10) driver AND windows Driver,
> results are same.
> Serato Scratch Live vynils, CV02
>
>
> Regards,
>
> David
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/849464/+subscriptions
>

Revision history for this message
Owen Williams (ywwg) wrote : Re: Vynil control Issue, pitch stability

Can you try vinyl control in version 1.10-beta? You should probably back up your database first if you want to go back to version 1.9, although you might find that 1.10 is much much better. http://builds.mixxx.org/builds/release-1.10.x/

Revision history for this message
David Oriot (david-oriot) wrote :

Here you are some new tests with mixxx v1.10 x86.

The new vinyl control setting interface looks good !

Unfortunately, the results are the same, with some other side effects encountered :

- The unstability is quite the same, the pitch glides regurlarly. but not exactly with the same behaviour :
With mixxx v1.9, the pitch was gliding *around* the nominal pitch (let's say +/- 15%, roughly).
Now, with mixxx v1.10, the pitch varies mostly *above* the nominal pitch (+ 5~6%...)
Please take a look at the spectrum analysis in the attachement.

- Regression in v1.10 Vs V1.9 : The pitch have now a constant offset of about -3% : my 1KHz sine, is now @ ~970Hz when played with the vinyl control.

I've tried to playback the sine wavefile without controling mixxx with the vynil : the pitch recovers it's nominal value (0%).

I also have checked my turntable cartridges, testing with differents needles &/or cartridges, the results are the same.

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

One thing that doesn't quite make sense in your analysis is that the pitch is varying above nominal, but the sine output is measuring low. If the pitch were being interpreted as too fast, it should sound higher, not lower, than 1Khz.

But just in case, I did the same tests you describe. On my turntable (in quartz-lock mode), I do get pitch variation, but it's on the order of ~.20%. Not 20%, 0.20%. So the pitch is hovering in a range of .9990 and 1.001 -- this seems acceptable to me, and makes sense considering the analog and always-warped nature of vinyl. (In the Mixxx UI, this shows up as -0.10 and +0.10.) I get my peak frequency at 998.99Hz -- again, perfectly acceptable.

Looking at your screenshot, I see that the signal shape is warped. It should be a perfect circle, but I'm seeing a lopsided oval. This usually indicates a needle that isn't hitting the record in a level fashion. See if you can get your signal to be circular and see if that helps the problem.

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

vinyl control playing back sine wave, recorded with JACK and ardour2 (not Record Mix feature) and analyzed.

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

a happy vinyl donut. Not perfect, but pretty close.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

It'd be nice to get this one figured out before the 1.10.0 release.

Changed in mixxx:
milestone: none → 1.10.0
importance: Undecided → Medium
Owen Williams (ywwg)
summary: - Vynil control Issue, pitch stability
+ Vinyl control Issue, pitch stability
RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: 1.10.0 → 1.10.1
Revision history for this message
Owen Williams (ywwg) wrote :

I think we've determined that all vinyl control applications have pitch stability issues, but they are simply hiding it from the user. xwax, for instance, rounds pitch to two decimal places, which looks pretty stable. When expressed as BPM, though, a .005 variation in pitch looks like .62 of a BPM, which looks bad. I would like to mark this "won'tfix".

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

I'm happy with our current working explanation but I'll also throw out that it's possible that VC processing could lag since we don't decode timecode in the callback thread -- we decode it in a worker thread. If there are significant delays in processing the timecode then I could see how we could get pitch instability.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

(it would be nice if we could quantify decode lag -- i.e. time from receiving the bytes from the PortAudio callback to taking an action based on those bytes)

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

At the risk of admitting I was wrong, I get pitch instability with Serato CD files played back at bit-for-bit accuracy. So there is something going on deep inside xwax.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hmm, I don't think xwax users do not report problems like this so I think it's unlikely to be a problem with xwax.

We don't do VC work in the callback, we do it in a worker thread. It would be good to quantify the decode lag and see if it varies much over time. The pitch instability could be as simple as variance in when the worker thread gets scheduled.

We start the thread with default priority -- you could experiment with giving it higher priority? Now that everything is in one thread things should be more uniform across the decks, we just need to make sure that data is getting processed at a stable latency.

Or we could switch to doing all VC work in the callback? This would come at a latency hit but ensure consistent timing. I believe xwax does all timecoder work in the callback.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Er, s/do not//.

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

(It turns out that measuring pitch with a 1Khz tone is really difficult. The cycle of the tone is only 44.1 samples, therefore the zero crossings (sign flips from + to - or back) are either 22 or occasionally 23 samples. So the data being fed to xwax is a string of 22s and 23s, and from this it's supposed to generate a smooth signal. And actually the way xwax works is by either feeding the distance since the last crossing, or zero! So actually the signal being smoothed is ,0,0,0,0,0,0,0,0,0,...,0,22,0,0,0,0,0,0,0,0,...,0,23, etc.

I think the best option would be a rewrite of the vinyl control library, but given the rapidly declining popularity of DVS systems and the complexity of the problem there are no plans to do this. (And the natural pitch instability of vinyl is greater than this particular error.)

If someone wants to tackle this problem they are more than welcome.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

More information from DJ Ed, another user who noticed the problem:
When trying to use Vinyl Control, the pitch controller is constantly varying by +/-0.1% ... +/-0.3%.
Thus the playing track's speed is constantly varying by that amount, meaning that tight mixes are not really possible.
The music sounds "instable" (high wow/flutter like cassette tapes in the old days) this being caused by the varying pitch.
(With vinyl control switched off, the playback is rock solid, I never hear any hickups or other sound issues, even on lowest latency).

The timecode signal quality "scope" shows a circle with a constantly (slightly) varying circumference (becoming wider and narrower all the time even while the control cd is playing at normal speed.)

A similar problem is described here:
http://www.mixxx.org/forums/viewtopic.php?f=1&t=4304

The same problem occurs on two completely different systems, and two different Audio interfaces (in all combinations).

System 1: Dell Vostro
                   Windows 7 32bit Enterprise, sp1
                   Intel Core I5 1,70GHz 4GB RAM
                  video: builtin Intel HD Graphics 4000 , resolution 1366x768
System 2: Dell Lattitude E6500
                   Windows 7 32bit Ultimate, sp1
                   Intel Core Duo P8400 2,26GHz, 4GB RAM
                  video: builtin Intel Mobile $ series Express Chipset Family, resolution 1280x800

Mixxx version: 1.11.0

Audio interface: ESI Maya USB44+ , driver v3.5
                               Tascam US-366 , driver v1.02

Pioneer CDJ1000Mk2's with Serato Control CD (image burned from Serato support site), line-out connected to a stereo Line-In pair of the audio interface.

I've tried everything in the manual and troubleshooting guide, Mastertempo on CDJ is off, Correct input volume / gain settings, latency, different inputs, etc.
When recording the timecode signal from the CD player to e.g. Audacity on the computers, makes a perfect rendition of the timecode audio signal.
I haven't tried other timecode sources, as the Serato control CD is the only one that works with Mixxx and I don't own any Timecode Vinyl.

Additional info: When using a virtual audio cable / VBcable as timecode input and then playing the timecode wav file in a media player on the same pc where Mixxx is running, the same continuous variation in the pitchcontrol and timecode "scope" is seen.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

(I've just asked the lead xwax developer to chime in here with some confirmation or guidance as the case may be.)

Revision history for this message
Dj Ed (dj-dj-ed) wrote :

Additional note:
To rule out any hardware issues, I tested the exact same hardware setup with a commercial package V******Dj Home, this works as it should (but only for the first 10 minutes, as you need to buy a license to use Timecode or external controllers).
The timecode scope in that program shows a stable circle and thus music playback is stable too.

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

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.