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: Codecs and latency (Read 7885 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Codecs and latency

Which codecs have the lowest latency and/or CPU utilization? As a deejay you want the fastest response times and storage is cheap. Do latency and CPU utilization vary considerably between deejay software?

Codecs and latency

Reply #1
Which codecs have the lowest latency and/or CPU utilization? As a deejay you want the fastest response times and storage is cheap. Do latency and CPU utilization vary considerably between deejay software?


For your audio is stored in files, you don't care about codec latency because you can "read-ahead" as much as you like. Low delay codecs are only useful for "real-time" applications where the audio is recorded, transmitted, and played back at the same time *and* you need the decoded audio not to have relay compared to the recorded audio. In other words, it's important for a *communication* system.

Codecs and latency

Reply #2
So what *does* affect latency in a playback-only situation? Just the bitrate and amount of memory used?

Codecs and latency

Reply #3
Sound card, sound card driver, DJ app and its used API (preferably ASIO or WaveRT).

Codecs and latency

Reply #4
So what *does* affect latency in a playback-only situation? Just the bitrate and amount of memory used?


Neither of those things should affect latency for audio.

Codecs and latency

Reply #5
As jmvalin said, latency shouldn't matter when playing audio (or video) files. 

You can check CPU usage yourself with different formats.    This shouldn't be a problem either...  People have been playing MP3s for a long time, while computers keep getting faster & faster.  Your DJ software shouldn't use that much of the CPU for simply playing audio.  But, if you are adding audio effect or visual effects, that stuff can require CPU cycles.   

Latency/buffering serves an important purpose, so you can't reduce it to zero, and the lower the latency, the more likely you are to get glitches.  On a multitasking computer you can't be assured that you're get access/control of the CPU & databus exactly when you need it.    But, audio (and video) need to flow in & out at a smooth-constant rate.   

Audio flows off of the hard drive/data bus  and into the output/playback buffer in quick-short bursts, but it flows out at a constant rate.    If there is no buffer/delay, this won't work... you'll get a glitch in the sound when the CPU gets interrupted and data stops comming off the data bus. 

The input/recording buffer works the opposite.  Sound-data fills the input buffer at a smooth constant rate, and gets read to the databus/hard drive in quick-short bursts.

If you have a fast machine, and you are not running any other applications you can get away with  smaller buffers (shorter latency).

And since there is buffering, you can record & playback at the same time and the head on your hard drive can jump-around between two (or more) different locations as it alternates between playing & recording. 

In most cases the delay can be compensated for.    But, it can become a problem if you are recording with a DAW (digital audio workstation) and the performer is monitoring the delayed-digital audio (which might have some additional delay caused by effect processing).    The usual solution to monitor directly through an analog path, and then compensate for the delays if necessary (if you are recording & playing back at the same time and things need to be synchronized).

Codecs and latency

Reply #6
Which codecs have the lowest latency and/or CPU utilization? As a deejay you want the fastest response times and storage is cheap. Do latency and CPU utilization vary considerably between deejay software?


IME latency is an  issue for people who are doing something like driving a MIDI synth with a keyboard, and they want to hear the note start when the key hits the bottom.

Latency is also an issue for people who are recording a new track while listening to a previously recorded track. If there is excess latency then the new track will trail the track that it is supposed to match up with. However this kind of latency can be compensated for in software by altering the timing of the reocrding of he second track.

Whenj you are playing back a recording, the whole track has already been delayed by days, months or years.

Latency would only be a concern if you started to play a track and there was a large perceptible delay before anything started happening.

If you want to see latency - work with vinyl. No real world LP goes from stopped or sliding to full speed in a few milliseconds.

Codecs and latency

Reply #7
If you want to see latency - work with vinyl. No real world LP goes from stopped or sliding to full speed in a few milliseconds.


The asked for domain is DJing. Depending on the kind of performance DJing has comparable latency requirements as playing electronic instruments. DJs use felt mats below the disc, which enable instant movement, feedback and zero delay for scratching.

Large playback buffers are not an option if one wants to replicate that experience digitally.

BTW, this thread doesn't belong into "Scientific Discussion".

Codecs and latency

Reply #8
If you want to see latency - work with vinyl. No real world LP goes from stopped or sliding to full speed in a few milliseconds.


The asked for domain is DJing. Depending on the kind of performance DJing has comparable latency requirements as playing electronic instruments. DJs use felt mats below the disc, which enable instant movement, feedback and zero delay for scratching.

Large playback buffers are not an option if one wants to replicate that experience digitally.

BTW, this thread doesn't belong into "Scientific Discussion".


All good points.

Codecs and latency

Reply #9
Are there DJ apps that work in a non-multitasking environment? I.e. as their own "operating system" dedicated to only that one app?

Most of the ones I've looked at run in some flavor of Windows or Mac OS.

Codecs and latency

Reply #10
That would not have any benefit in practice.

Codecs and latency

Reply #11
If you want to see latency - work with vinyl. No real world LP goes from stopped or sliding to full speed in a few milliseconds.


The asked for domain is DJing. Depending on the kind of performance DJing has comparable latency requirements as playing electronic instruments. DJs use felt mats below the disc, which enable instant movement, feedback and zero delay for scratching.



As someone who worked in radio when LPs were the primary signal source, and made heavy use of the felt mat, I assure you that it was still necessary to "lead" the stylus by about a cm, so that you didn't get an incidental pitch shift.  That's on the order of 10ms.

 

Codecs and latency

Reply #12
If you want to see latency - work with vinyl. No real world LP goes from stopped or sliding to full speed in a few milliseconds.


The asked for domain is DJing. Depending on the kind of performance DJing has comparable latency requirements as playing electronic instruments. DJs use felt mats below the disc, which enable instant movement, feedback and zero delay for scratching.



As someone who worked in radio when LPs were the primary signal source, and made heavy use of the felt mat, I assure you that it was still necessary to "lead" the stylus by about a cm, so that you didn't get an incidental pitch shift.  That's on the order of 10ms.


That was my experience, back 45 or so years ago when I DJ'd several seasons of hugely sucessful  weekly dances while I was (purportedly) working on my BSE. 

In those days there was no commercial infrastructure for DIY DJ-ing escept for hyper-expensive radio station gear that was built like a tank and cost a jillion dollars.  Audio mixers as we know them now barely existed.

Our dance rig was composed of some stuff that would make most people shake their heads, but it worked and it sounded good.  We has 2 JBL 001 horn-loaded speakers in special extra robust roll-around enclosures with heavy screen over the woofers to stop errant feet from *music critics*,  2 Dyna 70s with their 16 ohm taps hooked in parallel to drive the 8 ohm speakers gave us close to 70 wpc.  2 Dyna PAS 3X premaps  were joined by a passive resistive combiner to drive the amps.

We used 2 AR turntables with felt mats that did allow slipping the discs. While the AR turntables' clock motors weren't torque monsters, if you lifted the edge of the disc a little, the platter would slip at something very close to 33 rpm. When you let it go, the disc would pick up  full speed in small fraction of a turn. But, it would slip on the felt mat for a discernable amount of time before it picked up full speed. No scratching, no back-cueing because our cartridges were regular Shures. There was no such thing as a DJ-rated cartridge in those days.