Expand description
SFZ/SF2/DLS instrument LOADERS + hypermedia/vendor resolver + licence provenance.
Qualia ships NO sample content. This module implements the open, dependency-free
loaders and a resolver over USER-supplied instrument files (from the user’s hypermedia
library or a user/vendor content dir). SFZ is parsed from the open plain-text spec (no
vendored sfizz); SF2/DLS are enumerated from their RIFF headers WITHOUT decoding sample audio.
Each resolved instrument carries a LicenceTag as provenance so downstream export/share can
fail closed on non-commercial / no-redistribution assets. See the delivery plan Wave M
(“Engine vs content”). Lane AU-MIDI-INSTRUMENT. Re-exports only.
Structs§
- DlsCollection
- Enumerated instruments of a DLS collection.
- DlsInstrument
- One DLS instrument descriptor (no wave audio).
- Instrument
Preset - A format-neutral instrument preset.
- Resolved
Instrument - A preset bound to its content location(s) and stamped with licence provenance.
- Resolved
Sample - One resolved sample reference: the original relative reference plus, where a base/lookup was supplied, the concrete location it maps to.
- Sf2Preset
- One SoundFont2 preset descriptor (no sample audio).
- Sf2Presets
- The enumerated presets of a SoundFont2 file.
- SfzInstrument
- A parsed SFZ instrument: a bounded, ordered list of regions.
- SfzRegion
- One key/velocity-mapped region: a rectangle in (note, velocity) space plus playback params.
Enums§
- Licence
Tag - Licence provenance for user-supplied instrument content.
- Preset
Format - Which on-disk format a preset came from.
- Sample
Source - How a preset’s sample content is located.
Constants§
- MAX_
INSTRUMENTS - Cap on instruments returned (bounded, DoS-safe).
- MAX_
PRESETS - Cap on presets returned (bounded, DoS-safe).
- MAX_
REGIONS - Upper bound on regions in one instrument. A larger file is rejected (bounded, DoS-safe).
Functions§
- parse_
sfz - Parse an SFZ text instrument into a bounded
SfzInstrument. - read_
dls_ instruments - Enumerate the instruments of a
.dlsbyte buffer. - read_
sf2_ presets - Parse a
.sf2byte buffer and enumerate its presets. - region_
for - Return the first region matching
(note, velocity), orNoneif the instrument has no region covering that key/velocity rectangle. - resolve_
instrument - Resolve an instrument preset and attach its licence provenance.
- resolve_
instrument_ with - Resolve an instrument preset, binding each external sample reference against a caller-supplied
lookup(e.g. “join base dir” or “hypermedia asset by key”), and attachlicence.