]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - config.yml
Use @mainthread decorator where necessary
[perso/Immae/Projets/Python/MusicSampler.git] / config.yml
index 22a0ae2ad7f7883beb939fecee52a408f6990d4d..2e89a0f67ec8bd687bff5c5eaf4bbf7f97d2959f 100644 (file)
@@ -12,7 +12,7 @@ config:
   music_path: .
 # The awful red message that shows up when you lose the focus
   focus_warning: true
-# built-in mixing
+# built-in mixing, try this if your system can't mix the musics by itself
   builtin_mixing: false
 # Device used for playing musics. Default value depends on your system
 #  device: 
@@ -73,6 +73,10 @@ music_properties:
 ##### Key properties: how do the key look like, and some other properties #####
 
 key_properties:
+  'common':
+    repeat_delay: 1
+    include: blue
+
   'a':
     description:
       -  
@@ -88,6 +92,42 @@ key_properties:
       - 
       - Noise
     include: light_blue
+  'q':
+    description:
+      -  
+      - Load
+      - Music 1
+    include: light_blue
+  's':
+    description:
+      -  
+      - Load
+      - Music 2
+    include: light_blue
+  'd':
+    description:
+      - 
+      - Load
+      - Noise
+    include: light_blue
+  'w':
+    description:
+      -  
+      - Unload
+      - Music 1
+    include: light_blue
+  'x':
+    description:
+      -  
+      - Unload
+      - Music 2
+    include: light_blue
+  'c':
+    description:
+      - 
+      - Unload
+      - Noise
+    include: light_blue
   't':
     description:
       - 
@@ -101,12 +141,6 @@ key_properties:
       - Stop wait
       - music 2
     include: green
-  'u':
-    description:
-      - 
-      - Noise
-      - + Music 2
-    include: green
 
   'g':
     description:
@@ -143,6 +177,11 @@ key_properties:
       - Low vol
       - Up vol
     include: green
+  'ù':
+    description:
+      - 
+      - stop
+      - wait
 
   'home':
     description:
@@ -158,18 +197,21 @@ key_properties:
       - "!"
       - STOP!
     include: red
+    repeat_delay: 0
 
   'F5':
     description:
       - "||"
       - PAUSE
     include: light_green
+    repeat_delay: 0
 
   'F6':
     description:
       - ">"
       - UNPAUSE
     include: light_green
+    repeat_delay: 0
 
   'F1':
     description:
@@ -177,6 +219,7 @@ key_properties:
       - Stop
       - fade
     include: orange
+    repeat_delay: 0
 
   'F2':
     description:
@@ -184,6 +227,7 @@ key_properties:
       - Stop
       - actions
     include: orange
+    repeat_delay: 0
 
   'F4':
     description:
@@ -191,30 +235,51 @@ key_properties:
       - Skip
       - wait
     include: pink
+    repeat_delay: 0
+
+  'F8':
+    description:
+      - 
+      - Pause
+      - wait
+  'F9':
+    description:
+      - 
+      - Unpause
+      - wait
+  'F10':
+    description:
+      - 
+      - Reset
+      - wait
 
   'F12':
     description:
       - 
       - vol+
     include: yellow
+    repeat_delay: 0
 
   'F11':
     description:
       - 
       - "vol-"
     include: yellow
+    repeat_delay: 0
 
   'right':
     description:
       - 
       - +10s
     include: blue
+    repeat_delay: 0
 
   'left':
     description:
       - 
       - -10s
     include: blue
+    repeat_delay: 0
 
 #################################################################
 ##### Keys: what do the key actually do when you press them #####
@@ -231,6 +296,28 @@ keys:
     - play:
         include: noise
 
+# Load the songs
+  'q':
+    - load_music:
+        include: music1
+  's': 
+    - load_music:
+        include: music2
+  'd':
+    - load_music:
+        include: noise
+
+# Unload the songs
+  'w':
+    - unload_music:
+        include: music1
+  'x': 
+    - unload_music:
+        include: music2
+  'c':
+    - unload_music:
+        include: noise
+
 # Crossfade from any music to music 2
   't':
     - stop:
@@ -241,29 +328,10 @@ keys:
 
 # Fade out, then wait and start music 2
   'y':
-    - stop: 
-        fade_out: 3
-        wait: true
-        set_wait_id: y1
     - wait:
-        duration: 3
-        set_wait_id: y2
-    - play: 
         include: music2
 
 # Play the noise, stop music 1, wait a bit then start music 2
-  'u':
-    - play:
-        include: noise
-    - wait:
-        duration: 0.2
-    - stop:
-        include: music1
-    - wait:
-        duration: 3
-        set_wait_id: u
-    - play: 
-        include: music2
 
 # Play music 1, starting at 30 seconds then seeks at 60 after 5 seconds
   'g':
@@ -272,7 +340,6 @@ keys:
         start_at: 30
     - wait: 
         duration: 5
-        set_wait_id: g
     - seek:
         include: music1
         delta: false
@@ -291,6 +358,11 @@ keys:
     - play:
         include: music2
 
+# skip waiting for the end of music1
+  'ù':
+    - interrupt_wait:
+        wait_id: m
+
 # Lowers the volume of music 1 and 2 (if playing), during the duration of noise + 1 second
   'i':
     - volume:
@@ -304,7 +376,6 @@ keys:
     - wait:
         include: noise
         duration: 1
-        set_wait_id: i
     - volume:
         include: music1
         value: 100
@@ -326,7 +397,6 @@ keys:
         fade: 5
     - wait:
         duration: 5
-        set_wait_id: n
     - volume:
         include: music1
         value: 100
@@ -379,20 +449,15 @@ keys:
 # Skip wait
   'F4':
     - interrupt_wait:
-        wait_id: n
-    - interrupt_wait:
-        wait_id: m
-    - interrupt_wait:
-        wait_id: i
-    - interrupt_wait:
-        wait_id: y1
-    - interrupt_wait:
-        wait_id: y2
-    - interrupt_wait:
-        wait_id: u
-    - interrupt_wait:
-        wait_id: g
 
+  'F8':
+    - pause_wait:
+
+  'F9':
+    - unpause_wait:
+
+  'F10':
+    - reset_wait:
 
 # Changing volume
   'F12':