jdxi_editor.midi.channel.channel

This module defines an enumeration for MIDI channels used in a synthesizer, specifically for a Roland JD-Xi-style instrument editor.

The MidiChannel class extends IntEnum and provides symbolic names for the common MIDI channels, including: - DIGITAL1 (channel 1) - DIGITAL2 (channel 2) - ANALOG (channel 3) - DRUM (channel 10) - PROGRAM (channel 16)

The class also provides utility methods for handling MIDI channels, including: - __str__: Returns a string representation of the channel. - midi_channel_number: A property that returns the actual MIDI channel number (1-based). - from_midi_channel: A class method that retrieves a MidiChannel from a given MIDI channel number.

Usage example:

channel = MidiChannel.DIGITAL1 print(str(channel)) # Output: “Digital 1 (Ch.1)” print(channel.midi_channel_number) # Output: 1 print(MidiChannel.from_midi_channel(9)) # Output: MidiChannel.DRUM_KIT

Classes

MidiChannel

MIDI Channel Enum

Module Contents

class jdxi_editor.midi.channel.channel.MidiChannel[source]

Bases: enum.IntEnum

MIDI Channel Enum

DIGITAL_SYNTH_1 = 0[source]
DIGITAL_SYNTH_2 = 1[source]
ANALOG_SYNTH = 2[source]
DRUM_KIT = 9[source]
PROGRAM = 15[source]
VOCAL_FX = 6[source]
__str__() str[source]

Return str(self).

property midi_channel_number: int[source]
classmethod from_midi_channel(channel: int) MidiChannel | None[source]