Skip to content

Commit

Permalink
midi export: ignore too high notes
Browse files Browse the repository at this point in the history
  • Loading branch information
oxygen-dioxide committed Sep 1, 2024
1 parent 6d36d9c commit a63d1a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions OpenUtau.Core/Format/MidiWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ static public void Save(string filePath, UProject project) {
using (var objectsManager = new TimedObjectsManager<TimedEvent>(trackChunk.Events)) {
var events = objectsManager.Objects;
foreach (UNote note in voicePart.notes) {
//Ignore notes whose pitch is out of midi range
if(note.tone < 0 || note.tone > 127){
continue;
}
string lyric = note.lyric;
if (lyric == "+") {
lyric = "-";
Expand Down

0 comments on commit a63d1a4

Please sign in to comment.