Skip to main content

apply_selectors

Function apply_selectors 

Source
pub fn apply_selectors(
    instrument: InstrumentType,
    params: &mut [f32],
    stored: &[SessionSelector],
) -> Vec<(usize, usize, usize)>
Expand description

Point the selectors in params at the positions the session stored.

Returns the entries that could not be restored exactly, as (parameter, wanted, given) — a bank that has shrunk since the session was written has nothing at the far end of it any more, and the nearest thing to what the player chose is its last entry. Anything the instrument does not call a selector is ignored rather than written blind.