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

The notes AxeTrack plays on a guitar track, looped over the length of the track. More...

#include <axecontour.h>

Classes

class  AxeNoteCB
 Receiver that records the note that started last. More...
struct  ContourNote
 One note of the contour, as written. More...

Public Member Functions

 AxeContour (int nLength, unsigned char nChannel)
 Construct an empty contour.
 ~AxeContour ()
 Release the notes.
int GetLength ()
 Report the ticks of one loop.
unsigned char GetChannel () const
 Report the MIDI channel of the notes.
void AddNote (int nTick, unsigned char nKey, unsigned char nVelocity, int nDuration)
 Add a note.
int GetNumNotes () const
 Report the number of notes.
void AddMuse (int nTick, Muse *pMuse)
 Add a muse that is not a note, such as a controller change.
unsigned char GetNoteKey (int nIndex) const
 Report a note as written.
void SetNoteKey (int nIndex, unsigned char nKey)
 Change the note number a note plays.
unsigned char GetHighestKey () const
 Report the highest note as written.
unsigned char GetLowestKey () const
 Report the lowest note as written.
void Play (int nPosition)
 Play the loop on the song scheduler.
void Stop ()
 Stop the loop.
bool IsPlaying () const
 Report whether the loop plays.
int GetPosition () const
 Report the position in the loop.

Detailed Description

The notes AxeTrack plays on a guitar track, looped over the length of the track.

The RTTI includes the class name and the nested AxeContour::AxeNoteCB and AxeContour::ContourNote. The class is not polymorphic. AxeTrackContourBuilder fills one from the guitar part of a song, and AxeHarmony moves its notes to fit a chord.

Constructor & Destructor Documentation

◆ AxeContour()

AxeContour::AxeContour ( int nLength,
unsigned char nChannel )

Construct an empty contour.

Parameters
nLengthThe ticks of one loop.
nChannelThe MIDI channel of the notes.
Ghidra address:
NTSC-U/C: 0x00156bf0
Ghidra address:
PAL: 0x00158478

◆ ~AxeContour()

AxeContour::~AxeContour ( )

Release the notes.

Ghidra address:
NTSC-U/C: 0x00156cc0
Ghidra address:
PAL: 0x00158548

Member Function Documentation

◆ GetLength()

int AxeContour::GetLength ( )

Report the ticks of one loop.

Returns
The ticks.
Ghidra address:
NTSC-U/C: 0x00156da0
Ghidra address:
PAL: 0x00158628

◆ GetChannel()

unsigned char AxeContour::GetChannel ( ) const

Report the MIDI channel of the notes.

Returns
The channel.
Ghidra address:
NTSC-U/C: 0x00156dc0
Ghidra address:
PAL: 0x00158648

◆ AddNote()

void AxeContour::AddNote ( int nTick,
unsigned char nKey,
unsigned char nVelocity,
int nDuration )

Add a note.

Parameters
nTickThe tick of the note in the loop.
nKeyThe note.
nVelocityThe MIDI velocity.
nDurationThe length in ticks.
Ghidra address:
NTSC-U/C: 0x00156dc8
Ghidra address:
PAL: 0x00158650

◆ GetNumNotes()

int AxeContour::GetNumNotes ( ) const

Report the number of notes.

Returns
The number.
Ghidra address:
NTSC-U/C: 0x00157060
Ghidra address:
PAL: 0x001588e8

◆ AddMuse()

void AxeContour::AddMuse ( int nTick,
Muse * pMuse )

Add a muse that is not a note, such as a controller change.

Parameters
nTickThe tick of the muse in the loop.
pMuseThe muse. The contour takes a reference.
Ghidra address:
NTSC-U/C: 0x00157078
Ghidra address:
PAL: 0x00158900

◆ GetNoteKey()

unsigned char AxeContour::GetNoteKey ( int nIndex) const

Report a note as written.

Parameters
nIndexThe note.
Returns
The note number.
Ghidra address:
NTSC-U/C: 0x001570c0
Ghidra address:
PAL: 0x00158948

◆ SetNoteKey()

void AxeContour::SetNoteKey ( int nIndex,
unsigned char nKey )

Change the note number a note plays.

The note as written does not change.

Parameters
nIndexThe note.
nKeyThe note number.
Ghidra address:
NTSC-U/C: 0x001570d8
Ghidra address:
PAL: 0x00158960

◆ GetHighestKey()

unsigned char AxeContour::GetHighestKey ( ) const

Report the highest note as written.

Returns
The note number.
Ghidra address:
NTSC-U/C: 0x00157108
Ghidra address:
PAL: 0x00158990

◆ GetLowestKey()

unsigned char AxeContour::GetLowestKey ( ) const

Report the lowest note as written.

Returns
The note number.
Ghidra address:
NTSC-U/C: 0x00157110
Ghidra address:
PAL: 0x00158998

◆ Play()

void AxeContour::Play ( int nPosition)

Play the loop on the song scheduler.

Parameters
nPositionThe position in the loop.
Ghidra address:
NTSC-U/C: 0x00157118
Ghidra address:
PAL: 0x001589a0

◆ Stop()

void AxeContour::Stop ( )

Stop the loop.

Ghidra address:
NTSC-U/C: 0x00157140
Ghidra address:
PAL: 0x001589c8

◆ IsPlaying()

bool AxeContour::IsPlaying ( ) const

Report whether the loop plays.

Returns
Whether it plays.
Ghidra address:
NTSC-U/C: 0x00157168
Ghidra address:
PAL: 0x001589f0

◆ GetPosition()

int AxeContour::GetPosition ( ) const

Report the position in the loop.

Returns
The ticks since the current loop started.
Ghidra address:
NTSC-U/C: 0x00157188
Ghidra address:
PAL: 0x00158a10

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