28 uint16 generateNoteID (
int midiChannel,
int midiNoteNumber)
noexcept
30 jassert (midiChannel > 0 && midiChannel <= 16);
31 jassert (midiNoteNumber >= 0 && midiNoteNumber < 128);
33 return uint16 ((midiChannel << 7) + midiNoteNumber);
77 jassert (isValid() &&
other.isValid());
78 return noteID ==
other.noteID;
83 jassert (isValid() &&
other.isValid());
84 return noteID !=
other.noteID;
96 :
UnitTest (
"MPENote class", UnitTestCategories::midi)
100 void runTest()
override
102 beginTest (
"getFrequencyInHertz");
105 note.initialNote = 60;
106 note.totalPitchbendInSemitones = -0.5;
119 expect (ratio > 1.0 /
oneCent);
123static MPENoteTests MPENoteUnitTests;
double getFrequencyInHertz(double frequencyOfA=440.0) const noexcept
bool operator!=(const MPENote &other) const noexcept
bool isValid() const noexcept
bool operator==(const MPENote &other) const noexcept