diff --git a/build.gradle b/build.gradle index 3bc3ea8..e2a9dc5 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ javafx { application { group = 'com.github.axelberndt' - version = '1.0.2' + version = '1.0.3' mainClass.set("arpeggiatorum.Launcher") } diff --git a/src/main/java/arpeggiatorum/Arpeggiator.java b/src/main/java/arpeggiatorum/Arpeggiator.java index 58a9272..eaefd2b 100644 --- a/src/main/java/arpeggiatorum/Arpeggiator.java +++ b/src/main/java/arpeggiatorum/Arpeggiator.java @@ -19,7 +19,7 @@ * @author Axel Berndt */ public class Arpeggiator implements Receiver, Transmitter { - public static final String version = "1.0.2"; + public static final String version = "1.0.3"; public static final int ARPEGGIO_CHANNEL_PRESET = 1; public static final int HELD_NOTES_CHANNEL_PRESET = 2; public static final int BASS_CHANNEL_PRESET = 0; diff --git a/src/main/java/arpeggiatorum/notePool/NotePool.java b/src/main/java/arpeggiatorum/notePool/NotePool.java index ae33cc2..e526c9e 100644 --- a/src/main/java/arpeggiatorum/notePool/NotePool.java +++ b/src/main/java/arpeggiatorum/notePool/NotePool.java @@ -262,10 +262,12 @@ public NoteItem getNext(NoteItem previous) { // get next note from note pool switch (this.pattern) { case up: - index = ++index % this.notePool.size(); + if (this.notePool.size() > 0) + index = ++index % this.notePool.size(); break; case down: - index = Math.floorMod(--index, this.notePool.size()); + if (this.notePool.size() > 0) + index = Math.floorMod(--index, this.notePool.size()); break; case up_down: if (++index >= this.notePool.size()) {