]> ruin.nu Git - moosique.git/blobdiff - MooTrackView.java
Put the play thread to sleep. Didn't see any difference in performance
[moosique.git] / MooTrackView.java
index 7b9decfc393446a76a87541409f44b35cd084d00..4b033c1f4184fe7c8395b7092d4301eb74fdd0b9 100644 (file)
@@ -79,13 +79,13 @@ public class MooTrackView extends JPanel {
                        }
                }
 
-               int beatsPerSixteenth = Moosique.getSequence().getResolution() / 4;
+               int ticksPerSixteenth = Moosique.getSequence().getResolution() / 4;
                MooNote mn = elem.getNote();
                Insets insets = getInsets();
                int x, y, height;
                x = insets.left;
-               y = insets.top + (int)(mn.getTick() / beatsPerSixteenth) * NOTE_HEIGHT;
-               height = (mn.getDuration() / beatsPerSixteenth) * NOTE_HEIGHT;
+               y = insets.top + (int)(mn.getTick() / ticksPerSixteenth) * NOTE_HEIGHT;
+               height = (mn.getDuration() / ticksPerSixteenth) * NOTE_HEIGHT;
                if (height == 0) height = NOTE_HEIGHT;
                r = new Rectangle(x, y, NOTE_WIDTH, height);
                while(isOccupied(r)) r.translate(NOTE_WIDTH, 0);