MIDI and latency

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MIDI and latency

Stevethefiddle
1) Import a MIDI track
2) Configure your system so that you can record it.
3) Record the Note track to an audio track.
4) Solo the Note track
5) Record the Note track again (to a new audio track).

Note that the two audio tracks are out of sync because the second
track has had "latency correction" applied and the first audio track
hasn't.

What is the correct behaviour here? Should latency correction be
applied to the first audio track if a Note track exists?

Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Pokechu22-3
Latency correction probably should be applied to the first audio track if recording with a note track; I'm not sure if it is though.

There is also midi synth latency, though: it can take time for your MIDI device to produce sound.  There is an option to compensate for that in the MIDI device preferences, but without calibrating it in addition to regular latency, you'll still have them out of sync.

--Poke

On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle <[hidden email]> wrote:
1) Import a MIDI track
2) Configure your system so that you can record it.
3) Record the Note track to an audio track.
4) Solo the Note track
5) Record the Note track again (to a new audio track).

Note that the two audio tracks are out of sync because the second
track has had "latency correction" applied and the first audio track
hasn't.

What is the correct behaviour here? Should latency correction be
applied to the first audio track if a Note track exists?

Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Stevethefiddle
On 22 July 2017 at 19:23, Pokechu22
<[hidden email]> wrote:
> Latency correction probably should be applied to the first audio track if
> recording with a note track; I'm not sure if it is though.

No it isn't, and that's my point. The audio track latency correction
is not applied to the first audio track, only to subsequent audio
tracks.

>
> There is also midi synth latency, though: it can take time for your MIDI
> device to produce sound.  There is an option to compensate for that in the
> MIDI device preferences, but without calibrating it in addition to regular
> latency, you'll still have them out of sync.

I've calibrated the MIDI latency on my test set-up, though it is not
necessary to do so for purpose of illustrating this problem.
(Calibrating the MIDI latency becomes important when playing Audio
tracks and Note tracks at the same time.)


A practical example of where the issue is important.
Say that you have a MIDI track with multiple instruments and you want
to record each instrument to a separate track so that you can Eq them
individually. The first recorded audio track will be out of sync with
the rest, because every audio track except the first is shifted to the
left by the audio track latency correction.

Steve

>
> --Poke
>
> On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
> <[hidden email]> wrote:
>>
>> 1) Import a MIDI track
>> 2) Configure your system so that you can record it.
>> 3) Record the Note track to an audio track.
>> 4) Solo the Note track
>> 5) Record the Note track again (to a new audio track).
>>
>> Note that the two audio tracks are out of sync because the second
>> track has had "latency correction" applied and the first audio track
>> hasn't.
>>
>> What is the correct behaviour here? Should latency correction be
>> applied to the first audio track if a Note track exists?
>>
>> Steve
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Paul Licameli
Steve, I think you need to change line 2417 of AudioIO.cpp to:

               if (mPlaybackTracks.size() > 0 || mMidiPlaybackTracks.size() > 0)


I leave you to judge whether to commit and push that.

PRL


On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle <[hidden email]> wrote:
On 22 July 2017 at 19:23, Pokechu22
<[hidden email]> wrote:
> Latency correction probably should be applied to the first audio track if
> recording with a note track; I'm not sure if it is though.

No it isn't, and that's my point. The audio track latency correction
is not applied to the first audio track, only to subsequent audio
tracks.

>
> There is also midi synth latency, though: it can take time for your MIDI
> device to produce sound.  There is an option to compensate for that in the
> MIDI device preferences, but without calibrating it in addition to regular
> latency, you'll still have them out of sync.

I've calibrated the MIDI latency on my test set-up, though it is not
necessary to do so for purpose of illustrating this problem.
(Calibrating the MIDI latency becomes important when playing Audio
tracks and Note tracks at the same time.)


A practical example of where the issue is important.
Say that you have a MIDI track with multiple instruments and you want
to record each instrument to a separate track so that you can Eq them
individually. The first recorded audio track will be out of sync with
the rest, because every audio track except the first is shifted to the
left by the audio track latency correction.

Steve

>
> --Poke
>
> On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
> <[hidden email]> wrote:
>>
>> 1) Import a MIDI track
>> 2) Configure your system so that you can record it.
>> 3) Record the Note track to an audio track.
>> 4) Solo the Note track
>> 5) Record the Note track again (to a new audio track).
>>
>> Note that the two audio tracks are out of sync because the second
>> track has had "latency correction" applied and the first audio track
>> hasn't.
>>
>> What is the correct behaviour here? Should latency correction be
>> applied to the first audio track if a Note track exists?
>>
>> Steve
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Stevethefiddle
On 22 July 2017 at 20:18, Paul Licameli <[hidden email]> wrote:
> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>
>                if (mPlaybackTracks.size() > 0 || mMidiPlaybackTracks.size()
>> 0)

I'm wondering if that is actually the 'right' behaviour.
Why do we special case the first track at all, and why do we retain
the before zero section?
After all, the Note track may or may not be playable, depending on
whether or not the user has a functioning MIDI device set up, and we
have no way of knowing  if they do (though we may be  able to tell if
they don't).

Steve

>
>
> I leave you to judge whether to commit and push that.
>
> PRL
>
>
> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle <[hidden email]>
> wrote:
>>
>> On 22 July 2017 at 19:23, Pokechu22
>> <[hidden email]> wrote:
>> > Latency correction probably should be applied to the first audio track
>> > if
>> > recording with a note track; I'm not sure if it is though.
>>
>> No it isn't, and that's my point. The audio track latency correction
>> is not applied to the first audio track, only to subsequent audio
>> tracks.
>>
>> >
>> > There is also midi synth latency, though: it can take time for your MIDI
>> > device to produce sound.  There is an option to compensate for that in
>> > the
>> > MIDI device preferences, but without calibrating it in addition to
>> > regular
>> > latency, you'll still have them out of sync.
>>
>> I've calibrated the MIDI latency on my test set-up, though it is not
>> necessary to do so for purpose of illustrating this problem.
>> (Calibrating the MIDI latency becomes important when playing Audio
>> tracks and Note tracks at the same time.)
>>
>>
>> A practical example of where the issue is important.
>> Say that you have a MIDI track with multiple instruments and you want
>> to record each instrument to a separate track so that you can Eq them
>> individually. The first recorded audio track will be out of sync with
>> the rest, because every audio track except the first is shifted to the
>> left by the audio track latency correction.
>>
>> Steve
>>
>> >
>> > --Poke
>> >
>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>> > <[hidden email]> wrote:
>> >>
>> >> 1) Import a MIDI track
>> >> 2) Configure your system so that you can record it.
>> >> 3) Record the Note track to an audio track.
>> >> 4) Solo the Note track
>> >> 5) Record the Note track again (to a new audio track).
>> >>
>> >> Note that the two audio tracks are out of sync because the second
>> >> track has had "latency correction" applied and the first audio track
>> >> hasn't.
>> >>
>> >> What is the correct behaviour here? Should latency correction be
>> >> applied to the first audio track if a Note track exists?
>> >>
>> >> Steve
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> Check out the vibrant tech community on one of the world's most
>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >> _______________________________________________
>> >> Audacity-quality mailing list
>> >> [hidden email]
>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Audacity-quality mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Robert Hänggi
On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:

> On 22 July 2017 at 20:18, Paul Licameli <[hidden email]> wrote:
>> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>>
>>                if (mPlaybackTracks.size() > 0 ||
>> mMidiPlaybackTracks.size()
>>> 0)
>
> I'm wondering if that is actually the 'right' behaviour.
> Why do we special case the first track at all, and why do we retain
> the before zero section?
Do you mean that latency correction is never applied to the first track?
+1 for removing this behaviour.

For the second one:
Do you propose to trash all that is before time zero? +1 too.

What happens on "append record".
if the audio of the correction length is automatically removed, then
it is a strong point for doing it as well before zero.
And if nothing happens with regard to correction, it would be very weird... ;)

Robert


> After all, the Note track may or may not be playable, depending on
> whether or not the user has a functioning MIDI device set up, and we
> have no way of knowing  if they do (though we may be  able to tell if
> they don't).
>
> Steve
>
>>
>>
>> I leave you to judge whether to commit and push that.
>>
>> PRL
>>
>>
>> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>> <[hidden email]>
>> wrote:
>>>
>>> On 22 July 2017 at 19:23, Pokechu22
>>> <[hidden email]> wrote:
>>> > Latency correction probably should be applied to the first audio track
>>> > if
>>> > recording with a note track; I'm not sure if it is though.
>>>
>>> No it isn't, and that's my point. The audio track latency correction
>>> is not applied to the first audio track, only to subsequent audio
>>> tracks.
>>>
>>> >
>>> > There is also midi synth latency, though: it can take time for your
>>> > MIDI
>>> > device to produce sound.  There is an option to compensate for that in
>>> > the
>>> > MIDI device preferences, but without calibrating it in addition to
>>> > regular
>>> > latency, you'll still have them out of sync.
>>>
>>> I've calibrated the MIDI latency on my test set-up, though it is not
>>> necessary to do so for purpose of illustrating this problem.
>>> (Calibrating the MIDI latency becomes important when playing Audio
>>> tracks and Note tracks at the same time.)
>>>
>>>
>>> A practical example of where the issue is important.
>>> Say that you have a MIDI track with multiple instruments and you want
>>> to record each instrument to a separate track so that you can Eq them
>>> individually. The first recorded audio track will be out of sync with
>>> the rest, because every audio track except the first is shifted to the
>>> left by the audio track latency correction.
>>>
>>> Steve
>>>
>>> >
>>> > --Poke
>>> >
>>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>>> > <[hidden email]> wrote:
>>> >>
>>> >> 1) Import a MIDI track
>>> >> 2) Configure your system so that you can record it.
>>> >> 3) Record the Note track to an audio track.
>>> >> 4) Solo the Note track
>>> >> 5) Record the Note track again (to a new audio track).
>>> >>
>>> >> Note that the two audio tracks are out of sync because the second
>>> >> track has had "latency correction" applied and the first audio track
>>> >> hasn't.
>>> >>
>>> >> What is the correct behaviour here? Should latency correction be
>>> >> applied to the first audio track if a Note track exists?
>>> >>
>>> >> Steve
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Check out the vibrant tech community on one of the world's most
>>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> >> _______________________________________________
>>> >> Audacity-quality mailing list
>>> >> [hidden email]
>>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >
>>> >
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Check out the vibrant tech community on one of the world's most
>>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> > _______________________________________________
>>> > Audacity-quality mailing list
>>> > [hidden email]
>>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Audacity-quality mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Peter Sampson-2
I am no overdubbing expert (not by a *very* long chalk)

But my understanding is that we don't apply latency to track one
beacuse what the latency adjustment is there for is to tweak
subsequent tracks into synchronicity (approximate) with the first track.

Applying the latency correction to the first track would subvert that intention.

But please ignore me if I am talking out of my hat.

Peter

On Sun, Jul 23, 2017 at 12:34 AM, Robert Hänggi <[hidden email]> wrote:
On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:
> On 22 July 2017 at 20:18, Paul Licameli <[hidden email]> wrote:
>> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>>
>>                if (mPlaybackTracks.size() > 0 ||
>> mMidiPlaybackTracks.size()
>>> 0)
>
> I'm wondering if that is actually the 'right' behaviour.
> Why do we special case the first track at all, and why do we retain
> the before zero section?
Do you mean that latency correction is never applied to the first track?
+1 for removing this behaviour.

For the second one:
Do you propose to trash all that is before time zero? +1 too.

What happens on "append record".
if the audio of the correction length is automatically removed, then
it is a strong point for doing it as well before zero.
And if nothing happens with regard to correction, it would be very weird... ;)

Robert


> After all, the Note track may or may not be playable, depending on
> whether or not the user has a functioning MIDI device set up, and we
> have no way of knowing  if they do (though we may be  able to tell if
> they don't).
>
> Steve
>
>>
>>
>> I leave you to judge whether to commit and push that.
>>
>> PRL
>>
>>
>> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>> <[hidden email]>
>> wrote:
>>>
>>> On 22 July 2017 at 19:23, Pokechu22
>>> <[hidden email]> wrote:
>>> > Latency correction probably should be applied to the first audio track
>>> > if
>>> > recording with a note track; I'm not sure if it is though.
>>>
>>> No it isn't, and that's my point. The audio track latency correction
>>> is not applied to the first audio track, only to subsequent audio
>>> tracks.
>>>
>>> >
>>> > There is also midi synth latency, though: it can take time for your
>>> > MIDI
>>> > device to produce sound.  There is an option to compensate for that in
>>> > the
>>> > MIDI device preferences, but without calibrating it in addition to
>>> > regular
>>> > latency, you'll still have them out of sync.
>>>
>>> I've calibrated the MIDI latency on my test set-up, though it is not
>>> necessary to do so for purpose of illustrating this problem.
>>> (Calibrating the MIDI latency becomes important when playing Audio
>>> tracks and Note tracks at the same time.)
>>>
>>>
>>> A practical example of where the issue is important.
>>> Say that you have a MIDI track with multiple instruments and you want
>>> to record each instrument to a separate track so that you can Eq them
>>> individually. The first recorded audio track will be out of sync with
>>> the rest, because every audio track except the first is shifted to the
>>> left by the audio track latency correction.
>>>
>>> Steve
>>>
>>> >
>>> > --Poke
>>> >
>>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>>> > <[hidden email]> wrote:
>>> >>
>>> >> 1) Import a MIDI track
>>> >> 2) Configure your system so that you can record it.
>>> >> 3) Record the Note track to an audio track.
>>> >> 4) Solo the Note track
>>> >> 5) Record the Note track again (to a new audio track).
>>> >>
>>> >> Note that the two audio tracks are out of sync because the second
>>> >> track has had "latency correction" applied and the first audio track
>>> >> hasn't.
>>> >>
>>> >> What is the correct behaviour here? Should latency correction be
>>> >> applied to the first audio track if a Note track exists?
>>> >>
>>> >> Steve
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------------------------
>>> >> Check out the vibrant tech community on one of the world's most
>>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> >> _______________________________________________
>>> >> Audacity-quality mailing list
>>> >> [hidden email]
>>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >
>>> >
>>> >
>>> >
>>> > ------------------------------------------------------------------------------
>>> > Check out the vibrant tech community on one of the world's most
>>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> > _______________________________________________
>>> > Audacity-quality mailing list
>>> > [hidden email]
>>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Audacity-quality mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Robert Hänggi
On 23/07/2017, Peter Sampson <[hidden email]> wrote:
> I am no overdubbing expert (not by a *very* long chalk)
>
> But my understanding is that we don't apply latency to track one
> beacuse what the latency adjustment is there for is to tweak
> subsequent tracks into synchronicity (approximate) with the first track.
>
> Applying the latency correction to the first track would subvert that
> intention.
>
It makes no difference if you apply the correction to the first track or not.
If you're overdubbing, you will try to play or sing or whatever in
sync with the first track.

The problem becomes apparent with the presence of note tracks.

As another example:
Imagine that we had an internal metronome that is automatically active
during recording.
If you would record the first track, it would naturally be off since
latency-correction isn't applied.

And yet another:
My guitar amplifier has a in-built metronome (a blinking light) that's
in sync with e.g. the delay effect.
If I wanted to record several versions of a riff, I would have first
to add an empty track in order to avoid an uncorrected take.

Robert


> But please ignore me if I am talking out of my hat.
>
> Peter
>
> On Sun, Jul 23, 2017 at 12:34 AM, Robert Hänggi <[hidden email]>
> wrote:
>
>> On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:
>> > On 22 July 2017 at 20:18, Paul Licameli <[hidden email]>
>> > wrote:
>> >> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>> >>
>> >>                if (mPlaybackTracks.size() > 0 ||
>> >> mMidiPlaybackTracks.size()
>> >>> 0)
>> >
>> > I'm wondering if that is actually the 'right' behaviour.
>> > Why do we special case the first track at all, and why do we retain
>> > the before zero section?
>> Do you mean that latency correction is never applied to the first track?
>> +1 for removing this behaviour.
>>
>> For the second one:
>> Do you propose to trash all that is before time zero? +1 too.
>>
>> What happens on "append record".
>> if the audio of the correction length is automatically removed, then
>> it is a strong point for doing it as well before zero.
>> And if nothing happens with regard to correction, it would be very
>> weird... ;)
>>
>> Robert
>>
>>
>> > After all, the Note track may or may not be playable, depending on
>> > whether or not the user has a functioning MIDI device set up, and we
>> > have no way of knowing  if they do (though we may be  able to tell if
>> > they don't).
>> >
>> > Steve
>> >
>> >>
>> >>
>> >> I leave you to judge whether to commit and push that.
>> >>
>> >> PRL
>> >>
>> >>
>> >> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>> >> <[hidden email]>
>> >> wrote:
>> >>>
>> >>> On 22 July 2017 at 19:23, Pokechu22
>> >>> <[hidden email]> wrote:
>> >>> > Latency correction probably should be applied to the first audio
>> track
>> >>> > if
>> >>> > recording with a note track; I'm not sure if it is though.
>> >>>
>> >>> No it isn't, and that's my point. The audio track latency correction
>> >>> is not applied to the first audio track, only to subsequent audio
>> >>> tracks.
>> >>>
>> >>> >
>> >>> > There is also midi synth latency, though: it can take time for your
>> >>> > MIDI
>> >>> > device to produce sound.  There is an option to compensate for that
>> in
>> >>> > the
>> >>> > MIDI device preferences, but without calibrating it in addition to
>> >>> > regular
>> >>> > latency, you'll still have them out of sync.
>> >>>
>> >>> I've calibrated the MIDI latency on my test set-up, though it is not
>> >>> necessary to do so for purpose of illustrating this problem.
>> >>> (Calibrating the MIDI latency becomes important when playing Audio
>> >>> tracks and Note tracks at the same time.)
>> >>>
>> >>>
>> >>> A practical example of where the issue is important.
>> >>> Say that you have a MIDI track with multiple instruments and you want
>> >>> to record each instrument to a separate track so that you can Eq them
>> >>> individually. The first recorded audio track will be out of sync with
>> >>> the rest, because every audio track except the first is shifted to
>> >>> the
>> >>> left by the audio track latency correction.
>> >>>
>> >>> Steve
>> >>>
>> >>> >
>> >>> > --Poke
>> >>> >
>> >>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>> >>> > <[hidden email]> wrote:
>> >>> >>
>> >>> >> 1) Import a MIDI track
>> >>> >> 2) Configure your system so that you can record it.
>> >>> >> 3) Record the Note track to an audio track.
>> >>> >> 4) Solo the Note track
>> >>> >> 5) Record the Note track again (to a new audio track).
>> >>> >>
>> >>> >> Note that the two audio tracks are out of sync because the second
>> >>> >> track has had "latency correction" applied and the first audio
>> >>> >> track
>> >>> >> hasn't.
>> >>> >>
>> >>> >> What is the correct behaviour here? Should latency correction be
>> >>> >> applied to the first audio track if a Note track exists?
>> >>> >>
>> >>> >> Steve
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ------------------------------------------------------------
>> ------------------
>> >>> >> Check out the vibrant tech community on one of the world's most
>> >>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >>> >> _______________________________________________
>> >>> >> Audacity-quality mailing list
>> >>> >> [hidden email]
>> >>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > ------------------------------------------------------------
>> ------------------
>> >>> > Check out the vibrant tech community on one of the world's most
>> >>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >>> > _______________________________________________
>> >>> > Audacity-quality mailing list
>> >>> > [hidden email]
>> >>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >>> >
>> >>>
>> >>>
>> >>> ------------------------------------------------------------
>> ------------------
>> >>> Check out the vibrant tech community on one of the world's most
>> >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >>> _______________________________________________
>> >>> Audacity-quality mailing list
>> >>> [hidden email]
>> >>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------
>> ------------------
>> >> Check out the vibrant tech community on one of the world's most
>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> >> _______________________________________________
>> >> Audacity-quality mailing list
>> >> [hidden email]
>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >>
>> >
>> > ------------------------------------------------------------
>> ------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Audacity-quality mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>> >
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Stevethefiddle
On 23 July 2017 at 13:14, Robert Hänggi <[hidden email]> wrote:

> On 23/07/2017, Peter Sampson <[hidden email]> wrote:
>> I am no overdubbing expert (not by a *very* long chalk)
>>
>> But my understanding is that we don't apply latency to track one
>> beacuse what the latency adjustment is there for is to tweak
>> subsequent tracks into synchronicity (approximate) with the first track.
>>
>> Applying the latency correction to the first track would subvert that
>> intention.
>>
> It makes no difference if you apply the correction to the first track or not.
> If you're overdubbing, you will try to play or sing or whatever in
> sync with the first track.

It makes 'almost' no difference if the correction is applied to the
first track. By default it would trim the first 0.1 sec from the start
of the recording. In practical terms, I doubt that anyone clicks the
record button with such precision that 0.1 seconds makes any
difference.

