diff --git a/out/artifacts/BongoMidi_jar/BongoMidi.jar b/out/artifacts/BongoMidi_jar/BongoMidi.jar index f46539b..6bd780d 100644 Binary files a/out/artifacts/BongoMidi_jar/BongoMidi.jar and b/out/artifacts/BongoMidi_jar/BongoMidi.jar differ diff --git a/src/com/bongo/Main.java b/src/com/bongo/Main.java index e740ed0..ccf91d4 100644 --- a/src/com/bongo/Main.java +++ b/src/com/bongo/Main.java @@ -44,8 +44,6 @@ public static void main(String[] args) throws Exception { @Override public void run() { while (true){ - window.invalidate(); - window.validate(); window.repaint(); } } diff --git a/src/com/bongo/Renderer.java b/src/com/bongo/Renderer.java index 76047a4..a38e346 100644 --- a/src/com/bongo/Renderer.java +++ b/src/com/bongo/Renderer.java @@ -37,17 +37,6 @@ public static class Bongo { public Boolean r_hand=false; public Bongo(Note note) { - Random rand = new Random(); - if(Main.bongos[note.channel]!=null){ - this.x = Main.bongos[note.channel].x; - this.y = Main.bongos[note.channel].y; - } - else { - Integer[] c = coords.get(15-note.channel); - this.x = c[0]; - this.y = c[1]; - } - this.note = note; if(note.status){ if(note.cpatch==Instr_Categ.Percussion || note.cpatch==Instr_Categ.CPerc){ if(note.midi_number<=36){ @@ -66,6 +55,19 @@ public Bongo(Note note) { } } } + if(Main.bongos[note.channel]!=null){ + this.x = Main.bongos[note.channel].x; + this.y = Main.bongos[note.channel].y; + this.l_hand = !Main.bongos[note.channel].l_hand; + this.r_hand = !Main.bongos[note.channel].r_hand; + } + else { + Integer[] c = coords.get(15-note.channel); + this.x = c[0]; + this.y = c[1]; + } + this.note = note; + } @Override public String toString(){