Gale Andrews wrote:Robert J. H. wrote:The time shift or rather another alignment command, does not appeal to me, mostly because it is not flexible enough. Vocals often start after some seconds intro.
Absolutely, it could only be an "option" for "automatic" correction, as I said. But it would work with the suggestions we've received for re-recording fluffs, whereby Audacity plays some audio before the fluff before it starts recording.
Robert J. H. wrote:I can already do the described command with "Chain-it-up.ny". It removes silence from the track start. Therefore, alignment is easy if you've tapped along with a count-in measure and have deleted roughly to the beats in sync.
Yes but IMO, Chain-it-up is another of your super powerful tools that is really too complex to be generally releasable.
Would the "remove silence from track start" feature be useful as part of your latency measuring plug-in?
Gale
This can already be done by "Detach at Silences" and "Start to Zero", at least if it is totally white space. Otherwise, the user has to set a threshold value, as in my plug-in.
Two interesting things I've stumbled upon using 2.0.6 alpha.
Wasapi (loopback) seems still to have some problems. With both, Audio Buffer and Latency Correction set to zero, I get the following:
- A sample sound (1 s) gets 44100 + 441 samples long.
- There are 1395 zero-samples at the beginning
You can test it yourself:
Code: Select all
(dotimes (i 200000 )(if (not (zerop (snd-fetch s)))(return i)))
The user sees two main aspects of latency:
1. The latency while listening to the input in real time (play through)
2. Latency after recording--the track is shifted
The first point is pure prediction and is not our concern at this point.
The second one is a question of proper measurement as I do see it. Audacity should actually know how much time has elapsed from pressing "R" up to the time the recording is stopped. Or to be more specific, the times for the stream invoking and termination. Both, Portaudio and XWidgets have the appropriate counter functions.
The logical consequence is that the latency correction should be based on this timings and not on an arbitrary value in preferences.
An interesting site in this context is:
https://www.assembla.com/spaces/portaud ... Guidelines
Naively expressed: Audacity starts recording and then playback.
After the playback is stopped, we know exactly how many samples/frames were sent. The recording stream should naturally be longer (it began earlier). The difference in samples should therefore be the latency amount and can directly be deleted from the recording stream.
PA has some interesting get-functions for the latencies that count the time from the call back to the first/last sample at the DAC or ADC respectively.
There's a lot more in the above link. However, those are mainly guidelines for latency prediction and calculating a user-defined target latency.