carlthome / python-audio-effects

Apply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays.
MIT License
386 stars 53 forks source link

Implementation of compand effect #15

Closed fighterpoul closed 6 years ago

fighterpoul commented 6 years ago

The goal of this PR is to add implementation of compand effect. Let me rephrase SoX documentation to explain parameters:

The transfer function (soft_knee:threshold,...') says that very soft sounds (below thresholddB) will remain unchanged. This will stop the compander from boosting the volume on 'silent' passages such as between movements. However, sounds in the range db_fromdB to 0dB (maximum volume) will be boosted so that the db_fromdB dynamic range of the original music will be compressed into a db_todB range

The default parameters are actually transparent for audio files, meaning the command not change the audio.

carlthome commented 6 years ago

Great! Thanks!