Skip to content

ArtScienceLab/ARDUINO_LTC_DECODER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTC decoder for Teensy

For synchronization between several devices SMPTE timecode data is often encoded into audio using LTC or linear time code.

This repository contains several LTC decoders for different purposes.

  • LTCDecoder contains a PlatformIO Teensy project for the Atom text editor. for a Teensy 3.2 microcontroller with audio shield. The audio shield takes care of the line level audio input. This audio input is then decoded. The decoding is done by libltc. The library runs as is on a Teensy, no modifications are needed. The repository is split up in three parts:
  • etc contains an LTC decoder for PC, use the makefile to build an executable. It also contains some short SMPTE test files
  • doc contains a picture of the hardware needed.
  • LTCInterruptSync contains a simplified LTC decoder for Teensy 3.2 used only to generate an accurate pulse every second at the start of the first frame. It only works for 30fps LTC. It does not decode the full LTC information but only the information needed to generate the sync pulse. It expects a LTC signal on which the Teensy “CHANGE” interrupts reacts: ideally the midpoint is 3.3V/2, the max value about 3.3V and the min value close to zero.

Testing

For testing purposes files can be generated with ltcgen from ltctools (brew install ltc-tools).

ltcgen -f 30 -t 12:13:14:00 -d 2 -s 48000 12_13_14.wav
ffmpeg -i 12_13_14.wav -ac 1 -ar 12000 -f u8 -acodec pcm_u8 12_13_14.raw @dd if=12_13_14.raw of=offset_12_13_14.raw ibs=200 skip=1
xxd -i ../test_files/offset_12_13_14.raw > test_12_13_14.h

License

Since libltc uses LGPL, LGPL is used here as well.

Credits

Developed by Joren Six at IPEM, University Ghent for the ASIL lab of de Krook.

About

SMPTE/LTC decoder for Teensy 3.2 microcontroller audio shield

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published