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

Collector of the channel messages of one MIDI channel that cuts MultiMuse pieces out of them. More...

#include <musefactory.h>

Classes

struct  TickMuse
 One collected channel message. More...

Public Member Functions

 MuseFactory ()
 Construct an empty collector.
 ~MuseFactory ()
 Release the collector.
void AddMidi (int nTick, unsigned char nStatus, unsigned char nData1, unsigned char nData2)
 Collect a channel message.
unsigned char GetChannel () const
 Report the MIDI channel of the collected messages.
int CountMessages (int nStart, int nEnd)
 Count the collected messages in a span of ticks.
MultiMuse * ExtractAll ()
 Build a piece from every collected message.
MultiMuse * Extract (int nStart, int nEnd)
 Build a piece from the messages in a span of ticks, starting at the first note on of the span.

Detailed Description

Collector of the channel messages of one MIDI channel that cuts MultiMuse pieces out of them.

The class is not polymorphic. The RTTI records the name through the nested MuseFactory::TickMuse. A note on takes its length from the next note off of its note. A piece cut from the middle of the messages starts with the muses that restore the controller state in force.

Constructor & Destructor Documentation

◆ MuseFactory()

MuseFactory::MuseFactory ( )

Construct an empty collector.

Ghidra address:
NTSC-U/C: 0x0015a9f8
Ghidra address:
PAL: 0x0015c1e8

◆ ~MuseFactory()

MuseFactory::~MuseFactory ( )

Release the collector.

Ghidra address:
NTSC-U/C: 0x0015aa68
Ghidra address:
PAL: 0x0015c258

Member Function Documentation

◆ AddMidi()

void MuseFactory::AddMidi ( int nTick,
unsigned char nStatus,
unsigned char nData1,
unsigned char nData2 )

Collect a channel message.

The first message sets the channel.

Parameters
nTickThe tick.
nStatusThe status byte.
nData1The first data byte.
nData2The second data byte.
Ghidra address:
NTSC-U/C: 0x0015ab38
Ghidra address:
PAL: 0x0015c328

◆ GetChannel()

unsigned char MuseFactory::GetChannel ( ) const

Report the MIDI channel of the collected messages.

Returns
The channel.
Ghidra address:
NTSC-U/C: 0x0015ac20
Ghidra address:
PAL: 0x0015c410

◆ CountMessages()

int MuseFactory::CountMessages ( int nStart,
int nEnd )

Count the collected messages in a span of ticks.

An unpaired note on does not count.

Parameters
nStartThe first tick of the span.
nEndThe tick after the span.
Returns
The number of messages.
Ghidra address:
NTSC-U/C: 0x0015ac28
Ghidra address:
PAL: 0x0015c418

◆ ExtractAll()

MultiMuse * MuseFactory::ExtractAll ( )

Build a piece from every collected message.

Returns
The piece, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015acf8
Ghidra address:
PAL: 0x0015c4e8

◆ Extract()

MultiMuse * MuseFactory::Extract ( int nStart,
int nEnd )

Build a piece from the messages in a span of ticks, starting at the first note on of the span.

Parameters
nStartThe first tick of the span.
nEndThe tick after the span.
Returns
The piece, with no reference taken.
Ghidra address:
NTSC-U/C: 0x0015ad98
Ghidra address:
PAL: 0x0015c588

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