@@ -69,8 +69,7 @@ def HWPlayTone(freq: int, duration: int):
6969 "1:I" ,
7070 "2:once" ,
7171 "2:was" ,
72- "1:lost" , ],
73- [
72+ "1:lost" ,
7473 "1:but" ,
7574 "2:now" ,
7675 "2:am" ,
@@ -150,7 +149,6 @@ def PlayTone(freq: int, duration: int, playToSpeaker: bool):
150149
151150
152151def FeedbackHandler (layer , type , x , y ):
153- #print("FeedbackHandler", melodyApp)
154152 melodyApp .feedbackHandler (layer , type , x , y )
155153
156154
@@ -286,8 +284,6 @@ def run(self):
286284 def setupKey (self , octaveOffset : int , noteIdx : int ) -> LayerGraphical :
287285 width = KEY_WIDTH - 2 * KEY_BORDER
288286 xOffset = noteIdx * KEY_WIDTH / 2
289- #height
290- #bgColor
291287 isSemi = False
292288 if noteIdx == 1 or noteIdx == 3 or noteIdx == 6 or noteIdx == 8 or noteIdx == 10 :
293289 height = KEY_HEIGHT / 2 + 10
@@ -317,6 +313,7 @@ def setupKey(self, octaveOffset: int, noteIdx: int) -> LayerGraphical:
317313 h = height + 2 * KEY_BORDER
318314 keyLayer .pinLayer (l , t , w , h )
319315 return keyLayer
316+
320317
321318 def setupButton (self , label : str ) -> LayerLcd :
322319 buttonLayer = LayerLcd (dd , 4 , 1 )
@@ -326,14 +323,12 @@ def setupButton(self, label: str) -> LayerLcd:
326323 buttonLayer .enableFeedback ("f" , FeedbackHandler )
327324 return buttonLayer
328325
326+
329327 def feedbackHandler (self , layer , type , x , y ):
330- #print("clicked")
331328 if layer == self .playLayer :
332329 self .play = not self .play
333330 if self .play :
334331 self .playLayer .backgroundColor ("lightgreen" )
335- #self.lyricColIdx = 0
336- #self.lyricRowIdx = 0
337332 else :
338333 self .playLayer .noBackgroundColor ()
339334 elif layer == self .targetLayer :
@@ -344,8 +339,6 @@ def feedbackHandler(self, layer, type, x, y):
344339 self .targetLayer .noBackgroundColor ()
345340 elif layer == self .restartLayer :
346341 self .restart = True
347- #self.lyricColIdx = 0
348- #self.lyricRowIdx = 0
349342 else :
350343 octaveOffset = layer .octaveOffset
351344 noteIdx = layer .noteIdx
0 commit comments