It 'could' perhaps make a difference if recording was initiated by a
script (I'm thinking of future uses of mod-script-pipe), but in that
case we would probably want control of latency correction for other
tracks too.

>
> The problem becomes apparent with the presence of note tracks.

Yes, The reason for latency compensation is so that what Audacity
records is in time with what Audacity plays. If we have a click track,
which could either be an audio track or a note track, and we record a
new track while listening to that click track, we want the recording
to be in time with that click track. Due to latency, the new track
will initially be slightly later than the click, so latency correction
shifts the track to compensate.

So for tracks recorded while Audacity is playing something else
(audio, MIDI or other), latency compensation is necessary. For
recording when Audacity is not playing anything else it is not
necessary, but I don't think there's any practical disbenefit either.

With the new support for playing Note tracks, we are now in a
situation where we may not be sure if Audacity is playing anything. In
the future we could have a real-time metronome, and if we are making a
special case for "the first recorded track when Audacity is not
playing anything", then we would need to take into account whether the
metronome is playing or not.

My inclination is to just drop the special case now and apply latency
compensation in all cases. However, I don't think that we would want
to be hiding a bit of audio behind zero for people that record one
track only. I also question whether there is any benefit in hiding a
bit of audio behind zero for any tracks.

There is an important disadvantage in retaining the "compensated"
(default 100 ms) fragment behind zero, and that is that if a user
wants to export tracks for use in another multi-track application,
they must manually delete the before zero fragment or their tracks
will not be synchronised.

Currently with Append Record, the "compensated fragment" is discarded.
We only retain it when recording to a new track.

Steve

>
> As another example:
> Imagine that we had an internal metronome that is automatically active
> during recording.
> If you would record the first track, it would naturally be off since
> latency-correction isn't applied.
>
> And yet another:
> My guitar amplifier has a in-built metronome (a blinking light) that's
> in sync with e.g. the delay effect.
> If I wanted to record several versions of a riff, I would have first
> to add an empty track in order to avoid an uncorrected take.
>
> Robert
>
>
>> But please ignore me if I am talking out of my hat.
>>
>> Peter
>>
>> On Sun, Jul 23, 2017 at 12:34 AM, Robert Hänggi <[hidden email]>
>> wrote:
>>
>>> On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:
>>> > On 22 July 2017 at 20:18, Paul Licameli <[hidden email]>
>>> > wrote:
>>> >> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>>> >>
>>> >>                if (mPlaybackTracks.size() > 0 ||
>>> >> mMidiPlaybackTracks.size()
>>> >>> 0)
>>> >
>>> > I'm wondering if that is actually the 'right' behaviour.
>>> > Why do we special case the first track at all, and why do we retain
>>> > the before zero section?
>>> Do you mean that latency correction is never applied to the first track?
>>> +1 for removing this behaviour.
>>>
>>> For the second one:
>>> Do you propose to trash all that is before time zero? +1 too.
>>>
>>> What happens on "append record".
>>> if the audio of the correction length is automatically removed, then
>>> it is a strong point for doing it as well before zero.
>>> And if nothing happens with regard to correction, it would be very
>>> weird... ;)
>>>
>>> Robert
>>>
>>>
>>> > After all, the Note track may or may not be playable, depending on
>>> > whether or not the user has a functioning MIDI device set up, and we
>>> > have no way of knowing  if they do (though we may be  able to tell if
>>> > they don't).
>>> >
>>> > Steve
>>> >
>>> >>
>>> >>
>>> >> I leave you to judge whether to commit and push that.
>>> >>
>>> >> PRL
>>> >>
>>> >>
>>> >> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>>> >> <[hidden email]>
>>> >> wrote:
>>> >>>
>>> >>> On 22 July 2017 at 19:23, Pokechu22
>>> >>> <[hidden email]> wrote:
>>> >>> > Latency correction probably should be applied to the first audio
>>> track
>>> >>> > if
>>> >>> > recording with a note track; I'm not sure if it is though.
>>> >>>
>>> >>> No it isn't, and that's my point. The audio track latency correction
>>> >>> is not applied to the first audio track, only to subsequent audio
>>> >>> tracks.
>>> >>>
>>> >>> >
>>> >>> > There is also midi synth latency, though: it can take time for your
>>> >>> > MIDI
>>> >>> > device to produce sound.  There is an option to compensate for that
>>> in
>>> >>> > the
>>> >>> > MIDI device preferences, but without calibrating it in addition to
>>> >>> > regular
>>> >>> > latency, you'll still have them out of sync.
>>> >>>
>>> >>> I've calibrated the MIDI latency on my test set-up, though it is not
>>> >>> necessary to do so for purpose of illustrating this problem.
>>> >>> (Calibrating the MIDI latency becomes important when playing Audio
>>> >>> tracks and Note tracks at the same time.)
>>> >>>
>>> >>>
>>> >>> A practical example of where the issue is important.
>>> >>> Say that you have a MIDI track with multiple instruments and you want
>>> >>> to record each instrument to a separate track so that you can Eq them
>>> >>> individually. The first recorded audio track will be out of sync with
>>> >>> the rest, because every audio track except the first is shifted to
>>> >>> the
>>> >>> left by the audio track latency correction.
>>> >>>
>>> >>> Steve
>>> >>>
>>> >>> >
>>> >>> > --Poke
>>> >>> >
>>> >>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>>> >>> > <[hidden email]> wrote:
>>> >>> >>
>>> >>> >> 1) Import a MIDI track
>>> >>> >> 2) Configure your system so that you can record it.
>>> >>> >> 3) Record the Note track to an audio track.
>>> >>> >> 4) Solo the Note track
>>> >>> >> 5) Record the Note track again (to a new audio track).
>>> >>> >>
>>> >>> >> Note that the two audio tracks are out of sync because the second
>>> >>> >> track has had "latency correction" applied and the first audio
>>> >>> >> track
>>> >>> >> hasn't.
>>> >>> >>
>>> >>> >> What is the correct behaviour here? Should latency correction be
>>> >>> >> applied to the first audio track if a Note track exists?
>>> >>> >>
>>> >>> >> Steve
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >> ------------------------------------------------------------
>>> ------------------
>>> >>> >> Check out the vibrant tech community on one of the world's most
>>> >>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> >>> >> _______________________________________________
>>> >>> >> Audacity-quality mailing list
>>> >>> >> [hidden email]
>>> >>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> > ------------------------------------------------------------
>>> ------------------
>>> >>> > Check out the vibrant tech community on one of the world's most
>>> >>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> >>> > _______________________________________________
>>> >>> > Audacity-quality mailing list
>>> >>> > [hidden email]
>>> >>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >>> >
>>> >>>
>>> >>>
>>> >>> ------------------------------------------------------------
>>> ------------------
>>> >>> Check out the vibrant tech community on one of the world's most
>>> >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> >>> _______________________________________________
>>> >>> Audacity-quality mailing list
>>> >>> [hidden email]
>>> >>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >>
>>> >>
>>> >>
>>> >> ------------------------------------------------------------
>>> ------------------
>>> >> Check out the vibrant tech community on one of the world's most
>>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> >> _______________________________________________
>>> >> Audacity-quality mailing list
>>> >> [hidden email]
>>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >>
>>> >
>>> > ------------------------------------------------------------
>>> ------------------
>>> > Check out the vibrant tech community on one of the world's most
>>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> > _______________________________________________
>>> > Audacity-quality mailing list
>>> > [hidden email]
>>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>> >
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Audacity-quality mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Robert Hänggi
Another benefit of removing all before zero:
The align commands will always be accurate.
For instance, you've got two tracks, one is recorded and one imported.
You've made them play perfectly in sync.
Align them at the cursor and you will be out of sync.
You can't have start time and content synchronicity at the same time.
Robert

On 23/07/2017, Steve the Fiddle <[hidden email]> wrote:

