HUB
Sign inSign up
daneq logo

fourzerosix/daneq

By fourzerosix

•Updated 17 days ago

Terminal equalizer, effects rack and audio visualizer with a btop-style braille UI

Image
1

930

fourzerosix/daneq repository overview

DanEQ


⁠DanEQ

CI PyPI Docker Docs License: GPL-3.0

A btop-style terminal equalizer, effects rack and audio visualizer for Linux and macOS. It does not just draw pretty bars: it sits in the audio path, so the faders you move change what you hear, and daneq --selftest proves the filters match the curve on screen.

╭─┤Spectrum post-EQ├──────────────────────────────────┤braille  band 6/10: 1kHz +6.0dB├─╮
│ -10  braille spectrum, 2 bars per cell, peak-hold caps, gradient colors, dB scale       │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
╭─┤Equalizer 10-band├──╮╭─┤Response├──────────────────────────────────────┤preamp +0.0dB├─╮
│ faders (keys + mouse) ││ exact filter curve with shaded boost/cut areas                  │
│                       │╭─┤Levels├──────────────────────────────────────────────┤dBFS├────╮
╰───────────────────────╯╰─────────────────────────────────────────────────────────────────╯

⁠Contents

Docs site: https://fourzerosix.github.io/DanEQ/⁠

  1. What you get⁠
  2. Platform support⁠
  3. Quick start⁠
  4. Install⁠ - Linux, macOS, iPhone/iPad, ThinLinc, Docker, dependencies, uninstall
  5. Usage examples⁠
  6. Playing files: transport, tempo, pitch and screw⁠
  7. Keys, mouse and the Esc menu⁠
  8. Effects rack⁠
  9. Visualizations, bar styles, themes⁠
  10. Test signals and easter eggs⁠
  11. Public domain clips⁠
  12. Nerd mode⁠
  13. Files and settings⁠
  14. How it works⁠
  15. Command line reference⁠
  16. Troubleshooting⁠
  17. Development and testing⁠
  18. Publishing⁠
  19. FAQ and roadmap⁠

⁠What you get

  • Equalizer: 4, 6, 8 or 10 bands (--bands), +/-12 dB per band, preamp, bypass for A/B, mute, 8 presets, auto headroom, RBJ biquad filters in real time. Export your curve as Equalizer APO / EasyEffects text.
  • Effects rack: compressor, overdrive, bitcrusher, megaphone, phaser, flanger, chorus, tremolo, echo, reverb and stereo widener, each with braille rotary knobs.
  • 15 views: spectrum (6 bar styles), waterfall, scope, vectorscope, radial, spinning vinyl record, reel-to-reel tape deck, fire, starfield, ripples, matrix rain, tunnel, plasma, aurora, analog VU meters. 30 color themes, with btop-style theme background on/off (transparency). 60 fps.
  • File player: open files and folders from inside the app (or on the command line), playlists, play/pause, previous/next, seek, repeat, shuffle, with every EQ band, effect and visual working on the music.
  • Pitch, tempo and SCREW knobs for file playback: change tempo without pitch, pitch without tempo, or slow both together like a record (the SCREW knob is a styrofoam cup, a nod to DJ Screw).
  • Nerd mode: btop-style audio process, stream and device monitor.
  • Esc menu like btop, resizable panels (keys and mouse drag), full mouse support.
  • Test signals: 17 synthesized animals, cartoon sound effects, a bullhorn loudspeaker, binaural beats, dial-up modem, touch tones, morse, noise colors, and 12 public domain tunes including Amazing Grace.
  • Real public domain recordings (Apollo 11, FDR, JFK) fetched on demand.
  • No root, no kernel modules. PulseAudio and PipeWire on Linux; PortAudio plus a loopback driver on macOS.

⁠Platform support

PlatformStatusAudio path
Linux (Ubuntu, Kubuntu, Debian, Rocky/RHEL 9, Fedora, Arch)TestedPulseAudio or PipeWire via pactl, parec, pacat
Linux over ThinLincTestedThe session's PulseAudio, forwarded to your client
Docker (Linux)ProvidedPulse socket passthrough, or --no-output
macOS 12+ (Intel and Apple Silicon)New, needs testing on a real MacPortAudio (sounddevice) plus a free loopback driver (BlackHole)
WindowsNot supported yetWould need a WASAPI loopback backend (see roadmap)
iPhone / iPadNot possible nativelySee iPhone and iPad⁠ for what does work

Everything that does not need live system audio (test signals, files, all visuals, effects, --no-output) works on any platform that runs Python 3.9+ with a UTF-8, 256-color terminal at least 80x24.

⁠Quick start

