Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Edit/NoteInterface.py
diff options
context:
space:
mode:
authoramartin <olpc@localhost.localdomain>2007-02-20 22:43:12 (GMT)
committer amartin <olpc@localhost.localdomain>2007-02-20 22:43:12 (GMT)
commit1fcc777030bb0ca9d3768edf21bd0de704032c62 (patch)
tree3631fee8bdf561a4c2f4148e26464fc0cd07c3a9 /Edit/NoteInterface.py
parent14996eec6c02ec388f35114a910d7bdad9b3b899 (diff)
sample notes
Diffstat (limited to 'Edit/NoteInterface.py')
-rw-r--r--Edit/NoteInterface.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Edit/NoteInterface.py b/Edit/NoteInterface.py
index 6b0a8c9..3a90c9f 100644
--- a/Edit/NoteInterface.py
+++ b/Edit/NoteInterface.py
@@ -168,6 +168,8 @@ class NoteInterface:
#self.noteParameters = NoteParametersWindow( self.note, self.getNoteParameters )
return 1 # handled
+ playSample = False
+
if event.type == gtk.gdk._2BUTTON_PRESS: # select bar
self.potentialDeselect = False
start = 0
@@ -185,12 +187,14 @@ class NoteInterface:
self.potentialDeselect = True
else:
emitter.selectNotes( { self.note.track: [ self ] } )
- self.playSampleNote( )
+ playSample = True
percent = eX/self.width
if percent < 0.3: emitter.setCurrentAction( "note-drag-onset", self )
elif percent > 0.7: emitter.setCurrentAction( "note-drag-duration", self )
- else: emitter.setCurrentAction( "note-drag-pitch", self )
+ else:
+ emitter.setCurrentAction( "note-drag-pitch", self )
+ if playSample: self.playSampleNote()
return 1
@@ -200,8 +204,6 @@ class NoteInterface:
self.potentialDeselect = False
emitter.deselectNotes( { self.note.track: [ self ] } )
- self.playSampleNote()
-
emitter.doneCurrentAction()
return True
@@ -217,7 +219,6 @@ class NoteInterface:
if dp != self.lastDragP:
self.lastDragP = dp
stream += [ self.note.id, self.basePitch + dp ]
- self.playSampleNote(False)
def noteDragDuration( self, dd, stream ):
self.potentialDeselect = False
@@ -234,8 +235,6 @@ class NoteInterface:
self.lastDragP = 0
self.lastDragD = 0
- self.playSampleNote()
-
def noteDecOnset( self, step, leftBound, stream ):
if self.selected:
if leftBound < self.note.cs.onset: