#include <NoteRange.h>
◆ NoteRange() [1/3]
◆ NoteRange() [2/3]
NoteRange::NoteRange |
( |
std::optional< Note > |
low, |
|
|
std::optional< Note > |
high |
|
) |
| |
◆ NoteRange() [3/3]
NoteRange::NoteRange |
( |
const std::string & |
low, |
|
|
const std::string & |
high |
|
) |
| |
◆ computeMedianOptimalRangeShiftOctaves()
int NoteRange::computeMedianOptimalRangeShiftOctaves |
( |
const NoteRange * |
sourceRange, |
|
|
const NoteRange * |
targetRange |
|
) |
| |
|
static |
Compute the median optimal range shift octaves
- Parameters
-
sourceRange | from |
targetRange | to |
- Returns
- median optimal range shift octaves
◆ copyOf()
◆ empty()
bool NoteRange::empty |
( |
| ) |
const |
Whether this range is empty
- Returns
- true if empty
◆ expand() [1/3]
void NoteRange::expand |
( |
const NoteRange * |
range | ) |
|
Expand the note range to include the given range
- Parameters
-
◆ expand() [2/3]
void NoteRange::expand |
( |
const std::vector< Note > & |
notes | ) |
|
◆ expand() [3/3]
void NoteRange::expand |
( |
Note |
note | ) |
|
Expand the note range to include the given note
- Parameters
-
◆ from() [1/2]
NoteRange NoteRange::from |
( |
const std::string & |
low, |
|
|
const std::string & |
high |
|
) |
| |
|
static |
◆ from() [2/2]
◆ getDeltaSemitones()
int NoteRange::getDeltaSemitones |
( |
NoteRange |
target | ) |
|
Get the delta semitones between this range and the target
- Parameters
-
- Returns
- delta semitones
◆ getMedianNote()
std::optional< Note > NoteRange::getMedianNote |
( |
| ) |
|
Get the median note of this range
- Returns
- median note
◆ getNoteNearestMedian()
std::optional< Note > NoteRange::getNoteNearestMedian |
( |
PitchClass |
root | ) |
|
Get the note nearest the median of the given root
- Parameters
-
- Returns
- note nearest the median
◆ includes()
bool NoteRange::includes |
( |
Note |
note | ) |
const |
Whether the given note is within this range
- Parameters
-
- Returns
- true if note is within this range
◆ median()
◆ ofNotes() [1/2]
◆ ofNotes() [2/2]
◆ ofStrings()
NoteRange NoteRange::ofStrings |
( |
const std::vector< std::string > & |
notes | ) |
|
|
static |
◆ shifted()
NoteRange NoteRange::shifted |
( |
int |
inc | ) |
const |
Get this range shifted by the given number of semitones
- Parameters
-
- Returns
- shifted range
◆ toAvailableOctave()
Note NoteRange::toAvailableOctave |
( |
Note |
note | ) |
const |
Change the octave of a note such that it is within this range
- Parameters
-
- Returns
- note moved to available octave
◆ toString()
std::string NoteRange::toString |
( |
Accidental |
accidental | ) |
|
◆ high
std::optional<Note> XJ::NoteRange::high |
◆ low
std::optional<Note> XJ::NoteRange::low |
The documentation for this class was generated from the following files:
- /home/runner/work/xjmusic/xjmusic/engine/include/xjmusic/music/NoteRange.h
- /home/runner/work/xjmusic/xjmusic/engine/src/music/NoteRange.cpp