wavelength 1.0.0
Loading...
Searching...
No Matches
MidiChannelState Class Reference

The controller state of one MIDI channel, as the channel messages of a track change it. More...

#include <midichannelstate.h>

Public Member Functions

 MidiChannelState (unsigned char nChannel)
 Construct the state of a channel with nothing set.
 ~MidiChannelState ()
 Release the muses.
void OnMessage (unsigned char nStatus, unsigned char nData1, unsigned char nData2)
 Record a channel message of the channel that changes the state.
Muse * GetMuse ()
 Report the muse that restores the state, built again when the state changed.
void Reset ()
 Clear the state.
void SetChannel (unsigned char nChannel)
 Clear the state and change the channel.

Static Public Attributes

static constexpr int kNumControllers = 128
 Number of MIDI controllers.

Detailed Description

The controller state of one MIDI channel, as the channel messages of a track change it.

The class is not polymorphic and has no RTTI. The name is inferred. MuseFactory and AxeTrackContourBuilder track the state of their channel with one. The state turns into the muses that restore the program, the controllers, the pressure, and the pitch bend in force at the start of a piece cut from the middle of a track.

Constructor & Destructor Documentation

◆ MidiChannelState()

MidiChannelState::MidiChannelState ( unsigned char nChannel)
explicit

Construct the state of a channel with nothing set.

Parameters
nChannelThe MIDI channel.
Ghidra address:
NTSC-U/C: 0x001580b0
Ghidra address:
PAL: 0x00159938

◆ ~MidiChannelState()

MidiChannelState::~MidiChannelState ( )

Release the muses.

Ghidra address:
NTSC-U/C: 0x00158170
Ghidra address:
PAL: 0x001599f8

Member Function Documentation

◆ OnMessage()

void MidiChannelState::OnMessage ( unsigned char nStatus,
unsigned char nData1,
unsigned char nData2 )

Record a channel message of the channel that changes the state.

Program change, channel pressure, pitch bend, and control change messages for controllers below 96 count. Other messages are ignored.

Parameters
nStatusThe status byte.
nData1The first data byte.
nData2The second data byte.
Ghidra address:
NTSC-U/C: 0x00158228
Ghidra address:
PAL: 0x00159ab0

◆ GetMuse()

Muse * MidiChannelState::GetMuse ( )

Report the muse that restores the state, built again when the state changed.

Returns
The muse, or null when nothing is set.
Ghidra address:
NTSC-U/C: 0x00158640
Ghidra address:
PAL: 0x00159ec8

◆ Reset()

void MidiChannelState::Reset ( )

Clear the state.

Ghidra address:
NTSC-U/C: 0x00158cb0
Ghidra address:
PAL: 0x0015a538

◆ SetChannel()

void MidiChannelState::SetChannel ( unsigned char nChannel)

Clear the state and change the channel.

Parameters
nChannelThe MIDI channel.
Ghidra address:
NTSC-U/C: 0x00158e08
Ghidra address:
PAL: 0x0015a690

Member Data Documentation

◆ kNumControllers

int MidiChannelState::kNumControllers = 128
staticconstexpr

Number of MIDI controllers.


The documentation for this class was generated from the following file: