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.
Releases
Releases can be found on the wiki.
Features
A list of supported features. Unless specified, the feature is implemented in pure Common Lisp.
- WAV and Au format support
- Input and output of WAV and Au files.
- Au: support for linear PCM (8, 16, 24, and 32-bit) IEEE floating point (32-bit and 64-bit).
- WAV: support for linear PCM (8, 16, 24, 32, and 64-bit), IEEE floating point (32-bit and 64-bit), "extensible" WAV files, and IMA ADPCM WAV files.
- 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
- IMA ADPCM 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.
- MusicBrainz API support.
- ListenBrainz API support.
- RIFF parsing.
- 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-ape(cl-ra/ape): Raw APEv1 and APEv2 reading and writing functions.cl-remiaudio-codecs(cl-ra/codecs): Common routines and API definitions for all codecs ("Codec API").cl-remiaudio-codecs-flac(cl-ra/flac): FLAC decoder.cl-remiaudio-codecs-low(cl-ra/codecs-low): Low-level codec support. Not normally used (use one of the other Codec API systems instead).cl-remiaudio-codecs-mpeg1(cl-ra/mpeg1): MPEG-1 decoder.cl-remiaudio-codecs-opus(cl-ra/opus): Opus decoder.cl-remiaudio-codecs-pcm(cl-ra/pcm): Au/WAV reading using the Codec API.cl-remiaudio-codecs-qoa(cl-ra/qoa): QOA and Extended QOA Format encoders and decoders.cl-remiaudio-codecs-vorbis(cl-ra/vorbis): Vorbis decoder.cl-remiaudio-codecs-wavpack(cl-ra/wv): WavPack encoder and decoder.cl-remiaudio-cue(cl-ra/cue): CUE file reading and writing functions.cl-remiaudio-dithering(cl-ra/dith): Dithering and sample format conversions.cl-remiaudio-drivers(cl-ra/drivers): Base package for backend audio output drivers ("Drivers API").cl-remiaudio-drivers-alsa(cl-ra/driver-alsa): Audio output via ALSA.cl-remiaudio-drivers-ao(cl-ra/driver-ao): Audio output via libao.cl-remiaudio-drivers-out123(cl-ra/driver-out123): Audio output via libout123.cl-remiaudio-drivers-tcp(cl-ra/driver-tcp): Audio output over a TCP socket.cl-remiaudio-dsp(cl-ra/dsp): Various effects/processors ("DSP API").cl-remiaudio-formats(cl-ra/formats): WAV and Au file I/O ("Formats API").cl-remiaudio-listenbrainz(cl-ra/lb): ListenBrainz and MusicBrainz API support.cl-remiaudio-ogg(cl-ra/ogg): Ogg demuxer and Vorbis Comments parser.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-resampler(cl-ra/resamp): Fast, high quality resamplers.cl-remiaudio-xspf(cl-ra/xspf): XSPF and JSPF file reading and writing functions.
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@social.cyberia9.org
- 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.