Re: [time-nuts] Timestamping audio waveforms

2018-03-31 Thread Magnus Danielson
Hi Tim,

On 03/31/2018 04:41 PM, Tim Shoppa wrote:
> I would like sub-millisecond timestamps for a mono audio radio signal that
> I have in the shack.
> 
> The timestamps could be continuous (Every sample) or just every "frame"
> where maybe a frame is a second to a minute.
> 
> I would like to calibrate both the absolute time as well as the delta time
> between samples based on the timestamps. (I would expect that say a nominal
> 48kHz sample rate would be off by many tens of ppm because of crystal
> tolerances.).
> 
> I have a both Windows and Linux based PCs running Audacity with a local
> GPS-based LAN refclock and ntpd. I trust the ntpd time to be stable to the
> sub-millisecond.
> 
> Can Audacity do this kind of timestamping for me based on the system clock?
> 
> Or should I, say, take the PPS from a GPS, and feed it into channel 2, with
> the audio going into channel 1, and make a stereo recording? I suppose I
> could then manually label the filename with the second the recording was
> begun. There would likely be some delta (maybe half the sample interval?)
> between the two channels but I'm fine with that as long as it is at the
> sub-millisecond level.

Have a IRIG-B signal recorded on the second track.
IRIG-B has been decoded before, here is one I threw together:

https://github.com/sa0mad/irigb

You can readout the time for each sample.

Cheers,
Magnus
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Timestamping audio waveforms

2018-03-31 Thread Hal Murray

tsho...@gmail.com said:
> Or should I, say, take the PPS from a GPS, and feed it into channel 2, with
> the audio going into channel 1, and make a stereo recording?  ...

I assume the audio API is for a batch of samples.  If you get time stamps on 
a stream of batches, you can work out the frequency of the crystal the audio 
A/D is using.

I think you will need the PPS approach to calibrate the delay through the 
system.  If it's low enough, you can drop it.

-- 
These are my opinions.  I hate spam.



___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


Re: [time-nuts] Timestamping audio waveforms

2018-03-31 Thread Attila Kinali
On Sat, 31 Mar 2018 10:41:45 -0400
Tim Shoppa  wrote:

> Can Audacity do this kind of timestamping for me based on the system clock?

I don't know about audacity, but writing a small program in c that
reads from the soundcard and does the timestamping is pretty easy.
Should be less than 50 lines of code, with error checking and all.
You can use [1] as a decent starting point.

One important point: Switch off all other applications that access
the soundcard, as some of these are pretty nasty when it comes
to their behaviour. Especially pulseaudio is known to mess with
all kinds of settings while running Oh, and don't even try
to run anything ontop of pulseaudio, it is known to mess up
audio timing by several 10ms, sometimes even over 100ms.

Attila Kinali


[1] https://gist.github.com/albanpeignier/104902

-- 
The bad part of Zurich is where the degenerates
throw DARK chocolate at you.
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


[time-nuts] Timestamping audio waveforms

2018-03-31 Thread Tim Shoppa
I would like sub-millisecond timestamps for a mono audio radio signal that
I have in the shack.

The timestamps could be continuous (Every sample) or just every "frame"
where maybe a frame is a second to a minute.

I would like to calibrate both the absolute time as well as the delta time
between samples based on the timestamps. (I would expect that say a nominal
48kHz sample rate would be off by many tens of ppm because of crystal
tolerances.).

I have a both Windows and Linux based PCs running Audacity with a local
GPS-based LAN refclock and ntpd. I trust the ntpd time to be stable to the
sub-millisecond.

Can Audacity do this kind of timestamping for me based on the system clock?

Or should I, say, take the PPS from a GPS, and feed it into channel 2, with
the audio going into channel 1, and make a stereo recording? I suppose I
could then manually label the filename with the second the recording was
begun. There would likely be some delta (maybe half the sample interval?)
between the two channels but I'm fine with that as long as it is at the
sub-millisecond level.

Tim N3QE
___
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.