CL-RemiAudio
CL-RemiAudio is a collection of audio format I/O routines, codecs, and processors/effects 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? Buy me a coffee on Ko-Fi
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
- Reading of files using a stream backed by
mmap()
- Sample rates from 8000hz to 352800hz
- Min/Max sample calculations and RMS calculations for input files
- Encoders/Decoders
- FLAC (decoding only)
- QOA
- WavPack (via libwavpack)
- 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
- Soft clipping
- Stereo enhancement
- Zita-Rev1 reverb effect port
- FreeVerb reverb effect port
- MVerb reverb effect port
- Chorus effect inspired by an 80s synth with model number ending in "-60"
- DC filter
- Generic lowpass filter
- CEM-style filter
- Other
- Windowing functions (Blackman, Blackman-Harris, Hamming, Nuttall, Blackman-Nuttal, Hann)
- CUE sheet parsing
Building and Development
A recent version of SBCL is highly suggested (CL-RemiAudio is known to work with SBCL 2.3.x and above).
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-flac
(cl-ra/flac
): FLAC decoder.cl-remiaudio-codecs-qoa
(cl-ra/qoa
): QOA encoder and decoder.cl-remiaudio-codecs-wavpack
(cl-ra/wv
): WavPack encoder and decoder.cl-remiaudio-dsp
(cl-ra/dsp
): Various effects/processors.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-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 me.
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)
CL-RemiAudio itself is mostly under the GNU Affero General Public License version 3, except for the items listed above.