Skip to main content

resolve_instrument_with

Function resolve_instrument_with 

Source
pub fn resolve_instrument_with<F>(
    preset: &InstrumentPreset,
    licence: LicenceTag,
    lookup: F,
) -> ResolvedInstrument
where F: Fn(&str) -> Option<String>,
Expand description

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 attach licence.

lookup maps a reference to its concrete location (path/asset key), or None if the asset is missing. Embedded (SF2/DLS) content is passed through lookup too, keyed by the preset name, so an embedded source file can be located the same way.