remiaudio
RemiAudio
RemiAudio is a collection of audio format I/O routines, codecs, and processors/effects written entirely in Crystal.
Wanna support Remilia? Buy me a coffee on Ko-Fi, or support me through Liberapay.
Features
A list of supported features and planned features.
- WAV format support
- Reading of WAV files
- Writing of WAV files
- 1 to 24 channels
- Sample rates from 8000hz to 352800hz
- Integer sample formats: unsigned 8-bit, signed 12, 16, 24, 32, and 64-bit
- IEEE Floating Point sample formats: 32-bit and 64-bit
- μ-law and A-law sample formats
- Extensible formats (ADPCM, MP3, etc.)
- Related RIFF chunks (cue , inst, smpl, ltxt, note, labl, plst, etc.)
- Au format support
- Reading of Au files
- Writing of AU files
- 1 or 2 channels
- Integer sample formats: unsigned 8-bit, signed 16, 24, and 32-bit
- IEEE Floating Point sample formats: 32-bit and 64-bit
- Sample rates from 8000hz to 352800hz
- Encoders/Decoders
- YM2610 ADPCM-A codec
- YM2610 ADPCM-B codec
- High quality μ-law and A-law codec
- Processing
- Bit-depth conversion with optional TDPF dithering
- Sample format conversions
- High-quality sample rate conversions
- Filters
- Multi-mode biquad Filter (lowpass, highpass, bandpass, notch, allpass, peaking EQ, lowshelf, highshelf)
- Separate biquad filter optimized for lowpass usage
- Lowpass filter similar to what's found in a CEM3394
- Lowpass filter similar to a SSM2040
- "Hornet Filter", a fun approximation of an EDP Wasp's lowpass filter
- Lowpass filter similar to what's found on a Korg MS-20
- Effects
- Soft clipping
- Stereo enhancement
- MVerb reverb effect
- Zita-Rev1-based reverb effect
- Freeverb-based reverb effect (
Schroeder
class) - Chorus effect inspired by an 80s synth with model number ending in "-60"
- Parametric EQ, mono and stereo variations, with an arbitrary number of bands
- Demuxing
- Basic Ogg demuxer
- Audio Backend Abstraction
- PulseAudio
- PortAudio
- libao
- Other
- Windowing functions (Blackman, Blackman-Harris, Hamming, Nuttall, Blackman-Nuttal, Hann)
- CUE sheet reading and writing
- XSPF/JSPF playlist reading and writing
- Vorbis Comments handling (read-only)
How do I get set up?
Add this to your application's shard.yml:
dependencies:
remiaudio:
fossil: https://chiselapp.com/user/MistressRemilia/repository/remiaudio
You will need Fossil installed to clone this repo and the dependency. You will also need Shards v0.17.1 or later. If you have an earlier version of Shards, you will need to to build the latest version manually.
Usage
API documentation can be found here: https://remilia.sdf.org/programming/docs/remiaudio
Version Control
RemiAudio sources are managed using Fossil, a distributed version control system. The Fossil repository contains the urtext, tickets, and wiki.
If you are reading this on GitLab or some other Git repository or service, then you are looking at a mirror. The names of check-ins and other artifacts in a Git mirror are different from the official names for those objects. The official names for check-ins are found in a footer on the check-in comment for authorized mirrors. The official check-in name can also be seen in the manifest.uuid file in the root of the tree. Always use the official name, not the Git-name, when communicating about a RemiAudio check-in.
Development
Help Wanted/Known Issues
- The MP3 decoder is not perfect. Some files play fine, others have minor artifacts, and some just crash it.
- The filters seem to be stable and they already sound pretty good, but I am no DSP expert by any means, so there is likely room for improvement.
Style info
I use a somewhat non-standard style for my code.
- Keep lines 118 characters or shorter. Obviously sometimes you can't, but please try. Use 80 or 115 characters for Markdown files, though.
- Please use pascalCase for variable and method names. Use CamelCase for type names. Use UPPER_SNAKE_CASE for constants.
- ALWAYS put parentheses around method parameters, except for these methods:
puts
,pp
,p
,raise
,sleep
,spawn
,loop
, andexit
. - Always the full
do |foo|...end
syntax with blocks, except when it's all on one line, then always use { and }. - The type name for exceptions end with Error. For example,
ExternalProgramError
.
How do I contribute?
- Go to https://chiselapp.com/user/MistressRemilia/repository/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)
- libsamplerate by Erik de Castro Lopo (2-clause BSD License)
RemiAudio itself is mostly under the GNU Affero General Public License version 3, except for the items listed above.
remiaudio
- 0
- 0
- 0
- 0
- 7 days ago
- April 3, 2024
GNU Affero General Public License v3.0
Sun, 17 Nov 2024 19:30:21 GMT