[time-nuts] Audio format with embedded timestamps?

Chris Albertson albertson.chris at gmail.com
Thu Dec 1 13:09:47 EST 2016


IIn theory it is  pretty easy, first discipline the system clock using
something like NTP then interrupt on the system clock and the interrupt
handler runs a state machine. But if you need to output IRIG-B and when to
generate the sine wave carier in software you end up with latency in the
audio output because it buffers.   Baseband output of a one bit output
could work under Linux but then you'd need external hardware modulate a
carrier.

I think IRIG is best done on a small microcontroiller, perhaps tuning a
light weight RTOS where you can set up a hard 1KHz hardware interrupt.

Either way I think yu have three threads
1. Read the GPS PPS and use this to phase lock some kind of oscillator.
NTP does this.  If will lock the system clock to GPS
2, Generate interrupts at the IRIG frame rate from the above sync's
oscillator/clock
3. output points on the carier that are modulated by the frames that are
computed in thread #2.

You might be able to write loop that in effect implements three threads by
polling the system clock.  You end up with one if statement per thread that
reads IF (time do do thread N) {run thread N}
or you let the POSIX thread system do the work or yu are running on a small
uP and set up hardware trimmer interrupts or let the RTOS do that for you.

Thinking about this, IRIG-B generation would be best done inside the same
uP that runs a GPSDO.


On Thu, Dec 1, 2016 at 8:33 AM, Mark Sims <holrum at hotmail.com> wrote:

> I played with trying to get Lady Heather to generate an IRIG audio
> signal.   I never got it to work well... maybe someday...
>
> -------------------
>
> > One other idea:  Use a stereo audio format and record your audio to one
> track and a time code (like IRIG) on the other track.   IRIG works even on
> analog multitrack tape recorders.  Use it the same way on digital
> multitrack recordings.  Google IRIG Time Code.
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/
> mailman/listinfo/time-nuts
> and follow the instructions there.
>



-- 

Chris Albertson
Redondo Beach, California


More information about the time-nuts mailing list