Simple Effects¶
Delay-line based audio effects: echo, tremolo, and comb-filter reverb.
- pyminidsp.delay_echo(signal, delay_samples, feedback=0.5, dry=1.0, wet=0.5)[source]¶
Apply a delay/echo effect.
- Parameters:
- Returns:
numpy array of the processed signal.
- Return type:
Delay line / echo effect using a circular buffer with feedback. Creates repeating echoes that decay geometrically when
|feedback| < 1.Internal delay state:
\[s[n] = x[n] + \text{feedback} \cdot s[n - D]\]Output:
\[y[n] = \text{dry} \cdot x[n] + \text{wet} \cdot s[n - D]\]- Parameters:
- Returns:
Processed signal (same length as input).
- Return type:
- pyminidsp.tremolo(signal, rate_hz, depth=0.5, sample_rate=44100.0)[source]¶
Apply a tremolo effect (amplitude modulation).
- Parameters:
- Returns:
numpy array of the processed signal.
- Return type:
Tremolo effect — amplitude modulation by a sinusoidal LFO.
The modulation gain is:
\[g[n] = (1 - d) + d \cdot \frac{1 + \sin(2\pi f_\text{LFO} \, n / f_s)}{2}\]so
g[n]ranges from1 - depthto1.
- pyminidsp.comb_reverb(signal, delay_samples, feedback=0.5, dry=1.0, wet=0.3)[source]¶
Apply a comb-filter reverb effect.
- Parameters:
- Returns:
numpy array of the processed signal.
- Return type:
Comb-filter reverb (feedback comb filter with dry/wet mix).
Internal comb section:
\[c[n] = x[n] + \text{feedback} \cdot c[n - D]\]Output:
\[y[n] = \text{dry} \cdot x[n] + \text{wet} \cdot c[n]\]- Parameters:
- Returns:
Processed signal (same length as input).
- Return type: