Skip to main content

region_for

Function region_for 

Source
pub fn region_for<'a>(
    instr: &'a SfzInstrument<'a>,
    note: u8,
    velocity: u8,
) -> Option<&'a SfzRegion<'a>>
Expand description

Return the first region matching (note, velocity), or None if the instrument has no region covering that key/velocity rectangle.

Allocation-free: borrows straight out of instr’s region slice.