Expand description
File-backed source and sink adapters for STREAM 6.
The crate keeps host filesystem access behind explicit stream file capabilities and records each read or write as a KERNEL 6 filesystem effect. SMF support reuses the in-tree MIDI file codec; WAV support is limited to canonical little-endian PCM16 RIFF/WAVE because that is the PCM packet format implemented by the stream audio layer.
Structs§
- WavStream
- A PCM stream decoded from a WAV file together with its sample format.
Functions§
- cassette_
expr_ to_ stream - Decodes a cassette expression and replays it as a stream.
- cassette_
to_ stream - Replays a recorded cassette back into a stream.
- pcm_
buffers_ to_ wav_ bytes - Encodes PCM buffers into canonical PCM16 WAV bytes.
- read_
smf_ stream - Reads a Standard MIDI File from
pathand opens it as a MIDI stream. - read_
wav_ stream - Reads a canonical PCM16 WAV file from
pathand opens it as a PCM stream. - smf_
bytes_ to_ stream - Parses Standard MIDI File bytes and opens them as a MIDI stream.
- smf_
file_ to_ stream - Opens an already-parsed Standard MIDI File as a MIDI stream.
- stream_
file_ read_ capability - Returns the capability gating filesystem reads (
stream.file.read). - stream_
file_ write_ capability - Returns the capability gating filesystem writes (
stream.file.write). - stream_
to_ cassette - Records a stream into a cassette using the given transport profile.
- stream_
to_ cassette_ expr - Records a stream into a cassette and encodes it as an expression.
- stream_
to_ smf_ bytes - Drains a MIDI stream and encodes it as Standard MIDI File bytes.
- stream_
to_ smf_ file - Drains a MIDI stream into a single-track
SmfFilewithtpqresolution. - stream_
to_ wav_ bytes - Drains a PCM stream and encodes it as canonical PCM16 WAV bytes.
- validate_
cassette_ fixture_ path - Validates a cassette against a golden fixture file at
path. - wav_
bytes_ to_ stream - Decodes canonical PCM16 WAV bytes and opens them as a PCM stream.
- write_
smf_ stream - Drains a MIDI stream and writes it to
pathas a Standard MIDI File. - write_
wav_ stream - Drains a PCM stream and writes it to
pathas a canonical PCM16 WAV file.