Skip to content

Commit

Permalink
Added proper parsing of "C+2".
Browse files Browse the repository at this point in the history
  • Loading branch information
isalin committed Jun 16, 2018
1 parent 561194b commit 1ddf628
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions TBbard/src/bard/MidiParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,16 @@ public void getNotes(String filePath, int instrumentIndex, int octaveTarget, boo

for(int o = 0; o < 11; o++){
sheets[sm.getChannel()][o] += line;
if(octave < o) sheets[sm.getChannel()][o] += "-1";
if(octave > o) sheets[sm.getChannel()][o] += "+1";

if(noteName.equals("C") && octave > o+1){
sheets[sm.getChannel()][o] += "+2";
} else {
if(octave < o) {
sheets[sm.getChannel()][o] += "-1";
}
if(octave > o) {
sheets[sm.getChannel()][o] += "+1";
}
}
}

} else
Expand Down

0 comments on commit 1ddf628

Please sign in to comment.