"""
Analog Specs
"""
from enum import Enum
from jdxi_editor.midi.data.base.oscillator import OscillatorWidgetTypes
from jdxi_editor.midi.wave.spec import WaveOscBehavior
[docs]
class AnalogWaveOsc(WaveOscBehavior, Enum):
"""Analog oscillator waveform types"""
[docs]
class AnalogSubOscType(Enum):
"""Analog sub oscillator types"""
[docs]
OFF = 0x00 # Sub oscillator off
[docs]
OCT_DOWN_1 = 0x01 # -1 octave
[docs]
OCT_DOWN_2 = 0x02 # -2 octaves
@property
[docs]
def display_name(self) -> str:
"""Get digital name for sub oscillator preset_type"""
names = {0x00: "OFF", 0x01: "-1 OCT", 0x02: "-2 OCT"}
return names.get(self.value, "???")
@property
[docs]
def midi_value(self) -> int:
"""Get MIDI value for sub oscillator preset_type"""
return self.value