|
wavelength 1.0.0
|
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. | |
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.
| AxeHarmony::AxeHarmony | ( | ) |
Construct a harmony with no notes.
| AxeHarmony::~AxeHarmony | ( | ) |
Release the notes.
| void AxeHarmony::AddNote | ( | unsigned char | nNote | ) |
Add a note and move the middle of the range to fit it.
| nNote | The note. |
| unsigned char AxeHarmony::GetHighest | ( | ) | const |
Report the highest note.
| unsigned char AxeHarmony::GetLowest | ( | ) | const |
Report the lowest note.
| 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.
| pContour | The contour. |
| nTranspose | The notes the contour moves by before it snaps. |
| 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.
| nNote | The note. |