Skip to main content

Crate rondorust

Crate rondorust 

Source
Expand description

Parse rondocode’s rondo language and synthesize multichannel audio in native Rust.

The default build has no dependencies or audio-device requirement. Enable bevy for RondocodePlugin and custom assets.

This is an experimental port with partial upstream compatibility. Cross-language audio parity has not been validated.

use rondorust::{Song, RenderOptions};
let song = Song::parse("bpm 120\nsynth tone\n  sine\n  * adsr .005 .1 .5 .1\nplay tone\n  c4 e4 g4 c5")?;
let audio = song.render(RenderOptions { cycles: 2.0, ..Default::default() })?;
assert!(audio.peak() > 0.0);

Modules§

bevy
Bevy 0.19 custom audio assets and .rondo / .rondocode asset loading.
pattern
Pure cycle-based mini-notation queries. A cycle is one musical bar.

Structs§

AudioBuffer
Interleaved PCM. Cloning shares sample storage.
AudioStream
A bounded native synthesis stream. Each item is one [left, right] frame.
DdspFrame
One audio-rate DDSP input frame. Pitch is in Hz; breath is a dB offset.
DdspSettings
Fixed DDSP options. Absent options use the host model’s upstream defaults.
Diagnostic
A diagnostic with a one-based source position.
HostResources
Explicit resources; the core never fetches models or launches runtimes.
NoteEvent
A scheduled note. Times and durations are in seconds from playback start.
RenderOptions
Playback and offline rendering configuration. A cycle is a bar, and a tail adds silence after the final gates so effects can finish ringing.
Sample
Mono PCM at its original rate. Playback resamples by linear interpolation.
SampleBank
Named samples, explicitly supplied by the host. Missing resources are errors.
Scale
A tuning specified as semitone offsets and a repeating interval.
SingingRequest
A whole vocal phrase to bake into mono PCM before playback. Melody and lyrics use upstream mini notation; cycles determines their total duration.
Song
A parsed and compiled rondo score. Clones share immutable signal graphs.

Enums§

Error
Parsing, validation, resource, and output errors.

Traits§

DdspFactory
A host model adapter. Report all per-voice storage before it is allocated. Shared immutable model weights may be owned by the factory.
DdspVoice
A single preallocated neural voice. These methods run on the audio thread and must not allocate or block. Return finite stereo PCM.
SingingRenderer
Host vocal model/phrase renderer, called only during stream construction.

Functions§

midi_to_frequency
note_to_midi
Scientific note names, including accidentals and negative octaves. Bare names default to octave four; accidentals carry across octave boundaries.
write_wav
Write a little-endian 16-bit multichannel RIFF/WAVE stream without a WAV dependency. Float PCM is clamped at conversion; the original buffer is unchanged.

Type Aliases§

Result