diff --git a/src/core/Note.cpp b/src/core/Note.cpp index 69497d22a33..674a150eda2 100644 --- a/src/core/Note.cpp +++ b/src/core/Note.cpp @@ -115,7 +115,7 @@ void Note::setPos( const MidiTime & pos ) void Note::setKey( const int key ) { - const int k = qBound( 0, key, NumKeys ); + const int k = qBound( 0, key, NumKeys - 1 ); m_key = k; }