How to sync with LTC

Hello all,

I am currently testing a Fostex R8 8-track R2R recorder a friend of mine lent me. One thing I want to try is to sync Ardour to LTC on the tape (to be able to print some tracks from Ardour to tape and then rerecord them in Ardour from there).

I am running a fresh copy of Ardour 8.1 on Fedora. Using the builtin LTC generator I was able to record six minutes of timecode on track 8 of the R2R. But I am probably missing something as I cannot get Ardour to recognize and chase the timecode. :thinking:

LTC is coming in on input 16 of my soundcard and can be heard when monitored on Ardour’s mixer. In the “transport master” window I set the radio button to LTC and choose the right input. But no timecode is detected when the tape is running. The fields remain empty.

Below the play button I click on “int” to make Ardour sync to LTC. This changes the button to blinking “LTC”. Still no timecode is detected, neither in the “transport master” window nor in the master clock display. But when I switch back to “int” the master clock shows the last received LTC frame. So I guess it is actually decoded.

I did read the chapter on external sync in the reference manual, but might still be missing something. I am grateful for any hint. :slight_smile:

KR, Dennis

In a quick test it seems that Transport Masters are broken in Ardour 8; not just LTC, MTC as well :frowning:

Not that it helps, but to double-check: Ardour comes with a plugin “LTC Reader”, you can add that to the Bus that receives LTC data from the tape and check that received data is actually decoded.

image

Assuming the LTC Reader showed a valid signal, the issue might be fixed since Ardour 8.1.148.

There was a bug that resulted in any Timecode master to be disabled, when it was disconnected. In older versions of Ardour you can work around this using Window Connection Manager instead of the dropdown. First disconnect the LTC input and then manually connect it (here to input 16).

Then again there could well be some other additional issue, but LTC sync works here now in a quick test.

Hi Robin,

Thanks for the quick and extensive help. The LTC Reader plugin recognizes the timecode. Unfortunately disconnecting/reconnecting the input doesn’t work, neither in the “Transport Master” nor the “Connection Manager” window. The version is 8.1.0, the current official binary.

I think I will try to compile from git. Unfortunately the Fedora version is quite old (another todo). Getting all required libraries could be a challenge. Let me see.

KR, Dennis

Thanks for checking. That is good news!

The plugin (actually a Lua script) uses the same LTC decoder that Arodur’s Timecode master does.

Then there might be some other bug… :thinking:

You could also try tomorrow’s https://nightly.ardour.org build (it installs to /opt and can be installed in parallel to distro versions - demo is fine to test)

What a coincidence. I just checked the Lua code of the plugin and saw that it is just a wrapper around Ardour’s LTC Decoder. And while looking for the build dependencies found the nightly builds. Then I saw your answer. :slight_smile:

I will give it a try tomorrow. Need to catch some sleep first as it is 1:38am here.

KR, Dennis

Hi Robin,

8.1.148 just hit the nightly server. I have seen the commits you have done for this version, many thanks for that. Still no luck, I am afraid.

For comparison I created a new session with 8.1.148, but that didn’t make a difference. The timecode you see below the master clock is only updated once when I toggle the time master LTC → int → LTC. Each time the delta keeps growing as the Ardour playback is not rolling.

Just a small sidenote: When you change the connection in the “Audio Connections” window the dropdowns in the “Transport Master” window don’t update themselves.

KR, Dennis

1 Like

Odd. That works here. I’m using Ardour/ALSA.

What audio system do you use (Ardour menu > Window > Audio/MIDI Setup)?

I am using Jack 1.9 which I am manually starting before Ardour.

Jack addresses the soundcard via ALSA.

Can you try if not using JACK helps (and perhaps a larger buffersize)?

Buffersize doesn’t change the effect, neither with Jack nor ALSA. But with ALSA it works, with Jack not (LTC sync and dropdown update).

1 Like

OK, I found another bug (reloading a session or switching snapshots will drop the LTC port).

I don’t know if that can explain the issue with JACK though (I don’t use JACK).

My educated guess is that this is unrelated, because it doesn’t work with a fresh session either. :slight_smile: Interestingly the port is connected, as the timecode is displayed below the master clock every time I toggle LTC → int → LTC.

Looking at your last commit 0786be8, I wonder if the change in PortManager::remove_session_ports () completely solves the new found bug. I am not familiar with the Ardour code, so hopefully this doesn’t sound too stupid.

In the for-loop you check i->second->flags () & TransportMasterPort, but the PortFlags type has two more transport-related flags: TransportGenerator and TransportSyncPort.

Maybe you could define an inline method in the Port class that checks, whether the port is a session port / of a special family. If it makes sense you could check the additional flags there and it would be easier to spot this, when new port types are added.

Just a random thought …

A while ago (Ardour6) Ardour’s sync engine was re-worked into a finite state-machine. This lead to transport-masters (which control the session’s transport) to be moved out of the Session.

As a result, ports that control session transport now exist globally (without a session).

This had no effect on timecode generators (which do require a session, and are part of the session).

Last but not least, TransportSyncPort indicates that the port is not part of the normal session processing. Notably it is excluded from being resampled during vari-speed. This applies to both TransportMasterPort and TransportGenerator (in fact it is bitwise OR of those two flags).

I just tested this here using jackd (1.9.17), Ardour 8.1-149-g0786be859d and a JACK LTC generator and cannot reproduce either of your findings.

  1. The dropdown is correctly updated when the the Audio Connection Manager is used
  2. LTC is correctly detected (and Ardour can sync to it)

So there must be something more to it. Perhaps related to using hardware ports, though I cannot see how that would make a difference [yet].

Okay clear. Thanks for the explanation. And thanks for the retest.

Out of my head I don’t remember the exact Jack version. But it must be older than 1.9.17 since the installation is a few years old. I will try to test with a more recent version.

Thanks again for the patience and support!

If you can compile Ardour from source, (on debian based distros apt get build-dep ardour) try adding some printf() in libs/ardour/ltc_slave.cc

Check if LTC_TransportMaster::parse_ltc is called periodically, and if/when the loop in LTC_TransportMaster::process_ltc succeeds.

while (ltc_decoder_read (decoder, &ltc_frame))`

PS. For the latter, you could also use a debug-build of Ardour and run

Ardour8 -D LTC