compress()
Squeeze or stretch the loudness range of the notes, in place.
Mod.compress(material, ratio)
Each note's loudness is moved toward or away from the average by the given ratio: 0 makes every note the average loudness, 1 leaves it unchanged, and 2 makes every note twice as far from the average. Negative values flip notes to the other side of the average.
Parameters
Mod.compress(material, ratio)
| Parameter | Type | Default | Description |
|---|---|---|---|
material |
Note, Phrase, Part, or Score |
required | The music to change. |
ratio |
int or float |
required | How much to squeeze (below 1) or stretch (above 1) the loudness range. |