X-Git-Url: https://ruin.nu/git/%3CTMPL_VAR%20NAME=PAGE%3E?a=blobdiff_plain;f=MooTrackView.java;h=cb22b42def09d6aa15a1223891a317fc5df0e729;hb=f13c7fbb2a8cc841367e0a4563596592b89cd33b;hp=96bfd006fc521ff7a5718a7e0bbdb6a8cfe95567;hpb=f520dce96c76f627677c5d9957e8371d02a31ec0;p=moosique.git diff --git a/MooTrackView.java b/MooTrackView.java index 96bfd00..cb22b42 100644 --- a/MooTrackView.java +++ b/MooTrackView.java @@ -133,7 +133,9 @@ public class MooTrackView extends JPanel { // Calculates coordinates. x = insets.left; if (quantizeRecording) { - + // Snap to nearest sixteenth + y = insets.top + Math.round(mn.getTick() / ticksPerSixteenth) * NOTE_HEIGHT; + height = (mn.getDuration() / ticksPerSixteenth) * NOTE_HEIGHT; } else { y = insets.top + (int)((mn.getTick() * NOTE_HEIGHT) / ticksPerSixteenth); height = (mn.getDuration() * NOTE_HEIGHT) / ticksPerSixteenth;