Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blocks:app-note:ltc_timecode [2025-04-25 09:15] mattias [Setup the timecode reader software] |
blocks:app-note:ltc_timecode [2025-05-06 10:59] (current) mattias [Make multiple Timecode readers autostart] |
||
---|---|---|---|
Line 1: | Line 1: | ||
======LTC timecode as sync source====== | ======LTC timecode as sync source====== | ||
- | This application note describes a method to receive analog timecode from an external source. | + | This application note describes a method to receive analog timecode from an external source. |
{{: | {{: | ||
- | I refer to the analog input on the Blocks server in the article, the application can run on any linux computer, so if your source signal is elsewhere it may make sense to pickup the sync signal with another computer running the LTC_timecode reader software. One way of doing that is to use the blocks server image to create the computer. Disable the blocks service and then follow the instructions in this application not to make this into a LTC timecode reader device. | + | We refer to the analog input on the Blocks server in the article, the application can run on any linux computer, so if your source signal is elsewhere it may make sense to pickup the sync signal with another computer running the LTC_timecode reader software. One way of doing that is to use the blocks server image to create the computer. Disable the blocks service and then follow the instructions in this application not to make this into a LTC timecode reader device. |
+ | |||
+ | There are other alternative that sometimes may be more suitable, such as the one shown here: | ||
+ | https:// | ||
====Setup the timecode reader software==== | ====Setup the timecode reader software==== | ||
Plug in the USB audio device to the blocks server. | Plug in the USB audio device to the blocks server. | ||
- | Use a second computer to play [[https:// | + | Use a second computer to play [[https:// |
Plug an 3.5mm audio cable between the computers audio output with the line in/mic input of the analog audio card of the Blocks server. | Plug an 3.5mm audio cable between the computers audio output with the line in/mic input of the analog audio card of the Blocks server. | ||
===Find out the ALSA name of the sound device=== | ===Find out the ALSA name of the sound device=== | ||
To capture the desired device we must figure out the ALSA name of the usb-device. To do so we open the terminal as the pixi-server user and type: | To capture the desired device we must figure out the ALSA name of the usb-device. To do so we open the terminal as the pixi-server user and type: | ||
- | < | + | < |
Look for an entry like: | Look for an entry like: | ||
< | < | ||
Line 58: | Line 61: | ||
===Enable the driver=== | ===Enable the driver=== | ||
The driver to handle the timedata from the LTC-reader software is not enabled by default. | The driver to handle the timedata from the LTC-reader software is not enabled by default. | ||
- | To make a driver | + | To enable the driver |
Change to the script directory: | Change to the script directory: | ||
Line 73: | Line 76: | ||
Under the page Manage/ | Under the page Manage/ | ||
- | The ports is predefined in the driver to match the default configuration to the Timecode reader on the server. | + | The port is predefined in the driver to match the default configuration to the Timecode reader on the server. |
{{: | {{: | ||
+ | ===Configure the driver=== | ||
+ | |||
+ | You must configure the driver with the expected timecode type. The driver will fporward this information to the timecode reader program | ||
+ | |||
+ | A. Set the ' | ||
+ | This can be done using a Task triggered on system start-up or the ' | ||
+ | {{: | ||
+ | |||
+ | B. Set options using JSON data in the " | ||
+ | {{: | ||
===Connect a Blocks timeline to sync with timecode=== | ===Connect a Blocks timeline to sync with timecode=== | ||
Line 104: | Line 117: | ||
====Make multiple Timecode readers autostart==== | ====Make multiple Timecode readers autostart==== | ||
+ | :!: **IMPORTANT: | ||
- | If we want to read more than one LTC timesource we would typically need to duplicate and change the unit files in order to be able to do so. | + | < |
- | We can rewrite | + | To read more than one LTC timecode source you could duplicate and modify |
- | Rename the unit file like this: | + | **1.** |
< | < | ||
- | Edit the unit template. | + | **2.** |
< | < | ||
- | Use this unit configuration: | + | Using this configuration: |
< | < | ||
[unit] | [unit] | ||
Line 132: | Line 145: | ||
</ | </ | ||
- | Rename the config: | + | **3.** |
< | < | ||
- | Make as many copies as you want instances: | + | **4.** |
< | < | ||
+ | **5.** Edit the config files, specifying different audio interfaces and different network ports in each instance. | ||
+ | < | ||
- | Edit the config files as in the single instance case above. Make sure to specify a different udp port on all the subsequent instances. | + | The configuraition file will look something like this (but with your device name and desired |
- | < | + | |
< | < | ||
# Options to pass to the timecode-reader program, e.g., | # Options to pass to the timecode-reader program, e.g., | ||
- | # TIMECODE_READER_OPTIONS=-d "Alsa device name"§ -p "UDP port" | + | # TIMECODE_READER_OPTIONS=-d "Alsa device name" -p "UDP port" |
- | TIMECODE_READER_OPTIONS=-d plughw: | + | TIMECODE_READER_OPTIONS=-d plughw: |
</ | </ | ||
- | Efter any unit change make sure to reinitizialize | + | **6.** Notify |
< | < | ||
- | systemctl --user daemon-reexec | ||
systemctl --user daemon-reload </ | systemctl --user daemon-reload </ | ||
- | Enable (autostart) | + | **7.** Finally, enable |
< | < | ||
systemctl --user enable --now timecode-reader@alpha.service | systemctl --user enable --now timecode-reader@alpha.service | ||
systemctl --user enable --now timecode-reader@beta.service | systemctl --user enable --now timecode-reader@beta.service | ||
</ | </ |