Skip to content

Miscellaneous

Miscellaneous constants and functions defined within midi.py.

MaxInt module-attribute

MaxInt = 2147483647

Maximum signed 32-bit integer.

GPN_GetCurrentPreset module-attribute

GPN_GetCurrentPreset = -1

FPN_Preset flags? Potentially a typo?

TranzPort_OffOnT module-attribute

TranzPort_OffOnT = [MIDI_NOTEON, MIDI_NOTEON + 127 << 16]

???

TranzPort_OffBlinkT module-attribute

TranzPort_OffBlinkT = [MIDI_NOTEON, MIDI_NOTEON + 1 << 16]

???

TranzPort_OffOnBlinkT module-attribute

TranzPort_OffOnBlinkT = [MIDI_NOTEON, MIDI_NOTEON + 127 << 16, MIDI_NOTEON + 1 << 16]

???

FromMIDI_Max module-attribute

FromMIDI_Max = 1073741824

Maximum value allowed when specifying the midi.REC_FromMIDI flag when processing a Red event with general.processRECEvent().

FromMIDI_Half module-attribute

FromMIDI_Half = FromMIDI_Max >> 1

Half of the maximum midi.REC_FromMIDI value for Rec events.

EKRes module-attribute

EKRes = 1 / 24

Default endless knob (encoder) resolution.

This is set to be 24 ticks per revolution by default.

TrackNum_Master module-attribute

TrackNum_Master = 0

Track number for the master track in the mixer.

SM_Pat module-attribute

SM_Pat = 0

Pattern loop mode.

SM_Song module-attribute

SM_Song = 1

Song loop mode.

MiddleNote_Default module-attribute

MiddleNote_Default = 60

Default middle note's MIDI index. This refers to middle c.

FineTune_Default module-attribute

FineTune_Default = 0

Default value for fine-tuning.

ChannelDefaultVolume module-attribute

ChannelDefaultVolume = 1000 / 1280

Default volume of new channels on the channel rack.

TackDefaultVolume module-attribute

TackDefaultVolume = 800 / 1000

Default volume of new tracks on the mixer. The name has a typo.

EncodeRemoteControlID

EncodeRemoteControlID(PortNum: int, ChanNum: int, CCNum: int) -> int

Generates a controlId given information about an event

Args:

  • PortNum (int): the port that this event was sent to

  • ChanNum (int): the channel of this event

  • CCNum (int): the CC number of this event

Returns:

  • int: controlId

Included since API Version 1