Skip to main content
The atsa utility performs ATS (Analysis-Transformation-Synthesis) spectral analysis on sound files. ATS is a sinusoidal modeling technique that separates sounds into deterministic (tonal) and stochastic (noise) components.

Syntax

atsa soundfile atsfile [flags]

Arguments

  • soundfile - Input sound file to analyze
  • atsfile - Output ATS analysis file

Options

Time and frequency range

OptionDescriptionDefault
-bStart time in seconds0.0
-eDuration in seconds (or end time)0.0 (entire file)
-lLowest frequency in Hertz20.0
-HHighest frequency in Hertz20000.0

Analysis parameters

OptionDescriptionDefault
-dFrequency deviation (ratio of partial frequency)0.1
-cWindow cycles4
-wWindow type (0=Blackman, 1=Blackman-Harris, 2=Hamming, 3=von Hann)1
-hHop size (ratio of window size)0.25
-mLowest magnitude in dB-60.0

Tracking parameters

OptionDescriptionDefault
-tTrack length in frames3
-sMinimum segment length in frames3
-gMinimum gap length in frames3
-TSMR (Signal-to-Mask Ratio) threshold in dB SPL30.0
-SMinimum segment SMR in dB SPL60.0
-PLast peak contribution (ratio)0.0
-MSMR contribution (ratio)0.5

Output format

OptionDescriptionDefault
-FFile type:
1 = amplitude and frequency only
2 = amplitude, frequency, and phase
3 = amplitude, frequency, and noise
4 = amplitude, frequency, phase, and noise
4

Examples

Basic analysis

atsa input.wav output.ats

Analysis with custom frequency range

atsa input.wav output.ats -l 100 -H 8000

High-quality analysis with fine time resolution

atsa input.wav output.ats -c 8 -h 0.125 -m -80

Analysis without noise residual

atsa input.wav output.ats -F 2

Analyze specific time segment

atsa input.wav output.ats -b 2.5 -e 10.0

Output file format

The ATS file contains:
  • Type 1: Amplitude and frequency tracks for each partial
  • Type 2: Adds phase information for phase-coherent resynthesis
  • Type 3: Adds critical-band noise energy for stochastic residual
  • Type 4: Complete analysis with all parameters

Technical details

Window types

  • Blackman (0): Good frequency resolution with moderate sidelobe rejection
  • Blackman-Harris (1): Excellent sidelobe rejection (default, recommended)
  • Hamming (2): Better frequency resolution but higher sidelobes
  • von Hann (3): Standard window with moderate characteristics

Analysis parameters

  • Frequency deviation: Controls how much a partial’s frequency can change between frames while still being tracked as the same partial
  • Window cycles: Number of fundamental frequency cycles in the analysis window; affects frequency resolution
  • Hop size: Determines time resolution; smaller values give better time resolution but slower analysis
  • SMR threshold: Signal-to-Mask Ratio used to distinguish tonal components from noise

Using ATS files in Csound

ATS analysis files can be used with Csound opcodes:
  • atsread - Read ATS analysis data
  • atsadd - Additive synthesis from ATS data
  • atssinnoi - Separate synthesis of sinusoidal and noise components
  • atsinfo - Get information about an ATS file
  • atscross - Cross-synthesis between ATS files