midi pitchy thingy
This commit is contained in:
parent
44db9f75b0
commit
7fcd8923fb
1 changed files with 6 additions and 2 deletions
|
@ -147,8 +147,12 @@ public class MidiConverter {
|
|||
return null;
|
||||
}
|
||||
|
||||
int pitch = (midiPitch-instrument.offset) + SongHandler.getInstance().pitch;
|
||||
int noteId = pitch + instrument.instrumentId*25;
|
||||
int pitch = ((midiPitch-instrument.offset) + SongHandler.getInstance().pitch) + 33;
|
||||
|
||||
while (pitch < 33) pitch += 12;
|
||||
while (pitch > 57) pitch -= 12;
|
||||
|
||||
int noteId = (pitch - 33) + instrument.instrumentId*25;
|
||||
long time = microTime / 1000L;
|
||||
|
||||
return new Note(noteId, time);
|
||||
|
|
Loading…
Reference in a new issue