aboutsummaryrefslogtreecommitdiff
path: root/music_sampler.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-26 23:10:17 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-06-26 23:10:17 +0200
commit65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325 (patch)
tree1e204169cb733fe7321bef66ccc414736baa1e5d /music_sampler.py
parente4846541aa226de8b231cc401fcaa6f058246d1c (diff)
downloadMusicSampler-65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325.tar.gz
MusicSampler-65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325.tar.zst
MusicSampler-65ec4d2a87bfe0dcf1250ec8dc61225d4ed66325.zip
Show last used keys
Diffstat (limited to 'music_sampler.py')
-rw-r--r--music_sampler.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/music_sampler.py b/music_sampler.py
index 81b96c4..5e61466 100644
--- a/music_sampler.py
+++ b/music_sampler.py
@@ -11,6 +11,23 @@ from helpers.key import Key
11from helpers.mapping import Mapping 11from helpers.mapping import Mapping
12import helpers 12import helpers
13 13
14class KeyList(RelativeLayout):
15 keylist = ListProperty([])
16 first_key = StringProperty("")
17 second_key = StringProperty("")
18 third_key = StringProperty("")
19
20 def append(self, value):
21 self.keylist = [value] + self.keylist
22
23 def on_keylist(self, instance, new_key_list):
24 if len(self.keylist) > 0:
25 self.first_key = self.keylist[0]
26 if len(self.keylist) > 1:
27 self.second_key = self.keylist[1]
28 if len(self.keylist) > 2:
29 self.third_key = self.keylist[2]
30
14class PlayList(RelativeLayout): 31class PlayList(RelativeLayout):
15 playlist = ListProperty([]) 32 playlist = ListProperty([])
16 33