Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/audioeffects/compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
tail: the gain multiplies the audio, so silence in is silence out on the same
sample.

**Levels.** Keep the input under -6 dBFS and the defaults and patches stay
off the rails.

**Two traits this palette cannot carry, recorded rather than hidden**
(dossier App. J.3, J.4):

Expand Down Expand Up @@ -204,6 +207,11 @@ class Compressor(_component.Component):
#: "Detector and coupling state" in docs/reference/component-api.md.
TAIL_SAMPLES = 0

#: 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.
INPUT_CEILING_DBFS = -6

MACRO_LABELS = ("Character", "Threshold", "Ratio", "Attack", "Release",
"Release Slow", "Memory", "Knee", "Detector",
"RMS Window", "Emphasis", "Emphasis Freq", "Makeup",
Expand Down
12 changes: 12 additions & 0 deletions tests/test_cpython_effects_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,15 @@ def test_patch_14_and_back_mid_stream_settles(self):

if __name__ == "__main__":
unittest.main()


import kit_ceiling # noqa: E402


class TheCeiling(unittest.TestCase):
def test_clean_at_the_stated_input_level(self):
# square is where it rails first: p3 at -3 dBFS.
self.assertEqual(
kit_ceiling.stated_level_reds(compressor.Compressor, "square"), [])
self.assertTrue(kit_ceiling.stated_level_reds(
compressor.Compressor, "square", db=-3, keys=("p3",)))
Loading