                 measure (int (/ piano-roll-width MEASURE_WIDTH))
                 current-x-cell (int (/ (.getX e) note-width))
                 cell-delta (- current-x-cell @cell-x-start)
-                diff(if (> cell-delta 0) cell-delta 0)]
-                    (println "mouse dragged" x-cell y-cell start-x start-y cell-x-start cell-y-start cell-delta diff)
-
-                    (update-note x-cell y-cell active-notes-atom active-note diff)
-
-                    (.repaint (.getSource e))))
+                diff(+ 1 cell-delta)]
+
+                (update-note x-cell y-cell active-notes-atom active-note diff)
+                (.repaint (.getSource e))))
 
       :mouse-released
         (fn [e]  
 
-          (swap! creating-note (fn [b] false))
-          (.repaint (.getSource e))))
+          ; (swap! creating-note (fn [b] false))
+          ; (.repaint (.getSource e)))
+          ))
     panel))
 
 (defn create-piano-roll 


(def NUM_BEATS 4)
(def NUM_BARS 4)


(defn note-matrix [notes n-octaves n-measures n-bars n-beats n-steps-per-beat]

  (let [x (int (/ x note-width))
        y (int (/ y note-height))
        length (count @active-notes-atom)
        return-note (atom (get-note @active-notes-atom x y note-width))
        new-note-data {:velocity 1.0 :duration 1}]

      (if (not (nil? @return-note))
        (do
            (doseq [[k note] @return-note] 
              (doseq [[n note-data] note] 
                (swap! x-cell (fn [_] k))
                (swap! y-cell (fn [_] n)))))
        (do 
