sonify icon indicating copy to clipboard operation
sonify copied to clipboard

Implement an audio compression option

Open liamtoney opened this issue 1 year ago • 1 comments

Some seismic or infrasound signals have a large dynamic range, which is not ideal for playback at low volumes or on small systems. The default Alaska avalanche signal is a good example of this, where the large-amplitude failure is much, much louder than the precursory seismicity. While applying audio compression (side note — in the field of seismology, automatic gain control does sort of the same thing) to "smooth" the loudness variations would make the mapping from physical amplitude to loudness less clear, it could help make some sonifications easier to hear.

Here's some Python source code for audio compression: https://github.com/jiaaro/pydub/blob/master/pydub/effects.py#L115-L187 — might be overkill?

liamtoney avatar Jan 23 '24 21:01 liamtoney

Actually, FFmpeg can do dynamic range compression, see: https://medium.com/@jud.dagnall/dynamic-range-compression-for-audio-with-ffmpeg-and-compand-621fe2b1a892

liamtoney avatar Jan 25 '24 03:01 liamtoney