# 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": {
            "none": 0,
            "wavetone_osc1_pitch": 25,
            "wavetone_osc1_waveform": 26,
            "wavetone_osc1_wavetable": 27,
            "wavetone_osc1_offset": 28,
            "wavetone_osc1_phase_distortion": 29,
            "wavetone_osc1_level": 30,
            "wavetone_osc2_pitch": 31,
            "wavetone_osc2_waveform": 32,
            "wavetone_osc2_wavetable": 33,
            "wavetone_osc2_offset": 34,
            "wavetone_osc2_phase_distortion": 35,
            "wavetone_osc2_level": 36,
            "wavetone_mode": 37,
            "wavetone_drift": 38,
            "wavetone_phase_reset": 39,
            "wavetone_noise_attack": 40,
            "wavetone_noise_hold": 41,
            "wavetone_noise_decay": 42,
            "wavetone_noise_level": 43,
            "wavetone_noise_base": 44,
            "wavetone_noise_width": 45,
            "wavetone_noise_type": 46,
            "wavetone_noise_character": 47,
            "filter_eq_freq": 66,
            "filter_eq_req": 67,
            "filter_eq_gain": 68,
            "filter_envelope_depth": 69,
            "filter_envelope_delay": 70,
            "filter_envelope_attack": 71,
            "filter_envelope_decay": 72,
            "filter_envelope_sustain": 73,
            "filter_envelope_release": 74,
            "filter_reset": 75,
            "filter_base": 76,
            "filter_width": 77,
            "filter_bw_rt": 78,
            "filter_key_track": 79,
            "amp_attack": 81,
            "amp_hold": 82,
            "amp_decay": 83,
            "amp_sustain": 84,
            "amp_release": 85,
            "fx_delay_send": 86,
            "fx_reverb_send": 87,
            "fx_chorus_send": 88,
            "amp_pan": 89,
            "amp_volume": 90,
            "fx_bit_reduction": 95,
            "fx_srr": 96,
            "fx_srr_routing": 97,
            "fx_overdrive": 98,
            "fx_overdrive_routing": 99,
        },
    },
    "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": {
            "none": 0,
            "lfo1_speed": 1,
            "lfo1_multiplier": 2,
            "lfo1_fade": 3,
            "lfo1_wave": 5,
            "lfo1_start_phase": 6,
            "lfo1_mode": 7,
            "lfo1_depth": 8,
            "wavetone_osc1_pitch": 25,
            "wavetone_osc1_waveform": 26,
            "wavetone_osc1_wavetable": 27,
            "wavetone_osc1_offset": 28,
            "wavetone_osc1_phase_distortion": 29,
            "wavetone_osc1_level": 30,
            "wavetone_osc2_pitch": 31,
            "wavetone_osc2_waveform": 32,
            "wavetone_osc2_wavetable": 33,
            "wavetone_osc2_offset": 34,
            "wavetone_osc2_phase_distortion": 35,
            "wavetone_osc2_level": 36,
            "wavetone_mode": 37,
            "wavetone_drift": 38,
            "wavetone_phase_reset": 39,
            "wavetone_noise_attack": 40,
            "wavetone_noise_hold": 41,
            "wavetone_noise_decay": 42,
            "wavetone_noise_level": 43,
            "wavetone_noise_base": 44,
            "wavetone_noise_width": 45,
            "wavetone_noise_type": 46,
            "wavetone_noise_character": 47,
            "filter_eq_freq": 66,
            "filter_eq_req": 67,
            "filter_eq_gain": 68,
            "filter_envelope_depth": 69,
            "filter_envelope_delay": 70,
            "filter_envelope_attack": 71,
            "filter_envelope_decay": 72,
            "filter_envelope_sustain": 73,
            "filter_envelope_release": 74,
            "filter_reset": 75,
            "filter_base": 76,
            "filter_width": 77,
            "filter_bw_rt": 78,
            "filter_key_track": 79,
            "amp_attack": 81,
            "amp_hold": 82,
            "amp_decay": 83,
            "amp_sustain": 84,
            "amp_release": 85,
            "fx_delay_send": 86,
            "fx_reverb_send": 87,
            "fx_chorus_send": 88,
            "amp_pan": 89,
            "amp_volume": 90,
            "fx_bit_reduction": 95,
            "fx_srr": 96,
            "fx_srr_routing": 97,
            "fx_overdrive": 98,
            "fx_overdrive_routing": 99,
        },
    },
    "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": None,
    },
    "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},
}
