CL-RemiAudio
CL-RemiAudio is a collection of high-performance audio format I/O routines,
codecs, processors/effects, and other audio-related code written entirely in
Common Lisp. It is split up into multiple ASDF systems for ease of use.
There is also a version for the Crystal programming language if you'd like available here.
Wanna support this project and the developer? Buy Remilia a coffee on Ko-Fi, or support her through Liberapay.
Features
A list of supported features. Unless specified, the feature is implemented in pure Common Lisp.
- WAV and Au format support
- Reading and writing of files both all-at-once and as a stream of samples
- Sample rates from 1hz to whatever your CPU/RAM can handle
- Channels from 1 to whatever your CPU/RAM can handle
- Integer and IEEE Floating Point sample support
- Min/Max sample calculations and RMS calculations for input files
- Encoders/Decoders
- MPEG-1 layers I, II, and III (e.g. mp3, via libmpg123)
- FLAC (decoding only)
- QOA codec
- Extended QOA Format codec
- WavPack (via libwavpack)
- Vorbis (decoding only)
- YM2610 ADPCM-A codec
- High quality μ-law and A-law codec
- Processing
- Bit-depth conversion with optional TPDF dithering
- Integer -> Floating Point sample conversions
- High quality resampler (a native port based on libsamplerate)
- Effects
- Parametric EQ with low/high shelves and unlimited bands.
- Soft clipping
- Stereo enhancement
- Zita-Rev1 reverb effect (native port)
- MVerb reverb effect (native port)
- Chorus effect inspired by an 80s synth with model number ending in "-60"
- DC filter
- Generic lowpass filter
- CEM-style filter
- Wasp-style filter
- MS-20-style filter
- SSM-style filter
- Other
- Windowing functions (Blackman, Blackman-Harris, Hamming, Nuttall, Blackman-Nuttal, Hann)
- CUE sheet reading and writing
- XSPF and JSPF reading and writing
- Raw Vorbis Comments reading and writing
- Raw APEv1 and APEv2 tag reading and writing
- ReplayGain calculation support.
- Output
- Abstract "AUDIO-DRIVER" protocol to smooth-over the differences in various output backends
- ALSA backend
- libao backend
- out123 backend
- TCP backend - send audio over a TCP connection
Building and Development
A recent version of SBCL is highly suggested (CL-RemiAudio is known to work with SBCL 2.3.x and above).
If you want to enable SIMD code, then SBCL v2.3.x or higher is required. You
will also need to push :CL-REMIAUDIO-SIMD
into the *FEATURES*
variable
before compiling/loading CL-RemiAudio.
Packages
The base package is cl-remiaudio
is kind of like a "meta package' that loads
all of the sub packages. The sub packages can also be loaded individually, and
all have nicknames for shorter usage:
cl-remiaudio-core
(cl-ra
): Base package containing various common routines.cl-remiaudio-codecs
(cl-ra/codecs
): Base package for all codecs.cl-remiaudio-codecs-mpeg1
(cl-ra/mpeg1
): MPEG-1 decoder.cl-remiaudio-codecs-flac
(cl-ra/flac
): FLAC decoder.cl-remiaudio-codecs-qoa
(cl-ra/qoa
): QOA and Extended QOA Format encoders and decoders.cl-remiaudio-codecs-wavpack
(cl-ra/wv
): WavPack encoder and decoder.cl-remiaudio-dithering
(cl-ra/dith
): Dithering and sample format conversions.cl-remiaudio-dsp
(cl-ra/dsp
): Various effects/processors.cl-remiaudio-replaygain
(cl-ra/rg
): ReplayGain calculation support.cl-remiaudio-replaygain-parallel
(cl-ra/rg-parallel
): Additional parallel-processing support for ReplayGain calculations.cl-remiaudio-formats
(cl-ra/formats
): WAV and Au file I/O.cl-remiaudio-ogg
(cl-ra/ogg
): Ogg demuxer and Vorbis Comments parser.cl-remiaudio-cue
(cl-ra/cue
): CUE file reading and writing functions.cl-remiaudio-xspf
(cl-ra/xspf
): XSPF and JSPF file reading and writing functions.cl-remiaudio-ape
(cl-ra/ape
): Raw APEv1 and APEv2 reading and writing functions.cl-remiaudio-drivers
(cl-ra/drivers
): Base package for backend audio output drivers.cl-remiaudio-drivers-ao
(cl-ra/driver-ao
): Audio output via libao.cl-remiaudio-resampler
(cl-ra/resamp
): Fast, high quality resampler.
Style info
I use a slightly different style for my code.
- Keep lines 118 characters or shorter. Obviously sometimes you can't, but please try. Use 80 characters for Markdown files, though.
- New type declarations should have their names prefixed with
T/
, for example,t/uint32-vector
. This is only for DEFTYPEs and DEFINE-PSEUDO-ENUMs.
How do I contribute?
- Go to https://chiselapp.com/user/MistressRemilia/repository/CL-RemiAudio/ and clone the Fossil repository.
- Create a new branch for your feature.
- Push locally to the new branch.
- Create a bundle with Fossil that contains your changes.
- Get in contact with Remilia.
Contributors
- Remilia Scarlet - creator and maintainer
- Homepage: https://remilia.sdf.org/
- Fediverse: @remilia@nanako-さめ.mooo.com
- Email: zremiliaz@postzeoz.jpz My real address does not contain Z's
Links and Licenses
- MVerb by Martin Eastwood (GPLv3 License)
- Zita-Rev1 by Fons Adriaensen (GPLv3 License)
- YK Chorus by Spotlightkid (GPLv2 License)
- libsamplerate by Erik de Castro Lopo (2-clause BSD License)
- The ReplayGain calculation code is based on code from WavPack (3-clause BSD License)
- The Vorbis decoder is a pure Common Lisp port of the Public Domain stb_vorbis code.
CL-RemiAudio itself is mostly under the GNU Affero General Public
License version 3, except for the
items listed above. Copies of the licenses are in the licenses/
directory.