Skip to content
/ audec Public

The Audio Decompiler -- a Real-Time Spectral Audio Analyzer

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE.APACHE2
MIT
LICENSE.MIT
Notifications You must be signed in to change notification settings

Grissess/audec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

audec

A somewhat-modern tool for precisely rendering real-time audio analysis.

audec is a real-time audio visualizer intended for utility and information density more than entertainment (it is the (au)dio (dec)ompiler). It is intended as a FOSS alternative to another proprietary real-time waterfall-rendering analyzer often touted by Linux musicians, and attempts to loosely emulate its appearance.

Screenshots

Some music--note the stereo separation, broadband noise, pitch-space mapping...

scrot1

An example configuration of the lovely ZynAddSubFX soft-synth:

scrot2

A clipping sine wave with multiple harmonics (note that the views can be resized fluidly):

scrot3

Requirements

  • Cargo (normally part of your Rust toolchain);
  • A host version of PortAudio (or your platform's build tools, e.g., build-essential, so that Rust portaudio can build it on its own);
  • For Linux: ensure you have ALSA's "development files" as well (e.g. libasound-dev), as that seems to be the default on this platform;
  • SDL2's development files.

On Linux and perhaps other POSIX platforms, these should be available in your favorite package manager (unless you're doing things "from scratch"). Cygwin is recommended for Windows users, or you could try your hand at building and installing from source.

Usage

cargo build builds the binary (somewhere into the target directory), cargo run runs it. Pass --release to either to disable runtime checks for performance.

Without command line arguments, sane defaults are assumed:

  • Your default input device (usually a built-in microphone, or whatever would be preferred for audio recording);
  • The selected device's default sample rate;
  • An 800x200 scope and an 800x600 spectrogram/waterfall;
  • A Hann-window FFT of 1024 samples;
  • Zero-crossing search of 1024 samples;
  • A -5dBFS spectral bias and a range of 30dBFS.

All of these can be overridden from the command line; use --help to see the options. (If you're using cargo run, make sure you put a -- before --help.)

A Note on Monitors

Since you'll probably want to analyze the signal coming from your computer, PortAudio on Linux most often uses ALSA, which does not have an in-built concept of "monitor devices" (inputs derived from signal sent to an output device); you'd normally have to use snd-aloop for that. However, modern audio routing daemons often provide their own:

  • PulseAudio users can use pavucontrol to change the "Recording stream" to one of its monitor devices, presuming you have the monitor module loaded (this is the default)--you can probably also use pactl from the command line if you need to;
  • JACK users can route things however they want, using jack_connect, jack_disconnect, jack_lsp, and any of the graphical patchbays like qjackctl or patchage;
  • PipeWire users can do the same with pw-link or graphical patchbays like helvum, as well as tools compatible with either of the above through its own emulation (e.g. with pw-jack)--you can also set the PIPEWIRE_NODE envvar to your audio output node ID (see pw-cli dump short Node) so that the ALSA Pipewire plugin connects to the monitor automatically.

Your mileage may vary on other platforms.

Contributing

Help wanted! Report missing features and bugs on the GitHub issue tracker. Some known issues, for example:

  • No scale yet (on either axis) in the spectrum/waterfall view;
  • No dynamic adjustment of parameters;
  • Could use more/better window functions;
  • Pure software-rendering of waterfall limits performance;
  • Changing window size dumps historical data;
  • No prebuilt binaries;
  • No changing the default color scheme; ... and probably others I'm unaware of.

If you're feeling motivated, pull requests are also welcome :)

License

This software is hereby released under the "Rust license", which is also known as the "dual Apache/MIT license"; specifically, you may choose, at your option:

Contributions Submitted for inclusion into the Work by You (as per supra Apache license) are assumed to comply with the terms of the selfsame Apache license without any additional terms or conditions (see id., section 5) and without patent encumbrance (id., section 3).

About

The Audio Decompiler -- a Real-Time Spectral Audio Analyzer

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE.APACHE2
MIT
LICENSE.MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages