Skip to content

Commit

Permalink
Perform octave shifting with correct values
Browse files Browse the repository at this point in the history
  • Loading branch information
StavWasPlayZ committed Aug 28, 2023
1 parent 750262e commit f771049
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,17 +555,17 @@ protected int handleMidiOverflow(int note) {
setPitch(0);
ModClientConfigs.PITCH.set(0);
}
// Shift the note to the lower octave
// Shift the note to the higher octave
else
note -= minPitch;
note += 12;
}
else if (getPitch() == maxPitch) {
if (note < maxMidiNote()) {
setPitch(0);
ModClientConfigs.PITCH.set(0);
}
else
note -= maxPitch;
note -= 12;
}

return note;
Expand Down

0 comments on commit f771049

Please sign in to comment.