audioeffects.compressor
Compressor - compressor characters on a shared palette.
The player’s text is the class docstring; the CLAIMS table in the
class’s test file ties its claim sentences to tests.
- audioeffects.compressor.FET = 0
Macro 0’s four positions, in order.
- audioeffects.compressor.OPTICAL_ATTACK_MS = 10.0
The T4 cell’s own times, in milliseconds. The
opticalcharacter ignores macros 3 through 6 and uses these instead (trait O3); they are also what the optical rows of_DEFAULTScarry, so patch 0 round-trips.
- audioeffects.compressor.ATTACK_MEASURED_PER_SET = 1.534
The time macros are labelled in the times a measurement reads, not in the node’s coefficients, because every trait that names a time names a measured one: F1’s 800 microseconds and 1.1 seconds, M2’s six pairs. The node’s one-pole envelope stretches a coefficient into a 10-90 % attack by 1.534 and shrinks it into a t63 release by 0.795 - both measured on this build across the spans they are used over (attack 0.098 to 96 ms: 1.6416, 1.5363, 1.5337, 1.5340, 1.5267; release 50 to 1100 ms: 0.7894, 0.7939, 0.7995), so the class divides them out once, here.
- audioeffects.compressor.SLOW_ATTACK_FRACTION = 0.5
The slow stage’s attack, as a fraction of its release, and the range it is held to. Long enough that a short burst leaves the slow envelope still climbing - which is the memory - and short enough that a long one settles.
- audioeffects.compressor.SLOW_THRESHOLD_OFFSET_DB = -5.0
How far below the fast stage’s threshold the slow stage sits. The slow stage reads the fast stage’s output, which is already reduced.
- audioeffects.compressor.FET_RATIO_REFERENCE = 4.0
The 1176’s ratio buttons move the threshold and the knee with them - the manual’s own line is that “higher Ratio settings also set the threshold higher”, and S3 reads the knee hardening off UREI’s transfer plot (trait F2). On the
fetcharacter the ratio therefore tilts both: the threshold up byFET_RATIO_TILT_DBper decade of ratio above 4:1, and the knee down by the square root of the same. No other character does this.
- audioeffects.compressor.SLOW_RATIO_SPAN = 3.0
Memory1.0 puts the slow stage at this ratio; 0.0 puts it at 1, a wire.
- class audioeffects.compressor.Compressor(source, *options, **keywords)[source]
Bases:
ComponentCompressor characters after classic studio units, on a shared panel.
Characters. Character picks the unit. On
fet, after the Urei compressor, the time knobs get faster as you turn them up, and with everything up it distorts, which is the sound its buttons-in trick is famous for. Onoptical, after the Teletronix and the default, a light cell sets the times, so the time knobs and Memory are idle; recovery is quick at first and slow after, and slower again after a long or deep passage. Onvca, after the dbx, the detector reads true RMS and the release falls in a straight line in decibels. Onvarimu, after the Fairchild, the slope climbs with level, gentle on small peaks and hard on loud ones, and the Vari-Mu patches are its time-constant positions.Controls. Threshold, Ratio, Knee and Makeup set the curve. Release Slow and Memory run a second, slower stage that remembers how long the passage was. Detector switches between peak and RMS, and RMS Window sets how long the RMS average is. Emphasis and Emphasis Freq tilt the side chain toward a band. Mix at 0 is your dry signal. The Effect controls page lists what the knobs span.
Timing. Latency is zero at every setting. The gain multiplies the audio, so silence in is silence out on the same sample.
Where it is not clean. On bass with a fast release the gain follows the waveform and the output thickens, as it does on the hardware; a slower release cleans it up. The RMS detector reads a deep square and sine differently at its default window; a wider RMS Window fixes it.
Levels. Keep the input under -6 dBFS and the defaults and patches stay off the rails.
On a board. The class needs audiodsp’s
audiodynamicsandaudioroute, and on a board without them construction raisesImportError.- LAZY_BUILD = True
Construction arms the voices on silence (
Component._play_voice), so a Mix 0 set before the first pull hands out the source whole.
- NAME = 'Compressor'
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 = ()
The contract’s static reads.
CAPABILITIESnames"tempo_sync"if and only if the class readsself._transport().
- LATENCY_SAMPLES = 0
No latency-adding option is built, so this is 0 at every setting.
- TAIL_SAMPLES = 0
The gain multiplies the audio; silence in is silence out on the same sample, so there is no tail to declare.
After a reset, a rejoin or a control move the detector can leave the output up to 1,575 LSB from an untouched copy for 20 to 50 blocks: a re-attack, which
tail_samplesdoes not bound. See “Detector and coupling state” in docs/reference/component-api.md.
- INPUT_CEILING_DBFS = -6
The defaults and every patch play the ceiling kit’s materials clean at this level; at -3 dBFS, patch 3 rails on a 100 Hz square.
- MACRO_LABELS = ('Character', 'Threshold', 'Ratio', 'Attack', 'Release', 'Release Slow', 'Memory', 'Knee', 'Detector', 'RMS Window', 'Emphasis', 'Emphasis Freq', 'Makeup', 'Mix')
Knob names, one per macro index; one mode per label; the private engineering spans behind them; and the patches on the 0-127 grid.
- PATCHES = {0: ('Level Ride', (42, 85, 20, 45, 102, 56, 79, 28, 0, 64, 0, 36, 42, 127)), 1: ('Fast Peak Catch', (0, 89, 46, 122, 95, 58, 0, 11, 0, 64, 0, 36, 53, 127)), 2: ('Everything At Once', (0, 55, 55, 127, 127, 58, 0, 0, 0, 64, 0, 36, 71, 127)), 3: ('Bus Glue', (85, 80, 25, 75, 105, 58, 0, 0, 127, 64, 0, 36, 56, 127)), 4: ('Voice Ride', (42, 68, 38, 45, 102, 56, 79, 28, 0, 64, 102, 112, 56, 127)), 5: ('Let The Stick Through', (0, 89, 38, 36, 102, 58, 0, 11, 0, 64, 0, 36, 56, 127)), 6: ('Parallel Squash', (0, 55, 55, 127, 127, 58, 0, 0, 0, 64, 0, 36, 71, 51)), 7: ('Wide Knee Glue', (85, 85, 13, 75, 74, 58, 0, 85, 127, 64, 0, 36, 49, 127)), 8: ('Vari-Mu TC1', (127, 76, 55, 97, 65, 42, 0, 106, 0, 64, 0, 36, 42, 127)), 9: ('Vari-Mu TC2', (127, 76, 55, 97, 42, 42, 0, 106, 0, 64, 0, 36, 42, 127)), 10: ('Vari-Mu TC3', (127, 76, 55, 87, 21, 42, 0, 106, 0, 64, 0, 36, 42, 127)), 11: ('Vari-Mu TC4', (127, 76, 55, 87, 0, 42, 0, 106, 0, 64, 0, 36, 42, 127)), 12: ('Vari-Mu TC5', (127, 76, 55, 87, 21, 26, 95, 106, 0, 64, 0, 36, 42, 127)), 13: ('Vari-Mu TC6', (127, 76, 55, 97, 65, 26, 95, 106, 0, 64, 0, 36, 42, 127)), 14: ('Compressor - lean', (0, 89, 46, 122, 95, 58, 0, 11, 0, 64, 0, 36, 53, 127))}
Patches 8-13 are the Fairchild’s six TIME CONSTANT positions, in the manual’s order, and are the only patches traits M2 and M3 are read on.
- WALKS_TO_BYPASS = True
A class sets this when its graph, at Mix 0, walks to the source it routes around: its mixer levels to the dry alone, on ramped mixers (
ramp_levels)._route_aroundthen lets the port switch once the walk has landed rather than at once. Mix 0 is still the source, byte for byte, from then on.
- reset()[source]
Clear every node and restore patch 0, then arm the graph as
_builddoes, so a reset is a fresh instance (no block primed through the chain before it was cleared plays after it).
- property gain_reduction_db
What the last processed block was reduced by, both stages summed. A meter reading, not part of the contract’s surface.