From 11cc4eaca9bd45f411a7acd8e503af1044e84b3a Mon Sep 17 00:00:00 2001 From: henri Date: Sat, 2 Apr 2016 08:21:04 +0200 Subject: [PATCH] fix clip recording colours --- ClipSlotMK2.py | 40 ++++++++++++++------- web/mk2_colours.html | 83 -------------------------------------------- 2 files changed, 27 insertions(+), 96 deletions(-) delete mode 100755 web/mk2_colours.html diff --git a/ClipSlotMK2.py b/ClipSlotMK2.py index a5a2772..011fc66 100644 --- a/ClipSlotMK2.py +++ b/ClipSlotMK2.py @@ -29,23 +29,37 @@ def _feedback_value(self): ret["channel"] = 0 track = self._clip_slot.canonical_parent slot_or_clip = self._clip_slot.clip if self.has_clip() else self._clip_slot + + if getattr(slot_or_clip, 'controls_other_clips', True) and self._stopped_value != None: + ret["value"] = self._stopped_value + if self._track_is_armed(track) and self._clip_slot.has_stop_button and self._record_button_value != None: + ret["value"] = self._record_button_value + if slot_or_clip.color != None: ret["value"] = self._color_value(slot_or_clip.color) if slot_or_clip.is_triggered: #ret["channel"] = 1 # blink me - ret["value"]= self._triggered_to_play_value + if slot_or_clip.will_record_on_start: + ret["value"] = self._triggered_to_record_value + else: + ret["value"]= self._triggered_to_play_value + #ret["channel"] = 1 # blink me elif slot_or_clip.is_playing: - ret["channel"] = 2 # pulse me - #ret["value"] = self._started_value - elif slot_or_clip.is_triggered and slot_or_clip.will_record_on_start: - ret["value"] = self._triggered_to_record_value - elif slot_or_clip.is_playing and slot_or_clip.is_recording: - ret["value"] = self._recording_value - - + if slot_or_clip.is_recording: + ret["value"] = self._recording_value + else: + ret["value"] = self._started_value + #ret["channel"] = 2 # pulse me + else: + if slot_or_clip.is_triggered: + if slot_or_clip.will_record_on_start: + ret["value"] = self._triggered_to_record_value + else: + ret["value"]= self._triggered_to_play_value + elif slot_or_clip.is_playing: + if slot_or_clip.is_recording: + ret["value"] = self._recording_value + else: + ret["value"] = self._started_value - if getattr(slot_or_clip, 'controls_other_clips', True) and self._stopped_value != None: - ret["value"] = self._stopped_value - if self._track_is_armed(track) and self._clip_slot.has_stop_button and self._record_button_value != None: - ret["value"] = self._record_button_value return ret \ No newline at end of file diff --git a/web/mk2_colours.html b/web/mk2_colours.html deleted file mode 100755 index 8c7fa38..0000000 --- a/web/mk2_colours.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Launchpad95 : Ableton LIVE control surface remote scripts for Novation Launchpad - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Index Number Decimal HEX Example Index Number Decimal HEX Example Index Number Decimal HEX Example Index Number Decimal HEX Example
0 0 0000   32 5046199 4CFFB7   64 211200 33900   96 16744192 FF7F00  
1 1973790 1E1E1E   33 65433 FF99   65 22325 5735   97 12169216 B9B000  
2 8355711 7F7F7F   34 22837 5935   66 21631 547F   98 9502464 90FF00  
3 16777215 FFFFFF   35 6418 1912   67 255 FF   99 8609031 835D07  
4 16731212 FF4C4C   36 5030911 4CC3FF   68 17743 454F   100 3746560 392B00  
5 16711680 FF0000   37 43519 A9FF   69 2425036 2500CC   101 1330192 144C10  
6 5832704 590000   38 16722 4152   70 8355711 7F7F7F   102 872504 D5038  
7 1638400 190000   39 4121 1019   71 2105376 202020   103 1381674 15152A  
8 16760172 FFBD6C   40 5015807 4C88FF   72 16711680 FF0000   104 1450074 16205A  
9 16733184 FF5400   41 22015 55FF   73 12451629 BDFF2D   105 6896668 693C1C  
10 5840128 591D00   42 7513 1D59   74 11529478 AFED06   106 11010058 A8000A  
11 2562816 271B00   43 2073 819   75 6618889 64FF09   107 14569789 DE513D  
12 16777036 FFFF4C   44 5000447 4C4CFF   76 1084160 108B00   108 14182940 D86A1C  
13 16776960 FFFF00   45 255 FF   77 65415 FF87   109 16769318 FFE126  
14 5855488 595900   46 89 59   78 43519 A9FF   110 10412335 9EE12F  
15 1644800 191900   47 25 19   79 11007 2AFF   111 6796559 67B50F  
16 8978252 88FF4C   48 8867071 874CFF   80 4129023 3F00FF   112 1973808 1E1E30  
17 5570304 54FF00   49 5505279 5400FF   81 7995647 7A00FF   113 14483307 DCFF6B  
18 1923328 1D5900   50 1638500 190064   82 11672189 B21A7D   114 8454077 80FFBD  
19 1321728 142B00   51 983088 F0030   83 4202752 402100   115 10131967 9A99FF  
20 5046092 4CFF4C   52 16731391 FF4CFF   84 16730624 FF4A00   116 9332479 8E66FF  
21 65280 FF00   53 16711935 FF00FF   85 8970502 88E106   117 4210752 404040  
22 22784 5900   54 5832793 590059   86 7536405 72FF15   118 7697781 757575  
23 6400 1900   55 1638425 190019   87 65280 FF00   119 14745599 E0FFFF  
24 5046110 4CFF5E   56 16731271 FF4C87   88 3931942 3BFF26   120 10485760 A00000  
25 65305 FF19   57 16711764 FF0054   89 5898097 59FF71   121 3473408 350000  
26 22797 590D   58 5832733 59001D   90 3735500 38FFCC   122 1757184 1AD000  
27 6402 1902   59 2228243 220013   91 5999359 5B8AFF   123 475648 74200  
28 5046152 4CFF88   60 16717056 FF1500   92 3232198 3151C6   124 12169216 B9B000  
29 65365 FF55   61 10040576 993500   93 8880105 877FE9   125 4141312 3F3100  
30 22813 591D   62 7950592 795100   94 13835775 D31DFF   126 11755264 B35F00  
31 7954 1F12   63 4416512 436400   95 16711773 FF005D   127 4920578 4B1502  
-
- - \ No newline at end of file