Generating Test Signals in Ecasound
Ecasound is capable of generating synthetic test signals, including sine waves, square waves, and white noise. While the software provides a native built-in generator for simple sine tones, generating waveforms like square waves and white noise is typically accomplished by pairing Ecasound's null audio inputs with LADSPA generator plugins or piping data from external command-line utilities.
Native Sine Wave Generation
Ecasound includes a built-in tone generator capable of producing pure sine waves directly from the command line without third-party dependencies.
To create a sine wave, use the tone input format:
ecasound -i tone,440,10 -o output.wavIn this command, 440 represents the frequency in Hertz
(A4), and 10 specifies the duration in seconds. Leaving the
duration parameter empty generates a continuous tone for real-time
monitoring through sound cards or testing audio chains:
ecasound -i tone,1000 -o alsaGenerating Square Waves and White Noise via LADSPA
Ecasound does not include built-in presets for square waves or noise, but it natively acts as a host for LADSPA (Linux Audio Developer's Simple Plugin API) plugins. This allows users to generate virtually any synthetic waveform.
To generate these signals, start with a silent or empty stream using
the null input object, then attach an appropriate LADSPA
generator plugin using the -el (enable LADSPA)
operator:
White Noise: Using the Steve Harris LADSPA plugin set (
swh-plugins), white noise can be generated using thenoise_whiteplugin:ecasound -i null -el:noise_white,0.5 -t:10 -o alsaHere,
0.5sets the linear amplitude, and-t:10limits the output run time to 10 seconds.Square Waves: Oscillator plugins such as
square_fcacor general-purpose LADSPA synthesis tools can generate bandlimited square waves directly into Ecasound:ecasound -i null -el:square_fcac,440,0.8 -t:5 -o square.wavIn this configuration,
440specifies the base frequency in Hertz, and0.8defines the output volume level.
Alternative Generation via Standard Pipes
Because Ecasound handles standard input streams cleanly, synthetic
signals can also be piped directly into Ecasound using tools like
sox or system devices:
- Piping from SoX:
sox -n -t wav - synth 5 square 440 | ecasound -i stdin -o alsa - Raw Random Noise:
ecasound -f:s16_le,1,44100 -i /dev/urandom -t:5 -o alsa
Ecasound fulfills the needs of audio engineers and testers by serving as both a lightweight, standalone sine generator and a flexible platform for advanced synthesis using plugins and pipes.