> On 23 July 2017 at 13:14, Robert Hänggi <[hidden email]> wrote:
>> On 23/07/2017, Peter Sampson <[hidden email]> wrote:
>>> I am no overdubbing expert (not by a *very* long chalk)
>>>
>>> But my understanding is that we don't apply latency to track one
>>> beacuse what the latency adjustment is there for is to tweak
>>> subsequent tracks into synchronicity (approximate) with the first track.
>>>
>>> Applying the latency correction to the first track would subvert that
>>> intention.
>>>
>> It makes no difference if you apply the correction to the first track or
>> not.
>> If you're overdubbing, you will try to play or sing or whatever in
>> sync with the first track.
>
> It makes 'almost' no difference if the correction is applied to the
> first track. By default it would trim the first 0.1 sec from the start
> of the recording. In practical terms, I doubt that anyone clicks the
> record button with such precision that 0.1 seconds makes any
> difference.
>
> It 'could' perhaps make a difference if recording was initiated by a
> script (I'm thinking of future uses of mod-script-pipe), but in that
> case we would probably want control of latency correction for other
> tracks too.
>
>>
>> The problem becomes apparent with the presence of note tracks.
>
> Yes, The reason for latency compensation is so that what Audacity
> records is in time with what Audacity plays. If we have a click track,
> which could either be an audio track or a note track, and we record a
> new track while listening to that click track, we want the recording
> to be in time with that click track. Due to latency, the new track
> will initially be slightly later than the click, so latency correction
> shifts the track to compensate.
>
> So for tracks recorded while Audacity is playing something else
> (audio, MIDI or other), latency compensation is necessary. For
> recording when Audacity is not playing anything else it is not
> necessary, but I don't think there's any practical disbenefit either.
>
> With the new support for playing Note tracks, we are now in a
> situation where we may not be sure if Audacity is playing anything. In
> the future we could have a real-time metronome, and if we are making a
> special case for "the first recorded track when Audacity is not
> playing anything", then we would need to take into account whether the
> metronome is playing or not.
>
> My inclination is to just drop the special case now and apply latency
> compensation in all cases. However, I don't think that we would want
> to be hiding a bit of audio behind zero for people that record one
> track only. I also question whether there is any benefit in hiding a
> bit of audio behind zero for any tracks.
>
> There is an important disadvantage in retaining the "compensated"
> (default 100 ms) fragment behind zero, and that is that if a user
> wants to export tracks for use in another multi-track application,
> they must manually delete the before zero fragment or their tracks
> will not be synchronised.
>
> Currently with Append Record, the "compensated fragment" is discarded.
> We only retain it when recording to a new track.
>
> Steve
>
>>
>> As another example:
>> Imagine that we had an internal metronome that is automatically active
>> during recording.
>> If you would record the first track, it would naturally be off since
>> latency-correction isn't applied.
>>
>> And yet another:
>> My guitar amplifier has a in-built metronome (a blinking light) that's
>> in sync with e.g. the delay effect.
>> If I wanted to record several versions of a riff, I would have first
>> to add an empty track in order to avoid an uncorrected take.
>>
>> Robert
>>
>>
>>> But please ignore me if I am talking out of my hat.
>>>
>>> Peter
>>>
>>> On Sun, Jul 23, 2017 at 12:34 AM, Robert Hänggi <[hidden email]>
>>> wrote:
>>>
>>>> On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:
>>>> > On 22 July 2017 at 20:18, Paul Licameli <[hidden email]>
>>>> > wrote:
>>>> >> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>>>> >>
>>>> >>                if (mPlaybackTracks.size() > 0 ||
>>>> >> mMidiPlaybackTracks.size()
>>>> >>> 0)
>>>> >
>>>> > I'm wondering if that is actually the 'right' behaviour.
>>>> > Why do we special case the first track at all, and why do we retain
>>>> > the before zero section?
>>>> Do you mean that latency correction is never applied to the first track?
>>>> +1 for removing this behaviour.
>>>>
>>>> For the second one:
>>>> Do you propose to trash all that is before time zero? +1 too.
>>>>
>>>> What happens on "append record".
>>>> if the audio of the correction length is automatically removed, then
>>>> it is a strong point for doing it as well before zero.
>>>> And if nothing happens with regard to correction, it would be very
>>>> weird... ;)
>>>>
>>>> Robert
>>>>
>>>>
>>>> > After all, the Note track may or may not be playable, depending on
>>>> > whether or not the user has a functioning MIDI device set up, and we
>>>> > have no way of knowing  if they do (though we may be  able to tell if
>>>> > they don't).
>>>> >
>>>> > Steve
>>>> >
>>>> >>
>>>> >>
>>>> >> I leave you to judge whether to commit and push that.
>>>> >>
>>>> >> PRL
>>>> >>
>>>> >>
>>>> >> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>>>> >> <[hidden email]>
>>>> >> wrote:
>>>> >>>
>>>> >>> On 22 July 2017 at 19:23, Pokechu22
>>>> >>> <[hidden email]> wrote:
>>>> >>> > Latency correction probably should be applied to the first audio
>>>> track
>>>> >>> > if
>>>> >>> > recording with a note track; I'm not sure if it is though.
>>>> >>>
>>>> >>> No it isn't, and that's my point. The audio track latency correction
>>>> >>> is not applied to the first audio track, only to subsequent audio
>>>> >>> tracks.
>>>> >>>
>>>> >>> >
>>>> >>> > There is also midi synth latency, though: it can take time for
>>>> >>> > your
>>>> >>> > MIDI
>>>> >>> > device to produce sound.  There is an option to compensate for
>>>> >>> > that
>>>> in
>>>> >>> > the
>>>> >>> > MIDI device preferences, but without calibrating it in addition to
>>>> >>> > regular
>>>> >>> > latency, you'll still have them out of sync.
>>>> >>>
>>>> >>> I've calibrated the MIDI latency on my test set-up, though it is not
>>>> >>> necessary to do so for purpose of illustrating this problem.
>>>> >>> (Calibrating the MIDI latency becomes important when playing Audio
>>>> >>> tracks and Note tracks at the same time.)
>>>> >>>
>>>> >>>
>>>> >>> A practical example of where the issue is important.
>>>> >>> Say that you have a MIDI track with multiple instruments and you
>>>> >>> want
>>>> >>> to record each instrument to a separate track so that you can Eq
>>>> >>> them
>>>> >>> individually. The first recorded audio track will be out of sync
>>>> >>> with
>>>> >>> the rest, because every audio track except the first is shifted to
>>>> >>> the
>>>> >>> left by the audio track latency correction.
>>>> >>>
>>>> >>> Steve
>>>> >>>
>>>> >>> >
>>>> >>> > --Poke
>>>> >>> >
>>>> >>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>>>> >>> > <[hidden email]> wrote:
>>>> >>> >>
>>>> >>> >> 1) Import a MIDI track
>>>> >>> >> 2) Configure your system so that you can record it.
>>>> >>> >> 3) Record the Note track to an audio track.
>>>> >>> >> 4) Solo the Note track
>>>> >>> >> 5) Record the Note track again (to a new audio track).
>>>> >>> >>
>>>> >>> >> Note that the two audio tracks are out of sync because the second
>>>> >>> >> track has had "latency correction" applied and the first audio
>>>> >>> >> track
>>>> >>> >> hasn't.
>>>> >>> >>
>>>> >>> >> What is the correct behaviour here? Should latency correction be
>>>> >>> >> applied to the first audio track if a Note track exists?
>>>> >>> >>
>>>> >>> >> Steve
>>>> >>> >>
>>>> >>> >>
>>>> >>> >>
>>>> >>> >> ------------------------------------------------------------
>>>> ------------------
>>>> >>> >> Check out the vibrant tech community on one of the world's most
>>>> >>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> >>> >> _______________________________________________
>>>> >>> >> Audacity-quality mailing list
>>>> >>> >> [hidden email]
>>>> >>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>> >>> >
>>>> >>> >
>>>> >>> >
>>>> >>> >
>>>> >>> > ------------------------------------------------------------
>>>> ------------------
>>>> >>> > Check out the vibrant tech community on one of the world's most
>>>> >>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> >>> > _______________________________________________
>>>> >>> > Audacity-quality mailing list
>>>> >>> > [hidden email]
>>>> >>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>> >>> >
>>>> >>>
>>>> >>>
>>>> >>> ------------------------------------------------------------
>>>> ------------------
>>>> >>> Check out the vibrant tech community on one of the world's most
>>>> >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> >>> _______________________________________________
>>>> >>> Audacity-quality mailing list
>>>> >>> [hidden email]
>>>> >>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>> >>
>>>> >>
>>>> >>
>>>> >> ------------------------------------------------------------
>>>> ------------------
>>>> >> Check out the vibrant tech community on one of the world's most
>>>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> >> _______________________________________________
>>>> >> Audacity-quality mailing list
>>>> >> [hidden email]
>>>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>> >>
>>>> >
>>>> > ------------------------------------------------------------
>>>> ------------------
>>>> > Check out the vibrant tech community on one of the world's most
>>>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> > _______________________________________________
>>>> > Audacity-quality mailing list
>>>> > [hidden email]
>>>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>> >
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Audacity-quality mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Stevethefiddle
So we can see that there are number of disadvantages and traps for the
unwary in retaining the before zero fragment.
Is there any benefit - any reason that the before zero fragment should
be retained? If not, I'll have a look to see how easy / difficult it
is to remove it.

Steve

On 23 July 2017 at 15:30, Robert Hänggi <[hidden email]> wrote:

