Exemplo n.º 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))
 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])
Exemplo n.º 3
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))
Exemplo n.º 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])
Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 7
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])
Exemplo n.º 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])