Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an audio compression option #16

Open
liamtoney opened this issue Jan 23, 2024 · 1 comment
Open

Implement an audio compression option #16

liamtoney opened this issue Jan 23, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@liamtoney
Copy link
Owner

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 liamtoney added the enhancement New feature or request label Jan 23, 2024
@liamtoney liamtoney self-assigned this Jan 23, 2024
@liamtoney
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant