Skip to content

Instantly share code, notes, and snippets.

View dpboard's full-sized avatar

David Board dpboard

View GitHub Profile
@dpboard
dpboard / 1-PIPENVANDSETUP.md
Last active December 21, 2023 05:37
How pipenv and setup.py work together

How Pipenv and setup.py work together

I've always found the world of python packaging and environment management to be somewhat confusing. Here are some notes that I hope will remind me how it works when I forget.

N.B. I have focused on Pipenv and Pipfile in this article, as they are the latest and greatest way of managing project environments, but the same principles apply to older workflows using virtualenv, pip and requirements.txt.

What is setup.py for?

@dpboard
dpboard / 1-SOXAGC.md
Last active November 16, 2023 08:47
Building an 'Automatic Gain Control' with SoX

Building an 'Automatic Gain Control' with SoX

SoX is a great tool for converting and processing audio. As an engineer working at a radio station I find it especially useful for processing audio files so the volume is even and smooth throughout. A recent use case was preparing news bulletins recorded by a non-technical journalist so they sounded clear and loud for an Amazon Alexa skill.

What is an AGC?

Automatic Gain Control (AGC) is an audio processing technique that is designed to smooth out volume differences between different parts of an audio programme. The majority of radio stations will have a device at their transmitter (for example, an Optimod) that does just that. Parts of the broadcast that are two quiet are boosted and parts that are too loud are atenuated.

For those familiar with audio [compressors