MCPcopy Index your code
hub / github.com/chadmed/bankstown

github.com/chadmed/bankstown @1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.0 ↗ · + Follow
11 symbols 19 edges 1 files 4 documented · 36% updated 2y ago★ 2083 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Bankstown: a barebones bass enhancer

Halfway-decent three-stage psychoacoustic bass approximation.

Theory

Speakers found in small devices have trouble reproducing bass and sub-bass faithfully. This is because they are power and space constrained, and cannot move the amount of air required to reproduce such low frequencies at audible volumes. Designers of modern devices get around this problem by taking advantage of the fact that humans are very easy to fool. We generate harmonics of bass and sub-bass frequencies to trick the human brain into thinking there is more bass than there really is.

The long version

Saturation of a discrete-time signal clamps the maximum and minimum value of any given sample. Consider a pure sine wave with a peak to peak amplitude of 3. We sample this function and are left with a series of discrete samples. We can apply a transfer function to this series which introduces nonlinearity about the peaks such that values above 2.6 are clamped to 2.0. We have "crushed" the peaks of our sine wave into something approximating a square wave.

Recall that any periodic function that is not a pure trigonometric function can be described as a Fourier series of pure trigonimetric functions. That is, any waveform can be broken down into a fundamental sine wave and its harmonics. Thus, the nonlinearities introduced by our saturation function create harmonics of our input signal.

The brain hears these harmonics and is able to infer the fundamental, thus tricking you into thinking there is "fuller" bass than there actually is.

This trick is common in virtually everything from Bluetooth earbuds to expensive active "compact" HiFi speakers, and is the reason they can sound as good as they do.

Extension points exported contracts — how you extend this code

BassEx (Interface)
* Extend the Plugin trait so that we can modularly update the parameters of * the plugin IFF they have changed. */ [1 …
src/lib.rs
Saturator (Interface)
(no doc) [1 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

build_lpfs
called by 4
src/lib.rs
build_hpfs
called by 4
src/lib.rs
process
called by 2
src/lib.rs
update_params
called by 1
src/lib.rs
new
called by 0
src/lib.rs
run
called by 0
src/lib.rs

Shape

Method 4
Class 3
Function 2
Interface 2

Languages

Rust100%

Modules by API surface

src/lib.rs11 symbols

For agents

$ claude mcp add bankstown \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact