audioeffects.tremolo

Tremolo — Fender bias-vary and optical characters on one Multiply.

The player’s text is the class docstring; the CLAIMS table in the class’s test file ties its claim sentences to tests.

audioeffects.tremolo.TABLE_FRAMES = 1024

One LFO period as a short waveform. Multiply used to walk fs/rate frames (9600 at 5 Hz / 48 kHz) on every pull. 256 points left L1’s bands on the table-step images (256·Rate ≈ 187 / 375 Hz). 1024 points put those images at ≥ 512 Hz across 0.5–15 Hz.

audioeffects.tremolo.R_SRC = 220000.0

Photocell dark / source / intensity-max, ohms. Lit is the Depth ceiling (dossier §8.3), not a Fender figure: Depth 1 trough lands in −15…−40 dB.

audioeffects.tremolo.kinked_sine(phase, shape)[source]

Near-sine with a small kink at the bottom (S5). phase radians.

audioeffects.tremolo.triangle(phase)[source]

Unit triangle on a 2π period. Planted-fault LFO, not the class.

Speed-Link amplitude vs Rate. ~3 dB from 3 Hz to 8 Hz.

audioeffects.tremolo.depth_travel(depth)[source]

Saturating Depth law (B2): first 20 % of travel adds more than last.

audioeffects.tremolo.bias_gain(s, depth, idle, curve_p=1.8)[source]

Concave stage gain vs a bipolar LFO sample s in [−1, 1].

audioeffects.tremolo.optical_gains(frames, _rate_hz, sample_rate, depth, shape, lag_ms, neon=True, equal_tau=False, ignore_lag=False, gate=False, force_taus=None)[source]

One period of optical divider gain, already dark-normalised to 1.

audioeffects.tremolo.tempo_divisions(bpm)[source]

Hz values for whole, half, quarter, eighth, sixteenth, 32nd.

class audioeffects.tremolo.Tremolo(source, *options, **keywords)[source]

Bases: Component

A tremolo with two amp characters on one LFO: Bias, the near-sine wobble of a Fender’s bias-vary circuit, and Optical, a neon lamp pulsing into a photocell.

Controls. Character picks Bias or Optical. Rate is the sweep’s speed, and at Depth 0 the output is your signal untouched. Speed Link makes the depth fall as Rate falls, the way one pot moves the amp’s whole RC section. Bias runs from a cold idle to a hot one, and a hot idle makes the Bias wobble more than 6 dB shallower. In Optical, Lag is how slowly the photocell recovers, so a fast Rate loses depth; Shape sets how much of each cycle the signal spends dimmed, less as Shape rises. Stereo Phase offsets the right channel’s wobble from the left’s: at 180 one side swells as the other dips. The Effect controls page lists what the knobs span.

Bias. At half Depth the wobble is close to a sine, every harmonic of it more than 26 dB down. Its dips go further below the average than its swells rise above it, its rise and fall run at about the same speed, and it never mutes: at full Depth the dip stays within 40 dB of the swell.

Optical. The light dims the signal faster than it recovers, by more than two to one, so the wobble is a pulse rather than a sine. It is a divider, never a gate: at full Depth the dip sits between 15 and 40 dB below the swell.

Sync. With Sync on, Rate snaps to the nearest of one sweep a whole note, half, quarter, eighth, sixteenth or 32nd note at the host’s tempo. With no host the class follows its own 120 bpm, and a host that reports no tempo leaves Rate where the knob is.

Levels and timing. Silence in is silence out. The gain moves every sample, not every block, so at 48 kHz it leaves no block-rate buzz within 80 dB of your signal. Latency and tail are zero at every setting.

On a board. The class needs audiodsp’s audiomath, and on a board without it construction raises ImportError.

NAME = 'Tremolo'

The stable provider name audioeffects.create() discovers.

TIER = 'audiodsp'

STOCK or AUDIODSP, with REQUIRES naming the audiodsp-own modules an AUDIODSP class needs.

Type:

roadmap §3

CAPABILITIES = ('tempo_sync',)

The contract’s static reads. CAPABILITIES names "tempo_sync" if and only if the class reads self._transport().

MACRO_LABELS = ('Character', 'Rate', 'Depth', 'Shape', 'Lag', 'Bias', 'Speed Link', 'Stereo Phase', 'Sync')

Knob names, one per macro index; one mode per label; the private engineering spans behind them; and the patches on the 0-127 grid.

BLOCK_HOLD = False

Fault hooks. Subclasses set these; no macro reaches them.

RATE_PERIOD_SCALE = 1.0

multiply the table Rate so ENV fundamental ≠ Rate knob.

Type:

L4 plant

TRACKER_TAUS = (0.0004, 0.08)

B5 plant taus (on, off) seconds. Ignores the Lag macro so Lag min and Helicopter cannot restore a <1.5 slope ratio.

reset()[source]

Clear every node, restore patch 0 and start the LFO again.

The LFO is a note on a synthio.Synthesizer, which the walk does not reach: it played on, holding a block it had rendered before the reset, and the note it was asked for next started on top of the old one’s release. A fresh synthesizer, which patch 0 then presses, is the LFO a fresh instance starts with.