Compressor
The compressor effect compresses or gates the signal above a certain amplitude threshold, according to a provided ratio. It uses the common effect attributes as well as two additional:
threshold determines the threshold at which sound should begin to be compressed.
ratio determines how the sound should be compressed. The sound over the threshold is
multiplied by this ratio. The sound will be gated if the ratio is 0.
To use this in scoring, use compressor as the XML tag name.
| Attribute | Purpose | Default |
|---|---|---|
| threshold | Threshold (0-1) | 0.35 |
| ratio | Ratio to multiply sound above threshold by (0-1) | 0 |
Example of the effect:
<score bpm="140" beatspermeasure="4">
<instrument instrument="AdditiveInstrument">
<harmonics>1 0 0.3 0 0.15 0 0.1 0 0.05 0 0.09</harmonics>
<measure>
<note beat="1" duration="4" note="C3"/>
<note beat="1" duration="4" note="E3"/>
<note beat="3" duration="2" note="F3"/>
<note beat="3" duration="2" note="G3"/>
</measure>
<measure>
<compressor enable="true" id="1" beat="1" wet="1" threshold="0.35" ratio="0.5"/>
<note beat="1" duration="4" note="C3"/>
<note beat="1" duration="4" note="E3"/>
<note beat="3" duration="2" note="F3"/>
<note beat="3" duration="2" note="G3"/>
</measure>
</instrument>
</score>
Download the sample score file