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

The notes of one harmony of a guitar track, from one song position onward. More...

#include <axeharmony.h>

Public Member Functions

 AxeHarmony ()
 Construct a harmony with no notes.
 ~AxeHarmony ()
 Release the notes.
void AddNote (unsigned char nNote)
 Add a note and move the middle of the range to fit it.
unsigned char GetHighest () const
 Report the highest note.
unsigned char GetLowest () const
 Report the lowest note.
void SnapContour (AxeContour *pContour, int nTranspose) const
 Move the notes of a contour onto the harmony, centred on its range.
unsigned char Snap (int nNote) const
 Report the note of the harmony nearest a note.

Detailed Description

The notes of one harmony of a guitar track, from one song position onward.

The class is not polymorphic. The RTTI of AxeTrackData's store of harmonies includes the class name. The notes form a set, and the harmony records the middle of its range.

Constructor & Destructor Documentation

◆ AxeHarmony()

AxeHarmony::AxeHarmony ( )

Construct a harmony with no notes.

Ghidra address:
NTSC-U/C: 0x001571a8
Ghidra address:
PAL: 0x00158a30

◆ ~AxeHarmony()

AxeHarmony::~AxeHarmony ( )

Release the notes.

Ghidra address:
NTSC-U/C: 0x00157240
Ghidra address:
PAL: 0x00158ac8

Member Function Documentation

◆ AddNote()

void AxeHarmony::AddNote ( unsigned char nNote)

Add a note and move the middle of the range to fit it.

Parameters
nNoteThe note.
Ghidra address:
NTSC-U/C: 0x001572c0
Ghidra address:
PAL: 0x00158b48

◆ GetHighest()

unsigned char AxeHarmony::GetHighest ( ) const

Report the highest note.

Returns
The note.
Ghidra address:
NTSC-U/C: 0x00157340
Ghidra address:
PAL: 0x00158bc8

◆ GetLowest()

unsigned char AxeHarmony::GetLowest ( ) const

Report the lowest note.

Returns
The note.
Ghidra address:
NTSC-U/C: 0x00157368
Ghidra address:
PAL: 0x00158bf0

◆ SnapContour()

void AxeHarmony::SnapContour ( AxeContour * pContour,
int nTranspose ) const

Move the notes of a contour onto the harmony, centred on its range.

The first note snaps to the nearest note of the harmony. Each later note moves by the step the contour takes from the note before it and snaps again, stepping on to the next note of the harmony in the direction of the step when the snap would repeat the previous note.

Parameters
pContourThe contour.
nTransposeThe notes the contour moves by before it snaps.
Ghidra address:
NTSC-U/C: 0x00157378
Ghidra address:
PAL: 0x00158c00

◆ Snap()

unsigned char AxeHarmony::Snap ( int nNote) const

Report the note of the harmony nearest a note.

A note below 0 counts as 0. A note midway between two notes of the harmony resolves to the higher one.

Parameters
nNoteThe note.
Returns
The nearest note.
Ghidra address:
NTSC-U/C: 0x00157568
Ghidra address:
PAL: 0x00158df0

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