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.wav

In 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 alsa

Generating 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:

  1. White Noise: Using the Steve Harris LADSPA plugin set (swh-plugins), white noise can be generated using the noise_white plugin:

    ecasound -i null -el:noise_white,0.5 -t:10 -o alsa

    Here, 0.5 sets the linear amplitude, and -t:10 limits the output run time to 10 seconds.

  2. Square Waves: Oscillator plugins such as square_fcac or 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.wav

    In this configuration, 440 specifies the base frequency in Hertz, and 0.8 defines 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:

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.