Using an Audio Tone Generator in Ecasound
This guide explains how to configure and use Ecasound's built-in tone generator as a real-time audio input source. It outlines the specific command-line syntax required, details the available waveform and frequency parameters, and provides practical examples for routing test tones to soundcards or audio files directly from the terminal.
To specify an audio tone generator as an input source in Ecasound,
use the standard input option (-i) followed by the
tone audio object specifier. The basic syntax is:
-i tone,type,freq[,duration]Parameter Breakdown
type: The waveform generated by the synthesizer. Supported types includesine,square,triangle, andsawtooth.freq: The frequency of the tone measured in Hertz (Hz), such as440for concert pitch A4.duration(optional): The length of time the tone should generate, specified in seconds. If omitted, Ecasound generates the tone continuously until the process is manually stopped.
Practical Examples
Play a continuous 440 Hz sine wave through your default sound device:
ecasound -i tone,sine,440 -o alsaGenerate a 1 kHz test tone for exactly 5 seconds and save it to a WAV file:
ecasound -i tone,sine,1000,5 -o test_tone.wavRoute a 220 Hz sawtooth wave through an effect and monitor the output: You can combine the tone generator input with Ecasound's built-in effects. For instance, to generate a 220 Hz sawtooth tone at 50% volume:
ecasound -i tone,sawtooth,220 -ea:50 -o alsaThis built-in generator eliminates the need for external audio files when testing audio drivers, calibrating output levels, or synthesizing simple acoustic signals.