Reload Modified Audio Input Files in Ecasound

When working with Ecasound in interactive mode, audio files modified by external editors do not update automatically because active chainsetups cache stream descriptors and file metadata. This article covers how to force Ecasound to reload externally altered audio inputs without closing your interactive session, detailing the primary command sequence—cs-disconnect followed by cs-connect—as well as the targeted input replacement method using ai-remove and ai-add.

The Standard Method: Chainsetup Reconnection

Ecasound does not include a dedicated single-word command such as ai-reload. Instead, the standard and most reliable way to refresh an externally modified input file during an active interactive session is to disconnect and reconnect the current chainsetup.

To reload all inputs and re-read file headers and lengths from disk, execute the following commands in the Ecasound interactive prompt:

cs-disconnect
cs-connect

Why This Works

If playback was active prior to modifying the file, issue stop before disconnecting, and start after reconnecting:

stop
cs-disconnect
cs-connect
start

Alternative Method: Targeted Input Replacement

If your session contains multiple complex inputs and you only want to reset one specific file without cycling the entire chainsetup, remove the input stream and attach it again using interactive audio input commands.

  1. Select the modified input stream:
    ai-select [input_name_or_number]
  2. Remove the selected input:
    ai-remove
  3. Re-add the file to register the updated version from disk:
    ai-add /path/to/modified-file.wav
  4. Attach the re-added file to your desired chain:
    ai-attach

Verifying the Reloaded Input

To ensure Ecasound has detected the new duration and audio properties of the externally modified file, query the input status directly:

ai-status

Alternatively, use cs-status to inspect the entire chainsetup and confirm that total sample counts, durations, and formats reflect the changes made outside the session.