gled-ui 2.34.0

gled's egui interface, shared by the desktop app and the browser
Documentation
//! The P1-X and APC40 mappings as they are in use, for tests.

use gled_model::asset::midi_controller::{MidiController, MidiControllerMapping};

fn load(json: &str) -> MidiControllerMapping {
    serde_json::from_str::<MidiController>(json)
        .unwrap_or_else(|error| panic!("fixture must load: {error}"))
        .mapping
}

/// The iCON P1-X with its modes Rows and Animations.
pub(crate) fn p1x() -> MidiControllerMapping {
    load(include_str!("fixtures/p1x.json"))
}

/// The Akai APC40 mkII, without modes, with a color mapping for its pads.
pub(crate) fn apc40() -> MidiControllerMapping {
    load(include_str!("fixtures/apc40.json"))
}