diff options
-rw-r--r-- | GUI/Core/KeyMapping.py | 62 | ||||
-rwxr-xr-x | GUI/StandalonePlayer.py | 2 | ||||
-rw-r--r-- | Player/KeyboardStandAlone.py | 8 |
3 files changed, 32 insertions, 40 deletions
diff --git a/GUI/Core/KeyMapping.py b/GUI/Core/KeyMapping.py index 29da0a8..6af06a2 100644 --- a/GUI/Core/KeyMapping.py +++ b/GUI/Core/KeyMapping.py @@ -1,43 +1,35 @@ # Key = Hardware Keycode Value = Note -KEY_MAP_PIANO = {24:24, #Q - 25:26, #W - 26:28, #E - 27:29, #R - 28:31, #T - 29:33, #Y - 30:35, #U - 31:36, #I - 32:38, #O - 33:40, #P - 34:41, #{ - 35:43, #} +KEY_MAP_PIANO = {24:36, #Q + 25:38, #W + 26:40, #E + 27:41, #R + 28:43, #T + 29:45, #Y + 30:47, #U + 31:48, #I - 11:25, #2 - 12:27, #3 - 14:30, #5 - 15:32, #6 - 16:34, #7 - 18:37, #9 - 19:39, #0 - 20:42, #- + 11:37, #2 + 12:39, #3 + 14:42, #5 + 15:44, #6 + 16:46, #7 - 39:49, #S - 40:51, #D - 42:54, #G - 43:56, #H - 44:58, #J - 46:61, #L + 39:25, #S + 40:27, #D + 42:30, #G + 43:32, #H + 44:34, #J + 46:37, #L - 52:48, #Z - 53:50, #X - 54:52, #C - 55:53, #V - 56:55, #B - 57:57, #N - 58:59, #M - 59:60, #, - 60:62} #e + 52:24, #Z + 53:26, #X + 54:28, #C + 55:29, #V + 56:31, #B + 57:33, #N + 58:35, #M + 59:36} #, KEY_MAP = {24:24, #Q 25:25, #W diff --git a/GUI/StandalonePlayer.py b/GUI/StandalonePlayer.py index fb65884..a672294 100755 --- a/GUI/StandalonePlayer.py +++ b/GUI/StandalonePlayer.py @@ -251,7 +251,7 @@ class StandAlonePlayer( gtk.EventBox ): synthBtn = ImageRadioButton(self.firstInstButton, GUIConstants.IMAGE_ROOT + n + '.png', GUIConstants.IMAGE_ROOT + n + 'sel.png', GUIConstants.IMAGE_ROOT + n + 'sel.png') synthRecBtn = ImageButton(GUIConstants.IMAGE_ROOT + 'record.png' , GUIConstants.IMAGE_ROOT + 'recordhi.png', GUIConstants.IMAGE_ROOT + 'recordsel.png') - self.tooltips.set_tip(synthRecBtn,Tooltips.LABMIC) + self.tooltips.set_tip(synthRecBtn,Tooltips.RECLAB) synthBtn.connect('clicked', self.handleInstrumentButtonClick, n) synthRecBtn.connect('clicked', self.handleSynthButtonClick, n) diff --git a/Player/KeyboardStandAlone.py b/Player/KeyboardStandAlone.py index 2e73900..1007cb1 100644 --- a/Player/KeyboardStandAlone.py +++ b/Player/KeyboardStandAlone.py @@ -5,7 +5,7 @@ import gtk from Player.NoteStdAlone import NoteStdAlone from Framework.CSound.CSoundConstants import CSoundConstants from Framework.Generation.GenerationConstants import GenerationConstants -from GUI.Core.KeyMapping import KEY_MAP +from GUI.Core.KeyMapping import KEY_MAP_PIANO class KeyboardStandAlone: @@ -29,9 +29,9 @@ class KeyboardStandAlone: # Assign on which track the note will be created according to the number of keys pressed track = len(self.key_dict)+10 # If the pressed key is in the keymap - if KEY_MAP.has_key(key): + if KEY_MAP_PIANO.has_key(key): # CsoundNote parameters - pitch = KEY_MAP[key] + pitch = KEY_MAP_PIANO[key] duration = -1 instrument = self.instrument @@ -72,7 +72,7 @@ class KeyboardStandAlone: def onKeyRelease(self,widget,event): key = event.hardware_keycode - if KEY_MAP.has_key(key): + if KEY_MAP_PIANO.has_key(key): if CSoundConstants.INSTRUMENTS[ self.key_dict[key].instrument].csoundInstrumentID == CSoundConstants.INST_TIED: self.key_dict[key].duration = 1 self.key_dict[key].decay = 0.88 |