Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blocks:app-note:ltc_timecode [2025-05-05 08:22]
mattias [Setup the timecode reader software]
blocks:app-note:ltc_timecode [2025-05-06 10:59] (current)
mattias [Make multiple Timecode readers autostart]
Line 81: Line 81:
 ===Configure the driver=== ===Configure the driver===
  
-You must configure the driver for the expected timecode type. This can be done with one of the following methods:+You must configure the driver with the expected timecode type. The driver will fporward this information to the timecode reader program  . This can be done with one of the following methods:
  
 A. Set the 'type' property of this Network Device to the expected type. A. Set the 'type' property of this Network Device to the expected type.
Line 117: Line 117:
 ====Make multiple Timecode readers autostart==== ====Make multiple Timecode readers autostart====
  
 +:!: **IMPORTANT:** To use multiple timecode readers on the same computer, make sure you're running version 1.4 or later of the **timecode-reader** program. You can see the version number by the following command on the command line, while logged in as the pixi-server user. If your version is older than 1.4, {{:blocks:app-note:timecode-reader:timecode-reader-1.4.zip|download version 1.4 here}}, unpack the ZIP and replace the **timecode-reader** file in the //native// subdirectory of the home directory.
  
-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. +<code>~/native/timecode-reader -h</code>
  
-We can rewrite the example unit file into a unit template to do this.+To read more than one LTC timecode source you could duplicate and modify the unit file, thus creating separate unit file for this purpose. However, a better solution is to modify the unit file to a //unit template//, as this keeps all the common stuff in one place. Follow this procudure to use that option.
  
-Rename the unit file like this:+**1.** Rename the unit file like this:
 <code>mv timecode-reader.service timecode-reader@.service</code> <code>mv timecode-reader.service timecode-reader@.service</code>
  
-Edit the unit template.  +**2.** Edit the unit template. 
 <code>nano timecode-reader@.service</code> <code>nano timecode-reader@.service</code>
  
-Use this unit configuration:+Using this configuration:
 <code> <code>
 [unit] [unit]
Line 145: Line 145:
 </code> </code>
  
-Rename the config:+**3.** Rename the unit's configuration file:
 <code>mv timecode-reader.service.config timecode-reader.alpha.config</code> <code>mv timecode-reader.service.config timecode-reader.alpha.config</code>
  
-Make as many copies as you want instances:+**4.** Make a copy of that configuration file with a new name:
 <code>cp timecode-reader.alpha.config timecode-reader.beta.config</code> <code>cp timecode-reader.alpha.config timecode-reader.beta.config</code>
  
 +**5.** Edit the config files, specifying different audio interfaces and different network ports in each instance. 
 +<code>nano timecode-reader.beta.config</code>
  
-Edit the config files as in the single instance case above. Make sure to specify a different audio interface anddifferent  udp port on all the subsequent instances.  +The configuraition file will look something like this (but with your device name and desired port number)
-<code>nano timecode-reader.service.beta.config</code> +
 <code> <code>
 # 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:CARD=Device_1,DEV=0 -p 1634+TIMECODE_READER_OPTIONS=-d plughw:CARD=Device_1,DEV=0 -p 1638
 </code> </code>
  
-Efter any unit change make sure to reinitizialize systemd daemon:+**6.** Notify systemd of your changes:
  
 <code> <code>
 systemctl --user daemon-reload </code> systemctl --user daemon-reload </code>
  
-Enable (autostart) and start the two instances+**7.** Finally, enable and start the two instances
 <code> <code>
 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
 </code> </code>