> Another benefit of removing all before zero:
> The align commands will always be accurate.
> For instance, you've got two tracks, one is recorded and one imported.
> You've made them play perfectly in sync.
> Align them at the cursor and you will be out of sync.
> You can't have start time and content synchronicity at the same time.
> Robert
>
> On 23/07/2017, Steve the Fiddle <[hidden email]> wrote:
>> On 23 July 2017 at 13:14, Robert Hänggi <[hidden email]> wrote:
>>> On 23/07/2017, Peter Sampson <[hidden email]> wrote:
>>>> I am no overdubbing expert (not by a *very* long chalk)
>>>>
>>>> But my understanding is that we don't apply latency to track one
>>>> beacuse what the latency adjustment is there for is to tweak
>>>> subsequent tracks into synchronicity (approximate) with the first track.
>>>>
>>>> Applying the latency correction to the first track would subvert that
>>>> intention.
>>>>
>>> It makes no difference if you apply the correction to the first track or
>>> not.
>>> If you're overdubbing, you will try to play or sing or whatever in
>>> sync with the first track.
>>
>> It makes 'almost' no difference if the correction is applied to the
>> first track. By default it would trim the first 0.1 sec from the start
>> of the recording. In practical terms, I doubt that anyone clicks the
>> record button with such precision that 0.1 seconds makes any
>> difference.
>>
>> It 'could' perhaps make a difference if recording was initiated by a
>> script (I'm thinking of future uses of mod-script-pipe), but in that
>> case we would probably want control of latency correction for other
>> tracks too.
>>
>>>
>>> The problem becomes apparent with the presence of note tracks.
>>
>> Yes, The reason for latency compensation is so that what Audacity
>> records is in time with what Audacity plays. If we have a click track,
>> which could either be an audio track or a note track, and we record a
>> new track while listening to that click track, we want the recording
>> to be in time with that click track. Due to latency, the new track
>> will initially be slightly later than the click, so latency correction
>> shifts the track to compensate.
>>
>> So for tracks recorded while Audacity is playing something else
>> (audio, MIDI or other), latency compensation is necessary. For
>> recording when Audacity is not playing anything else it is not
>> necessary, but I don't think there's any practical disbenefit either.
>>
>> With the new support for playing Note tracks, we are now in a
>> situation where we may not be sure if Audacity is playing anything. In
>> the future we could have a real-time metronome, and if we are making a
>> special case for "the first recorded track when Audacity is not
>> playing anything", then we would need to take into account whether the
>> metronome is playing or not.
>>
>> My inclination is to just drop the special case now and apply latency
>> compensation in all cases. However, I don't think that we would want
>> to be hiding a bit of audio behind zero for people that record one
>> track only. I also question whether there is any benefit in hiding a
>> bit of audio behind zero for any tracks.
>>
>> There is an important disadvantage in retaining the "compensated"
>> (default 100 ms) fragment behind zero, and that is that if a user
>> wants to export tracks for use in another multi-track application,
>> they must manually delete the before zero fragment or their tracks
>> will not be synchronised.
>>
>> Currently with Append Record, the "compensated fragment" is discarded.
>> We only retain it when recording to a new track.
>>
>> Steve
>>
>>>
>>> As another example:
>>> Imagine that we had an internal metronome that is automatically active
>>> during recording.
>>> If you would record the first track, it would naturally be off since
>>> latency-correction isn't applied.
>>>
>>> And yet another:
>>> My guitar amplifier has a in-built metronome (a blinking light) that's
>>> in sync with e.g. the delay effect.
>>> If I wanted to record several versions of a riff, I would have first
>>> to add an empty track in order to avoid an uncorrected take.
>>>
>>> Robert
>>>
>>>
>>>> But please ignore me if I am talking out of my hat.
>>>>
>>>> Peter
>>>>
>>>> On Sun, Jul 23, 2017 at 12:34 AM, Robert Hänggi <[hidden email]>
>>>> wrote:
>>>>
>>>>> On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:
>>>>> > On 22 July 2017 at 20:18, Paul Licameli <[hidden email]>
>>>>> > wrote:
>>>>> >> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>>>>> >>
>>>>> >>                if (mPlaybackTracks.size() > 0 ||
>>>>> >> mMidiPlaybackTracks.size()
>>>>> >>> 0)
>>>>> >
>>>>> > I'm wondering if that is actually the 'right' behaviour.
>>>>> > Why do we special case the first track at all, and why do we retain
>>>>> > the before zero section?
>>>>> Do you mean that latency correction is never applied to the first track?
>>>>> +1 for removing this behaviour.
>>>>>
>>>>> For the second one:
>>>>> Do you propose to trash all that is before time zero? +1 too.
>>>>>
>>>>> What happens on "append record".
>>>>> if the audio of the correction length is automatically removed, then
>>>>> it is a strong point for doing it as well before zero.
>>>>> And if nothing happens with regard to correction, it would be very
>>>>> weird... ;)
>>>>>
>>>>> Robert
>>>>>
>>>>>
>>>>> > After all, the Note track may or may not be playable, depending on
>>>>> > whether or not the user has a functioning MIDI device set up, and we
>>>>> > have no way of knowing  if they do (though we may be  able to tell if
>>>>> > they don't).
>>>>> >
>>>>> > Steve
>>>>> >
>>>>> >>
>>>>> >>
>>>>> >> I leave you to judge whether to commit and push that.
>>>>> >>
>>>>> >> PRL
>>>>> >>
>>>>> >>
>>>>> >> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>>>>> >> <[hidden email]>
>>>>> >> wrote:
>>>>> >>>
>>>>> >>> On 22 July 2017 at 19:23, Pokechu22
>>>>> >>> <[hidden email]> wrote:
>>>>> >>> > Latency correction probably should be applied to the first audio
>>>>> track
>>>>> >>> > if
>>>>> >>> > recording with a note track; I'm not sure if it is though.
>>>>> >>>
>>>>> >>> No it isn't, and that's my point. The audio track latency correction
>>>>> >>> is not applied to the first audio track, only to subsequent audio
>>>>> >>> tracks.
>>>>> >>>
>>>>> >>> >
>>>>> >>> > There is also midi synth latency, though: it can take time for
>>>>> >>> > your
>>>>> >>> > MIDI
>>>>> >>> > device to produce sound.  There is an option to compensate for
>>>>> >>> > that
>>>>> in
>>>>> >>> > the
>>>>> >>> > MIDI device preferences, but without calibrating it in addition to
>>>>> >>> > regular
>>>>> >>> > latency, you'll still have them out of sync.
>>>>> >>>
>>>>> >>> I've calibrated the MIDI latency on my test set-up, though it is not
>>>>> >>> necessary to do so for purpose of illustrating this problem.
>>>>> >>> (Calibrating the MIDI latency becomes important when playing Audio
>>>>> >>> tracks and Note tracks at the same time.)
>>>>> >>>
>>>>> >>>
>>>>> >>> A practical example of where the issue is important.
>>>>> >>> Say that you have a MIDI track with multiple instruments and you
>>>>> >>> want
>>>>> >>> to record each instrument to a separate track so that you can Eq
>>>>> >>> them
>>>>> >>> individually. The first recorded audio track will be out of sync
>>>>> >>> with
>>>>> >>> the rest, because every audio track except the first is shifted to
>>>>> >>> the
>>>>> >>> left by the audio track latency correction.
>>>>> >>>
>>>>> >>> Steve
>>>>> >>>
>>>>> >>> >
>>>>> >>> > --Poke
>>>>> >>> >
>>>>> >>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>>>>> >>> > <[hidden email]> wrote:
>>>>> >>> >>
>>>>> >>> >> 1) Import a MIDI track
>>>>> >>> >> 2) Configure your system so that you can record it.
>>>>> >>> >> 3) Record the Note track to an audio track.
>>>>> >>> >> 4) Solo the Note track
>>>>> >>> >> 5) Record the Note track again (to a new audio track).
>>>>> >>> >>
>>>>> >>> >> Note that the two audio tracks are out of sync because the second
>>>>> >>> >> track has had "latency correction" applied and the first audio
>>>>> >>> >> track
>>>>> >>> >> hasn't.
>>>>> >>> >>
>>>>> >>> >> What is the correct behaviour here? Should latency correction be
>>>>> >>> >> applied to the first audio track if a Note track exists?
>>>>> >>> >>
>>>>> >>> >> Steve
>>>>> >>> >>
>>>>> >>> >>
>>>>> >>> >>
>>>>> >>> >> ------------------------------------------------------------
>>>>> ------------------
>>>>> >>> >> Check out the vibrant tech community on one of the world's most
>>>>> >>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >>> >> _______________________________________________
>>>>> >>> >> Audacity-quality mailing list
>>>>> >>> >> [hidden email]
>>>>> >>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>> >
>>>>> >>> >
>>>>> >>> >
>>>>> >>> >
>>>>> >>> > ------------------------------------------------------------
>>>>> ------------------
>>>>> >>> > Check out the vibrant tech community on one of the world's most
>>>>> >>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >>> > _______________________________________________
>>>>> >>> > Audacity-quality mailing list
>>>>> >>> > [hidden email]
>>>>> >>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>> >
>>>>> >>>
>>>>> >>>
>>>>> >>> ------------------------------------------------------------
>>>>> ------------------
>>>>> >>> Check out the vibrant tech community on one of the world's most
>>>>> >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >>> _______________________________________________
>>>>> >>> Audacity-quality mailing list
>>>>> >>> [hidden email]
>>>>> >>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> ------------------------------------------------------------
>>>>> ------------------
>>>>> >> Check out the vibrant tech community on one of the world's most
>>>>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >> _______________________________________________
>>>>> >> Audacity-quality mailing list
>>>>> >> [hidden email]
>>>>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>
>>>>> >
>>>>> > ------------------------------------------------------------
>>>>> ------------------
>>>>> > Check out the vibrant tech community on one of the world's most
>>>>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> > _______________________________________________
>>>>> > Audacity-quality mailing list
>>>>> > [hidden email]
>>>>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >
>>>>>
>>>>> ------------------------------------------------------------
>>>>> ------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> Audacity-quality mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Audacity-quality mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Paul Licameli


