Skip to main content

Crate awsm_audio_player

Crate awsm_audio_player 

Source
Expand description

awsm-audio-player — the WebAudio playback engine for the awsm-audio editor.

Player owns the live AudioContext and a fixed master chain (master gain → analyser → destination). Player::play instantiates an authored Graph onto the context (see the build module) and routes it into the master bus; Player::stop tears the instance down. The analyser exposes time-domain samples for the editor’s waveform view.

Modules§

bounce
Offline rendering — “bounce” a Sound’s playable graph (plus its scheduled note voices and control automation) to PCM via an OfflineAudioContext. Runs faster than realtime and is deterministic, so the editor can freeze a Sound into an audio clip.
document
Play a whole SampleLibrary document — the same engine the editor drives, exposed so any application can load a saved project and play it.
worklet
The generic WASM AudioWorklet shim.

Structs§

AudioClipPart
One bounced audio clip to schedule on the arrangement timeline. Times are in seconds; start is relative to the playback origin (the controller applies the scrub seek), offset is into the buffer, length is how long to play.
ControlLanePart
One control lane to automate: a target node’s AudioParam plus its breakpoints (already resolved to seconds-from-start + absolute value + the curve reaching each point from the previous one).
Player
Owns the AudioContext and the persistent master chain, plus whatever graph instance is currently playing.
SongVoiceSpec
One scheduled note within a TriggerPart.
TriggerPart
One sound’s worth of triggered notes within an arrangement: the instrument to instantiate, the arrangement node whose voice-bus its voices feed, and the notes (already resolved to seconds + transpose + gain).

Functions§

version
Version string baked from the crate manifest (handy link-check symbol).