Skip to main content

Crate rumpl

Crate rumpl 

Source
Expand description

Sample-free General MIDI synthesizer.

rumpl renders Standard MIDI Files without any SoundFont or sample library: every instrument is synthesized — from oscillators, envelopes, filters and FM for the synth sounds, and from physical models for the acoustic ones: Karplus-Strong plucked strings, modal pianos, bars, bells and membranes, and digital waveguides for bowed strings and winds.

The library entry points are:

  • midi::load — parse a .mid file into a midi::Sequence.
  • output::render::render_to_wav — render a sequence offline to WAV.
  • output::play::play — play a sequence in real time. Only available with the play feature, which uses cpal and on Linux needs the ALSA development headers (libasound2-dev).

To use it as a library without the CLI dependencies:

rumpl = { version = "0.2", default-features = false, features = ["play"] }
let seq = rumpl::midi::load(std::path::Path::new("song.mid"))?;
rumpl::output::render::render_to_wav(
  &seq,
  std::path::Path::new("song.wav"),
  44_100,
  0.8,
  3.0,
)?;

Modules§

demo
Idiomatic demo phrases for auditioning a single GM instrument.
midi
output
sequencer
synth