You are here

ATS Binary File Format

Data is stored as double floats in the host's byte order, the binary file has the following format:

ATS-HEADER
ATS-FRAME-#0
...
ATS-FRAME-#N-1

for N frames of data.

ATS-HEADER contains the following data:

ats-magic-number
sampling-rate (samples/sec)
frame-size (samples)
window-size (samples)
partials (number of partials)
frames (number of frames)
ampmax (max. amplitude)
frqmax (max. frequecny)
dur (duration in sec.)
type (frame type, see below)

ats-magic-number is 123.0 (double), it is used for data sanity test only (byte endianess).

ATS-FRAME can be of the following four types:

1.  No phase or noise information present:

time (frame starting time)
amp (par#0 amplitude)
frq (par#0 frequency)
...
amp (par#N-1 amplitude)
frq (par#N-1 frequency)

for N partials. 

2.  With phase information but no noise:

time (frame starting time)
amp (par#0 amplitude)
frq (par#0 frequency)
pha (par#0 phase)
...
amp (par#N-1 amplitude)
frq (par#N-1 frequency)
pha (par#N-1 phase)

for N partials.

3.  With noise information but no phase:

time (frame starting time)
amp (par#0 amplitude)
frq (par#0 frequency)
...
amp (par#N-1 amplitude)
frq (par#N-1 frequency)
energy (band#0 energy)
...
energy (band#24 energy)

for N partials and 25 critical bands.

4.  Both phase and noise information present:

time (frame starting time)
amp (par#0 amplitude)
frq (par#0 frequency)
pha (par#0 phase)
...
amp (par#n amplitude)
frq (par#n frequency)
pha (par#n phase)
noise (band#0 energy)
...
noise (band#n energy)

for N partials and 25 critical bands.