CL-RemiAudio
CL-RemiAudio is a collection of audio format I/O routines, codecs, and processors/effects written entirely in Common Lisp.
This is still very early in development, so the API will likely experience frequent changes. Expect a few bugs.
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 and planned features.
- WAV and Au format support
- [x] Reading and writing of files both all-at-once and as a stream of samples
- [x] Reading of files using a stream backed by
mmap()
- [x] Sample rates from 8000hz to 352800hz
- [x] Min/Max sample calculations and RMS calculations for input files
- Encoders/Decoders
- [x] MPEG-1 Layer I, II, and III (MP1/MP2/MP3) (decoding only)
- [x] FLAC (decoding only)
- [x] YM2610 ADPCM-A codec
- [ ] YM2610 ADPCM-B codec
- [x] High quality μ-law and A-law codec
- Processing
- [x] Bit-depth conversion with optional TPDF dithering
- [x] Integer -> Floating Point sample conversions
- [ ] Sample rate conversions
- Effects
- [x] Soft clipping
- [x] Stereo enhancement
- [x] Zita-Rev1 reverb effect port
- [x] FreeVerb reverb effect port
- [x] MVerb reverb effect port
- [x] Chorus effect inspired by an 80s synth with model number ending in "-60"
- [x] DC filter
- [x] Generic lowpass filter
- [x] CEM-style filter
- Other
- [x] Windowing functions (Blackman, Blackman-Harris, Hamming, Nuttall, Blackman-Nuttal, Hann)
- [x] CUE sheet parsing
- [x] 100% Common Lisp
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
(cl-ra
): Base package.cl-remiaudio-codecs
(cl-ra/codecs
): Base package for all codecs.cl-remiaudio-dsp
(cl-ra/dsp
): Various effects/processors.cl-remiaudio-formats
(cl-ra/formats
): File formats.cl-remiaudio-cue
(cl-ra/cue
): CUE 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 me.
Contributors
- Remilia Scarlet - creator and maintainer
- Homepage: https://remilia.sdf.org/
- Mastodon: @MistressRemilia@social.sdf.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)
- JavaMP3 by delthas (MIT license)
- YK Chorus by Spotlightkid (GPLv2 License)
CL-RemiAudio itself is mostly under the GNU Affero General Public License version 3, except for the items listed above.