Open mixxxbot opened 2 years ago
Commented by: david-oriot Date: 2011-09-13T22:01:00Z Attachments: [Wav files of the vynil input signal & playback of a sine wav by mixx + spectrum analysis](https://bugs.launchpad.net/mixxx/+bug/849464/+attachment/2399808/+files/Wav files of the vynil input signal & playback of a sine wav by mixx + spectrum analysis)
Commented by: david-oriot Date: 2011-09-14T07:03:18Z
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
Commented by: ywwg Date: 2011-09-14T11:48:27Z
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/
Commented by: david-oriot Date: 2011-09-14T20:07:31Z Attachments: [20110914 - Mixxx v1.10 vynil control issue.rar](https://bugs.launchpad.net/mixxx/+bug/849464/+attachment/2404432/+files/20110914 - Mixxx v1.10 vynil control issue.rar)
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.
Commented by: ywwg Date: 2011-09-15T23:33:54Z
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.
Commented by: ywwg Date: 2011-09-15T23:35:14Z Attachments: [analysis of sine wave](https://bugs.launchpad.net/mixxx/+bug/849464/+attachment/2410252/+files/analysis of sine wave)
vinyl control playing back sine wave, recorded with JACK and ardour2 (not Record Mix feature) and analyzed.
Commented by: ywwg Date: 2011-09-15T23:38:33Z Attachments: [correct vinyl signal](https://bugs.launchpad.net/mixxx/+bug/849464/+attachment/2410253/+files/correct vinyl signal)
a happy vinyl donut. Not perfect, but pretty close.
Commented by: rryan Date: 2011-09-30T22:49:03Z
It'd be nice to get this one figured out before the 1.10.0 release.
Commented by: ywwg Date: 2012-05-07T13:57:52Z
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".
Commented by: rryan Date: 2012-11-21T18:41:56Z
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.
Commented by: rryan Date: 2012-11-21T18:42:22Z
(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)
Commented by: ywwg Date: 2013-10-12T17:36:32Z
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.
Commented by: rryan Date: 2013-10-13T19:11:58Z
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.
Commented by: ywwg Date: 2014-09-13T17:26:44Z
(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.
Commented by: Pegasus-RPG Date: 2014-09-13T17:55:59Z
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.
Commented by: Pegasus-RPG Date: 2014-09-13T18:03:26Z
(I've just asked the lead xwax developer to chime in here with some confirmation or guidance as the case may be.)
Commented by: dj-dj-ed Date: 2014-09-15T07:17:14Z
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.
Reported by: david-oriot Date: 2011-09-13T22:01:00Z Status: Triaged Importance: Medium Launchpad Issue: lp849464 Attachments: [Wav files of the vynil input signal & playback of a sine wav by mixx + spectrum analysis](https://bugs.launchpad.net/bugs/849464/+attachment/2399808/+files/Wav files of the vynil input signal & playback of a sine wav by mixx + spectrum analysis), [20110914 - Mixxx v1.10 vynil control issue.rar](https://bugs.launchpad.net/bugs/849464/+attachment/2404432/+files/20110914 - Mixxx v1.10 vynil control issue.rar), [analysis of sine wave](https://bugs.launchpad.net/bugs/849464/+attachment/2410252/+files/analysis of sine wave), [correct vinyl signal](https://bugs.launchpad.net/bugs/849464/+attachment/2410253/+files/correct vinyl signal)
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