Author Topic: LTC (Linear Time Code)  (Read 122 times)

SoundMike

  • Posts: 369
LTC (Linear Time Code)
« on: 16 Sep '24 - 07:52 »
We are looking into the possibility of generating and sending LTC to an audio output channel. The LTC spec (https://en.wikipedia.org/wiki/Linear_timecode) explains that the longitudinal timecode data format comprises 80-bit codes. Is it possible to use BASS_StreamCreate and a user defined STREAMPROC to pass this data? If so, what flags should be set in the BASS_StreamCreate function call? If not, is there some other way we can send LTC using BASS?

David_AVD

  • Posts: 85
Re: LTC (Linear Time Code)
« Reply #1 on: 17 Sep '24 - 00:48 »
I've also looked into this and have some LTC discussions / info bookmarked, but I've not worked on any code for the generation part yet.

There are sites that generate wav files for a specific section of time code, but that's not what you really want.

David_AVD

  • Posts: 85
Re: LTC (Linear Time Code)
« Reply #2 on: 19 Sep '24 - 22:25 »
I was looking at using BASS_SampleCreate.

Not sure if you could generate complete LTC frames that way, or maybe generate each of the tones as a sample then join them together in the required pattern.

SoundMike

  • Posts: 369
Re: LTC (Linear Time Code)
« Reply #3 on: 20 Sep '24 - 02:54 »
With BASS_SampleCreate we would also need to know what flags to set. I'm getting the impression we will not be able to achieve this using BASS but I'd love to be corrected!

David_AVD

  • Posts: 85
Re: LTC (Linear Time Code)
« Reply #4 on: 20 Sep '24 - 03:27 »
I was thinking that each sample would be one data bit. Actually, it's two tone bits per data bit isn't it?

Maybe just create 2 samples (one cycle each of 1200Hz and 2400Hz ?) and then use them on demand to generate the stream?

The samples can be made to start and end on the zero cross so would join together seamlessly.

This is just an idea off the top of my head and I haven't thought about or looked too closely at it yet.

Generating the LTC frame data (and tone bit data) should not be too hard. I've written some of that already.