Arm and Trigger Recording with Ecasound Interactive Mode

Ecasound Interactive Mode (EIAM) provides a flexible command-line environment that allows users to manipulate audio routing, processing, and recording in real time. This article explains how to arm and trigger recording interactively using EIAM commands, detailing how chain controls and engine states can be manipulated to queue and execute recording sessions on demand.

Yes, recording can be armed and triggered interactively in Ecasound. While Ecasound does not have a single graphical "record arm" button found in traditional digital audio workstations, the same operational workflow is natively supported through its chain setup, muting, and engine transport commands.

The Mechanism: Simulating Arm and Trigger

In Ecasound, "arming" equates to initializing a chain setup with active inputs and file-based outputs while preventing data from being written. "Triggering" corresponds to opening the data path or starting the processing engine.

You can accomplish interactive arming and triggering using two primary methods in interactive mode:

Method 1: Using Chain Mute and Unmute

This method keeps the processing engine running continuously while toggling the recording state on a dedicated chain.

  1. Arm the setup: Define a chain with your input (such as an ALSA or JACK source) and your target recording output (such as a WAV file), then immediately mute the chain.

    c-add record_chain
    c-select record_chain
    ai-add alsa,default
    ao-add take1.wav
    c-mute
    cs-connect
    start

    At this stage, the audio engine is running, the devices are locked, but audio processing to take1.wav is suppressed. The track is armed.

  2. Trigger recording: Unmute the chain to start writing audio data immediately.

    c-unmute
  3. Stop recording: Mute the chain again or stop the engine.

    c-mute

Method 2: Engine Transport Triggering

If pre-buffering or continuous monitoring is not strictly necessary, the engine transport itself acts as the trigger.

  1. Arm the setup: Configure the input and output chain and connect the chain setup to prepare all buffers and file handles.

    cs-add recording_session
    c-add rec1
    ai-add alsa,default
    ao-add session_output.wav
    cs-connect

    With cs-connect executed, the chain setup is validated, hardware inputs are reserved, and the system is armed.

  2. Trigger recording: Launch the engine.

    start
  3. Halt recording: Stop the engine interactively.

    stop

Method 3: Dynamic Output Addition

In advanced workflows, an input can be running continuously for live monitoring, and a recording destination can be added dynamically to trigger capture.

  1. Run a live monitoring chain:
    c-add monitor
    ai-add alsa,default
    ao-add alsa,default
    start
  2. Arm and trigger a record pass: Add an output file to the active chain on the fly:
    ao-add live_capture.wav
  3. Stop capture: Remove or detach the audio output:
    ao-remove

Summary of Key EIAM Commands