git clone https://github.com/fourzerosix/DanEQ.git && cd DanEQ
scripts/install.sh                  # Linux or macOS; creates a private virtualenv and the `daneq` command
daneq --selftest                    # headless proof that the DSP is accurate
daneq --demo pink --no-output       # visual demo, no sound card needed
daneq                               # equalize everything playing on this machine

⁠Install

⁠Linux

One command (Debian/Ubuntu/Kubuntu, Fedora, Rocky/RHEL, Arch, openSUSE): scripts/install.sh. It installs the system tools, builds a virtualenv in ~/.local/share/daneq/venv, links ~/.local/bin/daneq and runs the self-test. Undo with scripts/install.sh --uninstall.

Manual, per distribution:

DistributionSystem packagesThen
Debian, Ubuntu, Kubuntusudo apt install pulseaudio-utils python3-venv python3-pip (optional: ffmpeg)pipx install . or the venv steps below
Fedorasudo dnf install pulseaudio-utils python3-pipsame
Rocky / RHEL / Alma 9sudo dnf install pulseaudio-utils python3-pip (ffmpeg needs EPEL + RPM Fusion)same
Archsudo pacman -S libpulse python python-pipsame

PipeWire systems already provide pactl/parec/pacat through pipewire-pulse; the package names above (pulseaudio-utils, libpulse) only supply the client tools.

python3 -m venv ~/.local/share/daneq/venv
~/.local/share/daneq/venv/bin/pip install --upgrade pip
~/.local/share/daneq/venv/bin/pip install ".[audio]"        # or: pip install daneq[audio]  once it is on PyPI
ln -s ~/.local/share/daneq/venv/bin/daneq ~/.local/bin/daneq

From other sources:

pipx install git+https://github.com/fourzerosix/DanEQ     # straight from GitHub
pipx install daneq                                          # from PyPI (after the first release)
docker run -it --rm fourzerosix/daneq                      # Docker Hub: built-in demo, no audio device needed
docker run -it --rm ghcr.io/fourzerosix/daneq --zoo --fx reverb --no-output     # same image from GHCR

Docker with real audio, passing the host's PulseAudio/PipeWire socket:

docker run -it --rm -v "$XDG_RUNTIME_DIR/pulse:/run/pulse" -e PULSE_SERVER=unix:/run/pulse/native \
  fourzerosix/daneq --demo
⁠macOS

macOS has no PulseAudio and, by design, gives apps no way to tap the system mix. System-wide EQ therefore needs a free virtual loopback device. DanEQ uses BlackHole; the rest is automatic.

apps  ->  [BlackHole 2ch = system output]  ->  DanEQ (EQ + effects + visuals)  ->  your real speakers/headphones

1. Install (Terminal.app or iTerm2):

git clone https://github.com/fourzerosix/DanEQ.git && cd DanEQ
scripts/install.sh            # offers to install Homebrew Python, ffmpeg, BlackHole and switchaudio-osx

Or by hand: brew install python ffmpeg switchaudio-osx && brew install --cask blackhole-2ch then python3 -m venv ~/.local/share/daneq/venv && ~/.local/share/daneq/venv/bin/pip install ".[mac]". Homebrew Python is recommended: the Python that ships with the Xcode command line tools is old (3.9, pip 21) and its curses handles Unicode poorly.

2. Allow microphone access. Capturing BlackHole counts as recording, so the first run triggers a prompt; approve it, or enable your terminal under System Settings > Privacy & Security > Microphone.

3. Match sample rates (optional but best). Open Audio MIDI Setup and set BlackHole 2ch and your real output to the same rate, normally 48000 Hz.

4. Run it.

daneq --list-devices          # shows every device and marks virtual ones
daneq                         # captures BlackHole, plays to your system output
daneq --output "External"     # pick another real output by name fragment
daneq --input "BlackHole 2ch" --output "MacBook Pro Speakers"

With switchaudio-osx installed DanEQ switches the system output to BlackHole for you and restores it on exit. Without it, set System Settings > Sound > Output to BlackHole 2ch before starting and back afterwards.

Limits on macOS: BlackHole has no volume control, so the keyboard volume keys do nothing while it is the output (set your speaker volume first, or use per-app volume). Live system audio is new and untested by the author on a real Mac: run daneq --list-devices first and open an issue with its output if something is off. Files, test signals and all visuals do not need BlackHole at all: daneq --demo pink, daneq song.mp3.

⁠iPhone and iPad

DanEQ cannot run natively on iOS or iPadOS: there is no system-wide audio tap for third-party apps, no curses terminal in the sandbox, and NumPy/SciPy are not available in the common on-device Python apps. What does work:

  • SSH into a machine that runs DanEQ (Blink Shell, Termius, Prompt, or any iOS SSH client). Run daneq inside tmux on the remote Mac or Linux box; the interface, mouse and all visuals work over SSH. The audio being equalized is the remote machine's, not the phone's.
  • ThinLinc or other remote desktop into a Linux box and use the terminal there (audio is forwarded by ThinLinc if enabled in the client).
  • A native iOS version would be a separate Swift project (an AUv3 audio unit or an AVAudioEngine app that equalizes its own playback). The DSP here (RBJ biquads) ports directly; it is on the roadmap, not in this repo.
⁠ThinLinc and other remote sessions

Inside the session, use a 256-color terminal and a UTF-8 locale:

export TERM=xterm-256color LANG=en_US.UTF-8
daneq --demo pink --no-output       # works even if the node has no audio path
daneq --demo                        # plays through the session's ThinLinc audio sink
daneq                               # equalizes everything playing in the session

Audio must be enabled in the ThinLinc client. If the session dies uncleanly, daneq --restore removes the virtual sink and resets the default output.

⁠Dependencies at a glance
WhatWhyNeeded for
Python 3.9+runtimeeverything
numpy, scipyDSPeverything (installed automatically)
pactl, parec, pacat (pulseaudio-utils, or pipewire-pulse)Linux audio in/outlive audio on Linux
sounddevice (PortAudio; wheels bundle it on macOS)macOS audio in/outlive audio on macOS (installed automatically there)
BlackHole 2chvirtual loopbacksystem-wide EQ on macOS
switchaudio-osxautomatic output switchingoptional, macOS
ffmpegdecode mp3, ogg, flac, m4aoptional; pip install daneq[audio] (soundfile) covers ogg/flac/wav without it
UTF-8 locale, 256-color terminal, 80x24 or largerbraille UIeverything
⁠Uninstall

scripts/install.sh --uninstall, or pipx uninstall daneq. Settings stay in ~/.config/daneq; delete that folder to remove them. On macOS also brew uninstall --cask blackhole-2ch if you no longer want it.

⁠Usage examples

# --- live system audio ---------------------------------------------------------------------------
daneq                                   # all apps through the EQ (Linux: virtual sink; macOS: BlackHole)
daneq --bands 4                         # 4 band layout (also 6, 8, 10)
daneq --preset Rock --theme synthwave   # start with a preset and a theme
daneq --fx reverb,echo --view vinyl     # effects on from the start, begin in the vinyl view
daneq --latency 15                      # lower latency (less buffering) for video
daneq --sink alsa_output.pci-0000_00_1f.3.analog-stereo      # pick the Linux output explicitly
daneq --restore                         # clean up after a crash (Linux)

# --- files ---------------------------------------------------------------------------------------
daneq song.flac                         # play a file through the EQ
daneq --loop loop.wav                   # loop it
daneq --no-output song.mp3              # visualize and EQ without playing (silent preview)

# --- measurement and EQ testing ------------------------------------------------------------------
daneq --selftest                        # prove accuracy: real tones vs the displayed response, all layouts
daneq --pink --no-output                # pink noise: boost a band and watch the spectrum bulge
daneq --sweep                           # 20 Hz to 20 kHz sweep: the moving peak follows your curve
daneq --export > my-curve.apo.txt       # save the curve as Equalizer APO / EasyEffects text
daneq --list-presets                    # Flat, Bass boost, Treble boost, Vocal, Loudness, Rock, ...

# --- fun ------------------------------------------------------------------------------------------
daneq --zoo --fx reverb                 # every animal, with reverb
daneq --lion --theme fire --view fire   # roar, rendered as flames
daneq --binaural --beat alpha --view vectorscope      # headphones: watch the phase drift
daneq --loudspeaker --fx megaphone,echo # bullhorn through a canyon
daneq --grace --view vinyl --theme gold # Amazing Grace on a spinning record
daneq --tetris --view reel-to-reel      # Korobeiniki on tape
daneq --clip moon --view scope          # Apollo 11, one small step
daneq --cartoon --style mirror          # slide whistles with a mirrored spectrum

# --- engineering ---------------------------------------------------------------------------------
daneq --nerd                            # start in nerd mode (audio processes, streams, devices)
daneq --list-devices                    # macOS / PortAudio: list audio devices
daneq --fps 30                          # lighter on slow remote sessions
daneq --no-mouse                        # if your terminal mangles mouse reporting

⁠Playing files: transport, tempo, pitch and screw

Give DanEQ files, folders or playlists, or press O inside the app (also in the Esc menu under Open file...):

