# LFO Destinations
BASE_DESTINATIONS = [
    "none",
    "FILTER: Base",
    "FILTER: Width",
    "FILTER: Env. Reset",
    "AMP: Attack Time",
    "AMP: Hold Time",
    "AMP: Decay Time",
    "AMP: Sustain Level",
    "AMP: Release Time",
    "AMP: Pan",
    "AMP: Volume",
    "FX: Delay Send",
    "FX: Reverb Send",
    "FX: Chorus Send",
    "FX: Bit Reduction",
    "FX: SRR",
    "FX: SRR Routing",
    "FX: Overdrive",
    "SYN: Data entry knob A, page 1–4",
    "SYN: Data entry knob B, page 1–4",
    "SYN: Data entry knob C, page 1–4",
    "SYN: Data entry knob D, page 1–4",
    "SYN: Data entry knob E, page 1–4",
    "SYN: Data entry knob F, page 1–4",
    "SYN: Data entry knob G, page 1–4",
    "SYN: Data entry knob H, page 1–4",
    "SYN: Pitch Bend",
    "SYN: Aftertouch",
    "SYN: Mod Wheel",
    "SYN: Breath Controller",
    "CC: CC1–16 Values",
    "FILTER: Attack Time",
    "FILTER: Decay Time",
    "FILTER: Sustain Level",
    "FILTER: Release Time",
    "FILTER: Frequency",
    "FILTER: Data entry knob F",
    "FILTER: Data entry knob G",
    "FILTER: Envelope Depth",
    "FILTER: Env. Delay",
    "FILTER: Key Tracking",
]

LFO1_SPECIFIC = []

LFO2_SPECIFIC = [
    "LFO1: Speed",
    "LFO1: Multiplier",
    "LFO1: Fade In/Out",
    "LFO1: Waveform",
    "LFO1: Start Phase",
    "LFO1: Trig Mode",
    "LFO1: Depth",
]

LFO3_SPECIFIC = LFO2_SPECIFIC + [
    "LFO2: Speed",
    "LFO2: Multiplier",
    "LFO2: Fade In/Out",
    "LFO2: Waveform",
    "LFO2: Start Phase",
    "LFO2: Trig Mode",
    "LFO2: Depth",
]

# LFO Parameters
LFO1_PARAMS = {
    "SPD": {"cc_msb": 102, "nrpn_lsb": "1", "nrpn_msb": 42, "default": 48},
    "MULT": {
        "cc_msb": 103,
        "nrpn_lsb": "1",
        "nrpn_msb": 43,
        "max_midi": 11,
        "max_val": 2000,
        "min_val": 1,
        "default": 2,
    },
    "FADE": {
        "cc_msb": 104,
        "nrpn_lsb": "1",
        "nrpn_msb": 44,
        "max_val": 63,
        "min_val": -64,
        "default": 0,
    },
    "DEST": {
        "cc_msb": 105,
        "nrpn_lsb": "1",
        "nrpn_msb": 45,
        "max_midi": 50,
        "min_midi": 25,
        "max_val": 50,
        "min_val": 25,
        "default": "none",
        "options": BASE_DESTINATIONS,
    },
    "WAVE": {
        "cc_msb": 106,
        "nrpn_lsb": "1",
        "nrpn_msb": 46,
        "max_midi": 6,
        "max_val": 6,
        "default": "sine",
        "options": ["tri", "sine", "sqr", "saw", "expo", "ramp", "rand"],
    },
    "SPH": {"cc_msb": 107, "nrpn_lsb": "1", "nrpn_msb": 47},
    "MODE": {
        "cc_msb": 108,
        "nrpn_lsb": "1",
        "nrpn_msb": 48,
        "max_midi": 4,
        "max_val": 4,
        "default": "free",
        "options": ["free", "trig", "hold", "one", "half"],
    },
    "DEP": {"cc_msb": 109, "nrpn_lsb": "1", "nrpn_msb": 49},
}

LFO2_PARAMS = {
    "SPD": {"cc_msb": 111, "nrpn_lsb": "1", "nrpn_msb": 50, "default": 48},
    "MULT": {
        "cc_msb": 112,
        "nrpn_lsb": "1",
        "nrpn_msb": 51,
        "max_midi": 11,
        "max_val": 2000,
        "min_val": 1,
        "default": 2,
    },
    "FADE": {
        "cc_msb": 113,
        "nrpn_lsb": "1",
        "nrpn_msb": 52,
        "max_val": 63,
        "min_val": -64,
        "default": 0,
    },
    "DEST": {
        "cc_msb": 114,
        "nrpn_lsb": "1",
        "nrpn_msb": 53,
        "max_midi": 50,
        "min_midi": 25,
        "max_val": 50,
        "min_val": 25,
        "default": "none",
        "options": LFO2_SPECIFIC + BASE_DESTINATIONS,
    },
    "WAVE": {
        "cc_msb": 115,
        "nrpn_lsb": "1",
        "nrpn_msb": 54,
        "max_midi": 6,
        "max_val": 6,
        "default": "sine",
        "options": ["tri", "sine", "sqr", "saw", "expo", "ramp", "rand"],
    },
    "SPH": {"cc_msb": 116, "nrpn_lsb": "1", "nrpn_msb": 55},
    "MODE": {
        "cc_msb": 117,
        "nrpn_lsb": "1",
        "nrpn_msb": 56,
        "max_midi": 4,
        "max_val": 4,
        "default": "free",
        "options": ["free", "trig", "hold", "one", "half"],
    },
    "DEP": {"cc_msb": 118, "nrpn_lsb": "1", "nrpn_msb": 57},
}

LFO3_PARAMS = {
    "SPD": {"cc_msb": 121, "nrpn_lsb": "1", "nrpn_msb": 58, "default": 48},
    "MULT": {
        "cc_msb": 122,
        "nrpn_lsb": "1",
        "nrpn_msb": 59,
        "max_midi": 11,
        "max_val": 2000,
        "min_val": 1,
        "default": 2,
    },
    "FADE": {
        "cc_msb": 123,
        "nrpn_lsb": "1",
        "nrpn_msb": 60,
        "max_val": 63,
        "min_val": -64,
        "default": 0,
    },
    "DEST": {
        "cc_msb": 124,
        "nrpn_lsb": "1",
        "nrpn_msb": 61,
        "max_midi": 50,
        "min_midi": 25,
        "max_val": 50,
        "min_val": 25,
        "default": "none",
        "options": LFO3_SPECIFIC + BASE_DESTINATIONS,
    },
    "WAVE": {
        "cc_msb": 125,
        "nrpn_lsb": "1",
        "nrpn_msb": 62,
        "max_midi": 6,
        "max_val": 6,
        "default": "sine",
        "options": ["tri", "sine", "sqr", "saw", "expo", "ramp", "rand"],
    },
    "SPH": {"cc_msb": 126, "nrpn_lsb": "1", "nrpn_msb": 70},
    "MODE": {
        "cc_msb": 127,
        "nrpn_lsb": "1",
        "nrpn_msb": 71,
        "max_midi": 4,
        "max_val": 4,
        "default": "free",
        "options": ["free", "trig", "hold", "one", "half"],
    },
    "DEP": {"cc_msb": 128, "nrpn_lsb": "1", "nrpn_msb": 72},
}
