Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: ASIO/WASAPI: Can I detect when a vinyl player starts playing? (Read 2112 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ASIO/WASAPI: Can I detect when a vinyl player starts playing?

(Sorry if this fits better in "Audio Hardware". Feel free to move it if it does.)

I am currently planning to develop my first HA-relevant application which has something to do with vinyl players. Given that my general audio knowledge is less than optimal, I wonder if a regular USB-capable audio player sends some kind of "signals" when it starts playing, so Windows knows when the actual music (including, potentially, silence) starts.
audiophile // flac & wavpack, mostly // using too many audio players

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #1
No...  If the driver and USB device are connected and running the digital audio stream will exist.  

It's similar to analog...   When the audio is not playing, the digital audio stream will contain whatever digitized analog noise is present, or it will contain zeros (silence).   With a phono preamp you won't get "digital silence".

Many recording applications do have a sound-activated option.     And with digital, you can continuously capture the data and store a few seconds or so in a buffer so there is no lag or missing audio in your final-actual recording once the sound starts.

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #2
You might be able to detect the transient of the stylus hitting the LP and the subsequent increase in noise from the groove and use that as a "start" indicator.  Most phono cartridges are quite silent when the stylus is not in contact with the media.

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #3
You would just need to set the threshold that triggers recording at a reasonable level. First, figure out the noise level for the target system, a USB turntable like you said (without stylus in groove!). Then set the threshold to be maybe 5-9dB higher than that (~9dB is a subjective doubling or halving of loudness). Hopefully the turntable isn't too noisy, and you'll end up with a threshold well below -60dB. So basically, rather than a gate, which just produces digital silence or a greatly attenuated signal when amplitude drops below the threshold, you'd want to use that to let signal through or start recording, I think. I'm not sure, I'd need to hear more about your goal.

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #4
My goal is to finally have something like a "vinyl ripping application" (like Audacity, but without the need to press buttons all the time): You connect your record player and start the application and it will automatically find the track beginnings and endings just by "reading" the audio stream. (Side-effect: I finally understand more about multimedia programming.)

Does the noise level really and notably increase between "not doing anything" and "playing a silent part of the record"? If so, that would be awesome indeed. Admittedly, I have a rather cheap player here, I'd have to measure it first. Audacity shows (almost) a flatline when there is no music, but that might have been preprocessed.

Thanks, everyone! :)
audiophile // flac & wavpack, mostly // using too many audio players

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #5
I believe PureVinyl has a function like this. Check them out and read some reviews to see how they implement it.
http://www.channld.com/purevinyl/

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #6
Hmm, no source code to look at. :(
audiophile // flac & wavpack, mostly // using too many audio players

 

Re: ASIO/WASAPI: Can I detect when a vinyl player starts playing?

Reply #7
The standard profile is quite apparent:

  • Near-zero output levels while the stylus is raised.
  • Transient when the stylus touches the record.
  • Medium specific noise-floor during lead-in.
  • Music.

The gain differentials at each step of the process should be significant, with the possible exception of the 3-to-4 boundary, as there is a non-zero chance that the music quietly fades in to maximum loudness.

Every rip I've ever made has had this characteristic sequence, excepting those where I dropped the stylus into the initial music groove rather than the lead-in. Section 3 should have a "dry" characteristic, free of tonal content beyond the rumble and whine of the turntable itself.