Skip to content

Commit 6ac9dbb

Browse files
committed
Bug fix
1 parent 0e992be commit 6ac9dbb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/com/xxmicloxx/NoteBlockAPI/model/Note.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ public class Note {
1111
private byte key;
1212

1313
private short pitch;
14-
14+
15+
public Note(byte instrument, byte key) {
16+
this(instrument, key, (byte) 100, (byte) 100, (short) 0);
17+
}
18+
1519
public Note(byte instrument, byte key, byte velocity, byte panning, short pitch) {
1620
this.instrument = instrument;
1721
this.key = key;

src/main/java/com/xxmicloxx/NoteBlockAPI/utils/NoteUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ public class NoteUtils {
77
private static float[] pitches = null;
88

99
public static void generatePitchValues(){
10-
pitches = new float[2400];
10+
pitches = new float[2401];
1111

12-
for (int i = 0; i < 2400; i++){
12+
for (int i = 0; i < 2401; i++){
1313
pitches[i] = (float) Math.pow(2, (i - 1200d) / 1200d);
1414
}
1515
}

0 commit comments

Comments
 (0)