soundtab.ui.noteutil

In log scale, 0 is C5, -3 is A4 (440Hz)

Members

Functions

buildNoteConversionTable
void buildNoteConversionTable()
Undocumented in source. Be warned that the author may not have intended to support it.
fromLogScale
double fromLogScale(double note)

Convert from note (log scale) to frequency (-3 -> 440, 9 -> 880, -15 -> 220)

fullNameToNote
int fullNameToNote(dstring noteName)
Undocumented in source. Be warned that the author may not have intended to support it.
getNearestNote
int getNearestNote(double note)

returns nearest int note

getNoteIndex
int getNoteIndex(double note)

returns index 0..11 of nearest note (0=A, 1=A#, 2=B, .. 11=G#)

getNoteName
dstring getNoteName(double n)
Undocumented in source. Be warned that the author may not have intended to support it.
getNoteOctave
int getNoteOctave(double note)
Undocumented in source. Be warned that the author may not have intended to support it.
getNoteOctaveName
dstring getNoteOctaveName(double note)
Undocumented in source. Be warned that the author may not have intended to support it.
isBlackNote
bool isBlackNote(double note)

returns true for "black" - sharp note, e.g. for A#, G#

isBlackNote
bool isBlackNote(int note)

returns true for "black" - sharp note, e.g. for A#, G#

noteToFullName
dstring noteToFullName(double note)
Undocumented in source. Be warned that the author may not have intended to support it.
noteToFullName
dstring noteToFullName(int note)
Undocumented in source. Be warned that the author may not have intended to support it.
toLogScale
double toLogScale(double freq)

Convert frequency to log scale, 0 = BASE_FREQUENCY (440hz + 3halftones), +1 == + half tone, +12 == + octave (880Hz), -12 == -octave (220hz)

whiteNotesInRange
int whiteNotesInRange(int start, int end)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

BLACK_NOTES
bool[12] BLACK_NOTES;
Undocumented in source.

Structs

PitchCorrector
struct PitchCorrector
Undocumented in source.

Variables

BASE_FREQUENCY
double BASE_FREQUENCY;
Undocumented in source.
HALF_TONE
double HALF_TONE;
Undocumented in source.
NOTE_NAMES
dstring[12] NOTE_NAMES;
Undocumented in source.
OCTAVE_NAMES
dstring[10] OCTAVE_NAMES;
Undocumented in source.
QUARTER_TONE
double QUARTER_TONE;
Undocumented in source.

Meta