daneq song.flac                       # one file
daneq ~/Music/Album/                  # a folder (add --recursive for sub-folders)
daneq a.mp3 b.ogg mixtape.m3u         # any mix of files and playlists
daneq --shuffle --repeat all ~/Music  # shuffle the folder forever
daneq --once song.mp3                 # quit when it ends instead of staying open
daneq --screw 0.75 beat.wav           # start slowed to 75 percent, pitch and tempo together
daneq --tempo 120 --pitch -2 song.mp3 # 20 percent faster, two semitones lower

A transport bar appears under the header while a file is loaded: |< << [||] >> >|, a time display, a seek bar, the track number and the shuffle and repeat switches. Everything is clickable.

KeyAction
Oopen the file browser
Spaceplay / pause
z / xprevious / next track (previous restarts the track if you are more than 3 seconds in)
< / >seek back / forward 5 seconds
Rrepeat: off, all, one
Sshuffle on/off

File browser: Up/Down move, Enter opens a folder or plays the file (the whole folder becomes the playlist, starting at that file), Space marks files to build your own playlist, Backspace or Left goes up, ~ home, . shows hidden files, Esc closes. It remembers the last folder. You can also open a file while a test signal or live audio is running and return with Back to live input in the Esc menu.

Speed controls: press f, then Shift-Tab (or Tab until the last tab) for the Speed page.

KnobWhat it does
Pitch (-12 to +12 semitones)changes pitch, keeps tempo
Tempo (50 to 200 percent)changes tempo, keeps pitch
SCREW (0.50x to 1.25x)slows or speeds pitch and tempo together, like a record; the cup fills as you slow it down

Pitch and tempo use WSOLA time stretching with a cubic resampler; with all three at neutral the audio is bit-exact. Moving the knobs during playback is click-free. These controls apply to file playback, not to live system audio.

⁠Keys, mouse and the Esc menu

Press Esc for a btop-style menu (view, bar style, theme, EQ preset, FX rack, nerd mode, auto headroom, bypass, save, export, help, about, quit). Arrow keys or j/k move, Enter or Right opens, Esc or Left goes back, the mouse works too. Press ? for an in-app key list.

KeyAction
Left / Right, h / lselect band (FX mode: knob)
Up / Down, k / jgain +/- 0.5 dB (FX mode: knob fine)
PgUp / PgDn, K / Jgain +/- 3 dB (FX mode: knob coarse)
0zero the band (FX mode: reset the knob)
rreset all bands and preamp (FX mode: reset the effect)
bbypass the EQ for A/B (FX mode: bypass the whole rack)
p / Pnext / previous EQ preset
[ / ]preamp -/+ 0.5 dB
aauto headroom: preamp so boosts cannot clip
ftoggle the FX rack
Tab, 1-9FX: next effect / pick effect
o or SpaceFX: effect on/off
v / Vnext / previous view
gspectrum bar style
c / Cnext / previous theme
t, , / .spectrum tilt, sensitivity
( )bottom panel shorter / taller
{ }fader columns narrower / wider
nnerd mode
mmute
eexport Equalizer APO text
Btheme background true/false (transparent when false)
ssave settings
?help
qquit (settings are saved automatically)

Mouse: click or drag a fader, scroll the wheel over a band or knob, double click a fader to zero it, click FX tabs, drag the panel borders to resize.

⁠Effects rack

Press f. Effects run in this order after the EQ: compressor, overdrive, bitcrusher, megaphone, phaser, flanger, chorus, tremolo, echo, reverb, stereo widener. Switch effects on with o, turn knobs with the arrows. Settings are saved with the rest of your config.