On Sun, Jul 23, 2017 at 5:07 PM, Steve the Fiddle <[hidden email]> wrote:
So we can see that there are number of disadvantages and traps for the
unwary in retaining the before zero fragment.
Is there any benefit - any reason that the before zero fragment should
be retained? If not, I'll have a look to see how easy / difficult it
is to remove it.

Steve

No opposition from me.

If you do change that part of the code, though, I will want to review it, to be sure it is consistent with my exception  safety project.

PRL

 

On 23 July 2017 at 15:30, Robert Hänggi <[hidden email]> wrote:
> Another benefit of removing all before zero:
> The align commands will always be accurate.
> For instance, you've got two tracks, one is recorded and one imported.
> You've made them play perfectly in sync.
> Align them at the cursor and you will be out of sync.
> You can't have start time and content synchronicity at the same time.
> Robert
>
> On 23/07/2017, Steve the Fiddle <[hidden email]> wrote:
>> On 23 July 2017 at 13:14, Robert Hänggi <[hidden email]> wrote:
>>> On 23/07/2017, Peter Sampson <[hidden email]> wrote:
>>>> I am no overdubbing expert (not by a *very* long chalk)
>>>>
>>>> But my understanding is that we don't apply latency to track one
>>>> beacuse what the latency adjustment is there for is to tweak
>>>> subsequent tracks into synchronicity (approximate) with the first track.
>>>>
>>>> Applying the latency correction to the first track would subvert that
>>>> intention.
>>>>
>>> It makes no difference if you apply the correction to the first track or
>>> not.
>>> If you're overdubbing, you will try to play or sing or whatever in
>>> sync with the first track.
>>
>> It makes 'almost' no difference if the correction is applied to the
>> first track. By default it would trim the first 0.1 sec from the start
>> of the recording. In practical terms, I doubt that anyone clicks the
>> record button with such precision that 0.1 seconds makes any
>> difference.
>>
>> It 'could' perhaps make a difference if recording was initiated by a
>> script (I'm thinking of future uses of mod-script-pipe), but in that
>> case we would probably want control of latency correction for other
>> tracks too.
>>
>>>
>>> The problem becomes apparent with the presence of note tracks.
>>
>> Yes, The reason for latency compensation is so that what Audacity
>> records is in time with what Audacity plays. If we have a click track,
>> which could either be an audio track or a note track, and we record a
>> new track while listening to that click track, we want the recording
>> to be in time with that click track. Due to latency, the new track
>> will initially be slightly later than the click, so latency correction
>> shifts the track to compensate.
>>
>> So for tracks recorded while Audacity is playing something else
>> (audio, MIDI or other), latency compensation is necessary. For
>> recording when Audacity is not playing anything else it is not
>> necessary, but I don't think there's any practical disbenefit either.
>>
>> With the new support for playing Note tracks, we are now in a
>> situation where we may not be sure if Audacity is playing anything. In
>> the future we could have a real-time metronome, and if we are making a
>> special case for "the first recorded track when Audacity is not
>> playing anything", then we would need to take into account whether the
>> metronome is playing or not.
>>
>> My inclination is to just drop the special case now and apply latency
>> compensation in all cases. However, I don't think that we would want
>> to be hiding a bit of audio behind zero for people that record one
>> track only. I also question whether there is any benefit in hiding a
>> bit of audio behind zero for any tracks.
>>
>> There is an important disadvantage in retaining the "compensated"
>> (default 100 ms) fragment behind zero, and that is that if a user
>> wants to export tracks for use in another multi-track application,
>> they must manually delete the before zero fragment or their tracks
>> will not be synchronised.
>>
>> Currently with Append Record, the "compensated fragment" is discarded.
>> We only retain it when recording to a new track.
>>
>> Steve
>>
>>>
>>> As another example:
>>> Imagine that we had an internal metronome that is automatically active
>>> during recording.
>>> If you would record the first track, it would naturally be off since
>>> latency-correction isn't applied.
>>>
>>> And yet another:
>>> My guitar amplifier has a in-built metronome (a blinking light) that's
>>> in sync with e.g. the delay effect.
>>> If I wanted to record several versions of a riff, I would have first
>>> to add an empty track in order to avoid an uncorrected take.
>>>
>>> Robert
>>>
>>>
>>>> But please ignore me if I am talking out of my hat.
>>>>
>>>> Peter
>>>>
>>>> On Sun, Jul 23, 2017 at 12:34 AM, Robert Hänggi <[hidden email]>
>>>> wrote:
>>>>
>>>>> On 22/07/2017, Steve the Fiddle <[hidden email]> wrote:
>>>>> > On 22 July 2017 at 20:18, Paul Licameli <[hidden email]>
>>>>> > wrote:
>>>>> >> Steve, I think you need to change line 2417 of AudioIO.cpp to:
>>>>> >>
>>>>> >>                if (mPlaybackTracks.size() > 0 ||
>>>>> >> mMidiPlaybackTracks.size()
>>>>> >>> 0)
>>>>> >
>>>>> > I'm wondering if that is actually the 'right' behaviour.
>>>>> > Why do we special case the first track at all, and why do we retain
>>>>> > the before zero section?
>>>>> Do you mean that latency correction is never applied to the first track?
>>>>> +1 for removing this behaviour.
>>>>>
>>>>> For the second one:
>>>>> Do you propose to trash all that is before time zero? +1 too.
>>>>>
>>>>> What happens on "append record".
>>>>> if the audio of the correction length is automatically removed, then
>>>>> it is a strong point for doing it as well before zero.
>>>>> And if nothing happens with regard to correction, it would be very
>>>>> weird... ;)
>>>>>
>>>>> Robert
>>>>>
>>>>>
>>>>> > After all, the Note track may or may not be playable, depending on
>>>>> > whether or not the user has a functioning MIDI device set up, and we
>>>>> > have no way of knowing  if they do (though we may be  able to tell if
>>>>> > they don't).
>>>>> >
>>>>> > Steve
>>>>> >
>>>>> >>
>>>>> >>
>>>>> >> I leave you to judge whether to commit and push that.
>>>>> >>
>>>>> >> PRL
>>>>> >>
>>>>> >>
>>>>> >> On Sat, Jul 22, 2017 at 2:39 PM, Steve the Fiddle
>>>>> >> <[hidden email]>
>>>>> >> wrote:
>>>>> >>>
>>>>> >>> On 22 July 2017 at 19:23, Pokechu22
>>>>> >>> <[hidden email]> wrote:
>>>>> >>> > Latency correction probably should be applied to the first audio
>>>>> track
>>>>> >>> > if
>>>>> >>> > recording with a note track; I'm not sure if it is though.
>>>>> >>>
>>>>> >>> No it isn't, and that's my point. The audio track latency correction
>>>>> >>> is not applied to the first audio track, only to subsequent audio
>>>>> >>> tracks.
>>>>> >>>
>>>>> >>> >
>>>>> >>> > There is also midi synth latency, though: it can take time for
>>>>> >>> > your
>>>>> >>> > MIDI
>>>>> >>> > device to produce sound.  There is an option to compensate for
>>>>> >>> > that
>>>>> in
>>>>> >>> > the
>>>>> >>> > MIDI device preferences, but without calibrating it in addition to
>>>>> >>> > regular
>>>>> >>> > latency, you'll still have them out of sync.
>>>>> >>>
>>>>> >>> I've calibrated the MIDI latency on my test set-up, though it is not
>>>>> >>> necessary to do so for purpose of illustrating this problem.
>>>>> >>> (Calibrating the MIDI latency becomes important when playing Audio
>>>>> >>> tracks and Note tracks at the same time.)
>>>>> >>>
>>>>> >>>
>>>>> >>> A practical example of where the issue is important.
>>>>> >>> Say that you have a MIDI track with multiple instruments and you
>>>>> >>> want
>>>>> >>> to record each instrument to a separate track so that you can Eq
>>>>> >>> them
>>>>> >>> individually. The first recorded audio track will be out of sync
>>>>> >>> with
>>>>> >>> the rest, because every audio track except the first is shifted to
>>>>> >>> the
>>>>> >>> left by the audio track latency correction.
>>>>> >>>
>>>>> >>> Steve
>>>>> >>>
>>>>> >>> >
>>>>> >>> > --Poke
>>>>> >>> >
>>>>> >>> > On Sat, Jul 22, 2017 at 11:05 AM, Steve the Fiddle
>>>>> >>> > <[hidden email]> wrote:
>>>>> >>> >>
>>>>> >>> >> 1) Import a MIDI track
>>>>> >>> >> 2) Configure your system so that you can record it.
>>>>> >>> >> 3) Record the Note track to an audio track.
>>>>> >>> >> 4) Solo the Note track
>>>>> >>> >> 5) Record the Note track again (to a new audio track).
>>>>> >>> >>
>>>>> >>> >> Note that the two audio tracks are out of sync because the second
>>>>> >>> >> track has had "latency correction" applied and the first audio
>>>>> >>> >> track
>>>>> >>> >> hasn't.
>>>>> >>> >>
>>>>> >>> >> What is the correct behaviour here? Should latency correction be
>>>>> >>> >> applied to the first audio track if a Note track exists?
>>>>> >>> >>
>>>>> >>> >> Steve
>>>>> >>> >>
>>>>> >>> >>
>>>>> >>> >>
>>>>> >>> >> ------------------------------------------------------------
>>>>> ------------------
>>>>> >>> >> Check out the vibrant tech community on one of the world's most
>>>>> >>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >>> >> _______________________________________________
>>>>> >>> >> Audacity-quality mailing list
>>>>> >>> >> [hidden email]
>>>>> >>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>> >
>>>>> >>> >
>>>>> >>> >
>>>>> >>> >
>>>>> >>> > ------------------------------------------------------------
>>>>> ------------------
>>>>> >>> > Check out the vibrant tech community on one of the world's most
>>>>> >>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >>> > _______________________________________________
>>>>> >>> > Audacity-quality mailing list
>>>>> >>> > [hidden email]
>>>>> >>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>> >
>>>>> >>>
>>>>> >>>
>>>>> >>> ------------------------------------------------------------
>>>>> ------------------
>>>>> >>> Check out the vibrant tech community on one of the world's most
>>>>> >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >>> _______________________________________________
>>>>> >>> Audacity-quality mailing list
>>>>> >>> [hidden email]
>>>>> >>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> ------------------------------------------------------------
>>>>> ------------------
>>>>> >> Check out the vibrant tech community on one of the world's most
>>>>> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> >> _______________________________________________
>>>>> >> Audacity-quality mailing list
>>>>> >> [hidden email]
>>>>> >> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >>
>>>>> >
>>>>> > ------------------------------------------------------------
>>>>> ------------------
>>>>> > Check out the vibrant tech community on one of the world's most
>>>>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> > _______________________________________________
>>>>> > Audacity-quality mailing list
>>>>> > [hidden email]
>>>>> > https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>> >
>>>>>
>>>>> ------------------------------------------------------------
>>>>> ------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> Audacity-quality mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Audacity-quality mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Audacity-quality mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Richard Ash (audacity-help)
In reply to this post by Stevethefiddle
On Sun, 23 Jul 2017 22:07:02 +0100
Steve the Fiddle <[hidden email]> wrote:

> So we can see that there are number of disadvantages and traps for the
> unwary in retaining the before zero fragment.
> Is there any benefit - any reason that the before zero fragment should
> be retained?
I would be fairly miffed if I found that Audacity kept slicing the
start off my recordings. Given the choice, I would probably have
pre-roll enabled (i.e. keep sound from before I pressed record). I
essentially never overdub, but do use Audacity quite a bit as a "grab
that and analyse it" tool. I don't want to have to press record and
then wait before making the sound to be sure I don't loose a bit.

However presumably I could get round this by setting the "Latency
Correction" preference to zero?

Richard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Stevethefiddle
On 25 July 2017 at 20:29, Richard Ash <[hidden email]> wrote:

> On Sun, 23 Jul 2017 22:07:02 +0100
> Steve the Fiddle <[hidden email]> wrote:
>
>> So we can see that there are number of disadvantages and traps for the
>> unwary in retaining the before zero fragment.
>> Is there any benefit - any reason that the before zero fragment should
>> be retained?
> I would be fairly miffed if I found that Audacity kept slicing the
> start off my recordings. Given the choice, I would probably have
> pre-roll enabled (i.e. keep sound from before I pressed record). I
> essentially never overdub, but do use Audacity quite a bit as a "grab
> that and analyse it" tool. I don't want to have to press record and
> then wait before making the sound to be sure I don't loose a bit.

"Waiting" for 0.1 seconds ?

>
> However presumably I could get round this by setting the "Latency
> Correction" preference to zero?

Absolutely. If you don't record to multiple tracks, there's no need
for latency compensation.

"Pre-roll recoding" in the sense of maintaining a recording buffer so
that recording can start 'before' the record button is pressed, has
had quite a few requests. It's an ideal solution for those "grab that
now" moments, though probably an "off by default" option. To be
worthwhile, I think it would need to hold at least a few seconds of
audio in RAM.

Steve

>
> Richard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MIDI and latency

Robert Hänggi
In reply to this post by Richard Ash (audacity-help)
On 25/07/2017, Richard Ash <[hidden email]> wrote:

> On Sun, 23 Jul 2017 22:07:02 +0100
> Steve the Fiddle <[hidden email]> wrote:
>
>> So we can see that there are number of disadvantages and traps for the
>> unwary in retaining the before zero fragment.
>> Is there any benefit - any reason that the before zero fragment should
>> be retained?
> I would be fairly miffed if I found that Audacity kept slicing the
> start off my recordings. Given the choice, I would probably have
> pre-roll enabled (i.e. keep sound from before I pressed record). I
> essentially never overdub, but do use Audacity quite a bit as a "grab
> that and analyse it" tool. I don't want to have to press record and
> then wait before making the sound to be sure I don't loose a bit.

You're mixing two concepts I think:

1. Roll-in --> Starts the recording earlier than the edit cursor
position. This can either only play before the edit cursor or also
start recording from there as well.

2. Pre-buffering --> the input device is always monitored and buffered
so that you have e.g. the recording from five seconds earlier than
you've pressed the key. Naturally a good feature for recording live
events (no "Darn, I missed the song intro again...")

The latter would be something that has to be managed for each clip individually.
The pre-buffer would be hidden by default but you could retrieve this
audio by dragging a handle or something.
This is closely related to automatic cross fades between adjacent
clips since something has to overlap in order to do that.

Robert


>
> However presumably I could get round this by setting the "Latency
> Correction" preference to zero?
>
> Richard
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Audacity-quality mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-quality
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Audacity-quality mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-quality
Loading...