Using Wildcards for Chain Names in Ecasound
This article explains how to define and use wildcard chain name patterns in Ecasound to efficiently manage multiple audio processing chains simultaneously. By leveraging wildcard matching, you can group chains, assign shared inputs, outputs, and effects, and simplify complex multi-track session configurations without manually specifying each individual chain name.
Understanding Chain Patterns in Ecasound
In Ecasound, audio chains are selected and configured using the
-a option (in command-line mode) or commands like
c-select (in interactive mode). Instead of applying
commands to one chain at a time, you can supply a pattern containing
wildcards to target multiple existing chains in a single operation.
Ecasound supports standard wildcard characters:
*(Asterisk): Matches any sequence of zero or more characters.?(Question mark): Matches any single character.,(Comma): Acts as a delimiter to combine multiple patterns or specific chain names into a single list.
Escaping Wildcards in the Shell
When running Ecasound from a Unix-like shell (such as Bash or Zsh),
wildcards must be quoted or escaped. If unquoted, the shell attempts to
expand * or ? against files in the current
working directory before passing the argument to Ecasound.
To ensure Ecasound parses the wildcard pattern directly, wrap the argument in quotes:
ecasound -a:"track*" -i:sound.wavOr escape the special character with a backslash:
ecasound -a:track\* -i:sound.wavDefining and Selecting Chains with Wildcard Examples
Targeting Prefixes and Suffixes
If you organize your session by naming chains with systematic
prefixes (e.g., vox_lead, vox_backing,
synth_lead), you can target specific sub-groups using the
asterisk:
# Apply an input to all vocal chains
ecasound -a:"vox_*" -i:vocals_bus.wav
# Apply an effect to all lead elements
ecasound -a:"*_lead" -efl:1000Matching Fixed-Length Variations
Use the ? wildcard when targeting numbered tracks or
single-character identifiers:
# Matches track1, track2, trackA, but not track10
ecasound -a:"track?" -ea:120Combining Lists and Wildcards
You can combine wildcards with comma-separated chain names to target disparate sets of chains within the same argument:
# Targets master, aux, and all chains starting with drum_
ecasound -a:"master,aux,drum_*" -ea:100Interactive Mode Usage
In interactive mode (ecasound -c), chain selection
commands accept the same wildcard patterns:
ecasound> c-select track*
ecasound> cop-add -efl:800
This selects all chains starting with track and attaches
a lowpass filter to each matched chain.