Effect--fx nameWhat it doesKnobs
CompressorcompFeed-forward compressor, linked stereoThresh -40..0dB (default -18); Ratio 1..20:1 (default 4); Attack 1..100ms (default 8); Release 20..1000ms (default 150); Makeup 0..24dB (default 3); Mix 0..1 (default 1)
OverdrivedriveTanh saturation with tone controlDrive 0..40dB (default 12); Tone 500..12000Hz (default 4500); Level -24..6dB (default -6); Mix 0..1 (default 1)
BitcrushercrushBit depth and sample rate reductionBits 3..16 (default 8); Downsmp 1..32x (default 4); Mix 0..1 (default 1)
MegaphonemegaBullhorn / PA loudspeaker with slapbackDrive 0..30dB (default 10); Honk 0..12dB (default 6); Slap 0..1 (default 0.25); Mix 0..1 (default 1)
PhaserphaseAll-pass notch sweep (feedback is chunk-delayed)Rate 0.05..5Hz (default 0.4); Depth 0..1 (default 0.7); Feedback 0..0.9 (default 0.4); Stages 2..8 (default 4); Mix 0..1 (default 0.5)
FlangerflangSwept comb filter with feedbackRate 0.05..5Hz (default 0.25); Depth 0..1 (default 0.7); Delay 0.8..8ms (default 2.5); Feedback -0.9..0.9 (default 0.5); Mix 0..1 (default 0.5)
ChoruschorusDetuned modulated delay, stereoRate 0.1..5Hz (default 0.8); Depth 0..1 (default 0.5); Delay 10..40ms (default 20); Mix 0..1 (default 0.45)
TremolotremAmplitude LFO; stereo phase turns it into an auto-panRate 0.5..20Hz (default 5); Depth 0..1 (default 0.6); Stereo 0..1 (default 0)
EchoechoTape-style delay with filtered feedbackTime 60..1000ms (default 350); Feedback 0..0.95 (default 0.4); Tone 500..12000Hz (default 5000); Mix 0..1 (default 0.35)
ReverbverbFreeverb-style room: 8 combs + 4 all-passes per sideSize 0..1 (default 0.6); Damping 0..1 (default 0.5); Width 0..1 (default 1); Mix 0..1 (default 0.25)
Stereo WidenerwideMid/side width: 0 mono, 1 unchanged, 2 extra wideWidth 0..2 (default 1.4)

Notes: the phaser feedback is applied once per 32-sample chunk (an approximation); the overdrive is not oversampled, so extreme drive can alias.

⁠Visualizations, bar styles, themes

Views (v / V or --view): spectrum, waterfall, scope, vectorscope, radial, vinyl, reel-to-reel, fire, starfield, ripples, matrix, tunnel, plasma, aurora, VU meters. The audio-reactive ones respond to bass, mid and treble separately.

Bar styles (g or --style): braille, line, mirror, dots, blocks, ascii.

Themes (c / C or --theme): classic, ice, fire, synthwave, mono, ocean, forest, sunset, vaporwave, matrix, gold, lava, aurora, candy, nord, dracula, gruvbox, cyberpunk, rainbow, thermal, tokyonight, solarized, monokai, catppuccin, everforest, rosepine, kanagawa, sakura, toxic, bubblegum.

Theme background: like btop's theme_background, each theme paints its own background color. Press B, use the Esc menu (Theme background true/false) or start with --transparent to let your terminal's own background or transparency show through. The choice is saved.

EQ presets: Flat, Bass boost, Treble boost, Vocal, Loudness, Rock, Electronic, Classical.

Layout: ( ) change the bottom panel height, { } change fader width, or drag the borders. The spectrum uses a multi-resolution FFT (long window for bass, short for treble); , and . change sensitivity, t toggles tilt.

⁠Test signals and easter eggs

All of these are synthesized from scratch, so there are no licensing questions. They are cartoon-style approximations rather than recordings, but they have real spectral content, which is what makes them good for EQ and effects testing. daneq --list-demos prints the same list.

Animals

FlagWhat you get
--dogsynthesized dog
--catsynthesized cat
--lionsynthesized lion
--bearsynthesized bear
--wolfsynthesized wolf
--cowsynthesized cow
--sheepsynthesized sheep
--ducksynthesized duck
--birdsynthesized bird
--frogsynthesized frog
--owlsynthesized owl
--roostersynthesized rooster
--horsesynthesized horse
--elephantsynthesized elephant
--pigsynthesized pig
--whalesynthesized whale
--cricketsynthesized cricket
--zooevery animal in turn

Comedy and nostalgia

FlagWhat you get
--cartoonslide whistle, boing, bonk, sad trombone and friends
--loudspeakerspeech-like babble through a bullhorn
--dialup56k modem handshake (impressionistic)
--dtmftouch tones
--sirenwail and yelp
--morseDANEQ in morse code

Public domain tunes (chiptune)

FlagWhat you get
--graceAmazing Grace (NEW BRITAIN, public domain), chiptune
--twinkleTwinkle Twinkle Little Star
--rowRow, Row, Row Your Boat
--jingleJingle Bells (1857)
--silentnightSilent Night (1818)
--yankeeYankee Doodle
--susannaOh! Susanna (Foster, 1848)
--canonPachelbel's Canon, main melody
--tetrisKorobeiniki (public domain folk tune) in chiptune
--odeOde to Joy, chiptune
--eliseFur Elise, chiptune
Tag summary
Recent tags
Content type
Image
Digest
sha256:d7c9340b7…
Size
113.5 MB
Last updated
17 days ago
docker pull fourzerosix/daneq:latest