Skip to main content

normalize_controller_key

Function normalize_controller_key 

Source
pub fn normalize_controller_key(port_name: &str) -> String
Expand description

A port name without the numbers some systems append, such as "APC40 [2]" → "APC40", or ALSA’s client and port address, "iCON P1-X1:iCON P1-X1 MIDI 1 32:0" → "iCON P1-X1:iCON P1-X1 MIDI 1", which changes with the order devices are plugged in. A controller so keeps its mapping when it is plugged in again.