Skip to main content

Crate sim_lib_sound_bridge

Crate sim_lib_sound_bridge 

Source
Expand description

MIDI-to-sound bridging for the SIM music constellation.

This crate connects the MIDI surface to the sound layer. The MidiToSoundBridge consumes MIDI events and produces ScheduledTones, resolving programs through a TimbreBank, pitches through a tuning, and polyphony through a VoicePool. BridgeOptions and BridgeChannelState configure and track per-channel behavior, and a runtime surface installs the bridge cards as a SIM lib.

Structs§

BridgeChannelState
Per-channel controller state tracked by the bridge.
BridgeOptions
Configuration for a MidiToSoundBridge.
MidiToSoundBridge
A MidiSink that interprets MIDI events into scheduled tones, managing per-channel state, tuning, voice allocation, and timing.
ScheduledTone
A tone scheduled to start at a given time, with stereo placement and its originating MIDI channel and key.
SoundBridgeLib
Host-registered lib exporting the MIDI-to-sound bridge cards and registry.
TimbreBank
A bank mapping MIDI (bank MSB, bank LSB, program) selections to timbres, with a fallback for unmapped selections.
Voice
An allocated voice sounding a single note.
VoicePool
A polyphony-limited pool of voices that emits scheduled tones as voices finish or are stolen.

Enums§

SoundBridgeError
Error raised by the MIDI-to-sound bridge and its voice pool.
VoicePhase
The lifecycle phase of a voice in the pool.

Statics§

RECIPES
Cookbook recipes for this lib, embedded at build time.

Functions§

install_sound_bridge_lib
Installs the sound-bridge lib into cx, registering the bridge cards and registry export records (idempotent).