コード例 #1
0
 def __key_pressed_cb(self, widget, octave_clicked, key_clicked, letter):
     logging.debug('Pressed Octave: %d Key: %d Letter: %s' %
                   (octave_clicked, key_clicked, letter))
     if letter in LETTERS_TO_KEY_CODES.keys():
         self.keyboardStandAlone.do_key_press(
             LETTERS_TO_KEY_CODES[letter], None,
             math.sqrt(self.instVolume * 0.01))
コード例 #2
0
 def __key_released_cb(self, widget, octave_clicked, key_clicked, letter):
     if self.recording:
             self.recorded_keys.append(
                 (time.time(), octave_clicked, key_clicked, letter, 1))
     if letter in LETTERS_TO_KEY_CODES.keys():
         self.keyboardStandAlone.do_key_release(
             LETTERS_TO_KEY_CODES[letter])
コード例 #3
0
ファイル: activity.py プロジェクト: shridharmishra4/mainline
 def __key_pressed_cb(self, widget, octave_clicked, key_clicked, letter):
     logging.debug(
         'Pressed Octave: %d Key: %d Letter: %s' %
         (octave_clicked, key_clicked, letter))
     if letter in LETTERS_TO_KEY_CODES.keys():
         self.keyboardStandAlone.do_key_press(
             LETTERS_TO_KEY_CODES[letter], None,
             math.sqrt(self.instVolume * 0.01))
コード例 #4
0
 def __key_released_cb(self, widget, octave_clicked, key_clicked, letter,
                       physicallKey):
     if self.recording:
         self.recorded_keys.append(
             [time.time(), octave_clicked, key_clicked, letter, 1])
     if not physicallKey:
         if letter in LETTERS_TO_KEY_CODES.keys():
             self.keyboardStandAlone.do_key_release(
                 LETTERS_TO_KEY_CODES[letter])
コード例 #5
0
 def __key_pressed_cb(self, widget, octave_clicked, key_clicked, letter,
                      physicallKey):
     logging.debug('Pressed Octave: %d Key: %d Letter: %s' %
                   (octave_clicked, key_clicked, letter))
     if letter in LETTERS_TO_KEY_CODES.keys():
         if self.recording:
             self.recorded_keys.append(
                 [time.time(), octave_clicked, key_clicked, letter])
         if not physicallKey:
             self.keyboardStandAlone.do_key_press(
                 LETTERS_TO_KEY_CODES[letter], None,
                 math.sqrt(self.instVolume * 0.01))
コード例 #6
0
 def __key_pressed_cb(self, widget, octave_clicked, key_clicked, letter,
                      physicallKey):
     logging.debug(
         'Pressed Octave: %d Key: %d Letter: %s' %
         (octave_clicked, key_clicked, letter))
     if letter in LETTERS_TO_KEY_CODES.keys():
         if self.recording:
             self.recorded_keys.append(
                 [time.time(), octave_clicked, key_clicked, letter])
         if not physicallKey:
             self.keyboardStandAlone.do_key_press(
                 LETTERS_TO_KEY_CODES[letter], None,
                 math.sqrt(self.instVolume * 0.01))
コード例 #7
0
ファイル: activity.py プロジェクト: shridharmishra4/mainline
 def __key_released_cb(self, widget, octave_clicked, key_clicked, letter):
     if letter in LETTERS_TO_KEY_CODES.keys():
         self.keyboardStandAlone.do_key_release(
             LETTERS_TO_KEY_CODES[letter])
コード例 #8
0
 def __key_released_cb(self, widget, octave_clicked, key_clicked, letter):
     if letter in LETTERS_TO_KEY_CODES.keys():
         self.keyboardStandAlone.do_key_release(
             LETTERS_TO_KEY_CODES[letter])