remiaudio

RemiAudio is a collection of audio format I/O routines, codecs, and processors/effects written entirely in Crystal.

RemiAudio

RemiAudio is a collection of audio format I/O routines, codecs, and processors/effects written entirely in Crystal.

This is still semi-early in development, so the API will likely experience frequent changes. Expect a few bugs. See the NOTES file in the repostory's root directory for current notes about the library and a few to-do items.

Wanna support Remilia? Buy me a coffee on Ko-Fi, or support me through Liberapay.

Buy Me a Coffee at ko-fi.com Donate using 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
    • MPEG-1 Layer I, II, and III (MP1/MP2/MP3) (decoding only)
    • FLAC (decoding only)
    • 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
    • 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
  • Other
    • Windowing functions (Blackman, Blackman-Harris, Hamming, Nuttall, Blackman-Nuttal, Hann)
    • CUE sheet reading and writing
    • 100% Crystal :D

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.
  • No support for Ogg containers yet.
  • 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, and exit.
  • 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?

  1. Go to https://chiselapp.com/user/MistressRemilia/repository/remiaudio/ and clone the Fossil repository.
  2. Create a new branch for your feature.
  3. Push locally to the new branch.
  4. Create a bundle with Fossil that contains your changes.
  5. Get in contact with me.

Contributors

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.

Repository

remiaudio

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1 day ago
  • April 3, 2024
License

GNU Affero General Public License v3.0

Links
Synced at

Thu, 16 May 2024 06:41:40 GMT

Languages