]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - config.yml
Fix crash when click on unconfigured key
[perso/Immae/Projets/Python/MusicSampler.git] / config.yml
index d5e6664d80811ecb8b689c59c0a952e4aea50375..37e085a87573c78a254df1c7a87213f97234ed33 100644 (file)
+#################################
+##### General configuration #####
+## Keep in mind that in-line option override these
+
+#option listed here are the default options.
+config:
+# debug info
+  debug: false
+# languages. Available: fr, en
+  language: fr
+# path to the musics.
+  music_path: .
+# The awful red message that shows up when you lose the focus
+  focus_warning: true
+# 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: 
+# Advanced parameters: use at your own risk! (your computer probably won't explode, though)
+  latency: high
+  blocksize: 0
+  frame_rate: 44100
+  sample_width: 2
+  channels: 2
+
+
+
+
+###################
+##### Aliases #####
+
 aliases:
-  intro_jonglacro:
-    file: "PIRATE_01-1-intro_jonglacro.mp3"
-    name: Intro Jonglacro
-  jonglacro_suite:
-    file: "PIRATE_01-2-jonglacro_suite.mp3"
-    name: Jonglacro suite
-  lancer_prisonniere:
-    file: "PIRATE_02-lancers_de_prisonniere.mp3"
-    name: Lancer prisonnière
-  quete:
-    file: "PIRATE_03-quete.mp3"
-    name: Quête
-  entree_ondine:
-    file: "PIRATE_04-entree_ondine.mp3"
-    name: Entrée Ondine
-  cour_ondine:
-    file: "PIRATE_05-cour_a_londine.mp3"
-    name: Cour à l'Ondine
-  fouille_jonglage:
-    file: "PIRATE_07-fouille_jonglage.mp3"
-    name: Fouille jonglage
-  liberation_prisonniere:
-    file: "PIRATE_08-liberation_prisonniere.mp3"
-    name: Libération prisonnière
-  duo_pirate_ondine:
-    file: "PIRATE_09-duo_pirate_ondine.mp3"
-    name: Duo pirate Ondine
-  trio_jalousie:
-    file: "PIRATE_10-trios_jalousie.mp3"
-    name: Trio Jalousie
-  piquage_2_4:
-    file: "PIRATE_11-piquage_2_4.mp3"
-    name: Piquage 2-4
-  baston:
-    file: "PIRATE_12-1-baston.mp3"
-    name: Baston
-  baston_ascension:
-    file: "PIRATE_12-3-baston_ascension.mp3"
-    name: Baston ascension
-  bruit:
-    file: "PIRATE_bruit.wav"
-    name: Bruit
-  paf:
-    file: "PIRATE_paf.mp3"
-    name: Paf
-  coup:
-    file: "PIRATE_coup.wav"
-    name: Coup
-  ralenti:
-    file: "PIRATE_12-2-ralenti.mp3"
-    name: Ralenti
+# for files
+  music1:
+    file: "short_blues.mp3"
+  music2:
+    file: "to_the_Fantasy_war.mp3"
+  noise:
+    file: "croco.mp3"
+# aliases for colors
+  blue:
+    color: [50, 50, 255]
+  orange:
+    color: [255, 126, 0]
+  yellow: 
+    color: [250, 250, 0]
+  red:
+    color: [255, 20, 20]
+  light_blue:
+    color: [100, 150, 255]
+  green:
+    color: [50, 180, 50]
+  light_green:
+    color: [150, 255, 100]
+  purple:
+    color: [190, 110, 236]
+  pink:
+    color: [255, 50, 255]
+
+####################################################
+##### Music properties: name and general gain ######
+
+music_properties:
+  "short_blues.mp3":
+    name: Short Blues (music 1)
+  "to_the_Fantasy_war.mp3":
+    name: To the Fantasy War (music 2)
+  "croco.mp3":
+    name: Crocodile noise
+    gain: 1.2
+
+###############################################################################
+##### Key properties: how do the key look like, and some other properties #####
 
 key_properties:
+  'common':
+    repeat_delay: 1
   'a':
     description:
-      -  # Chloé
-      - Jonglacro
-    color: [73, 221, 226]
+      -  
+      - Music 1
+    include: light_blue
   'z':
     description:
-      -  #Chloé
-      - Jonglacro
-      - 2
-    color: [73, 221, 226]
+      -  
+      - Music 2
+    include: light_blue
   'e':
     description:
-      -   #Chloé
-      - Fin
-      - jonglacro
-    color: [73, 221, 226]
-  'r':
-    description:
-      -   #Chloé
-      - Lancer 
-      - prisonnière
-    color: [73, 221, 226]
+      - 
+      - Noise
+    include: light_blue
   't':
     description:
-      -  #Chloé
-      - Fin
-      - lancer
-    color: [73, 221, 226]
+      - 
+      - Crossfade
+      - music 2
+    include: green
+    repeat_delay: 5
   'y':
     description:
-      -  #Chloé
-      - Quête
-    color: [73, 221, 226]
+      - 
+      - Stop wait
+      - music 2
+    include: green
   'u':
     description:
-      -  #Chloé
-      - Monstre
-    color: [73, 221, 226]
-  'i':
-    description:
-      -  #Chloé
-      - Fin quête
-      - Grotte
-    color: [73, 221, 226]
-  'o':
-    description:
-      -   #Denise
-      - Fin ondine
-      - Cour ondine
-    color: [190, 110, 236]
-  'p':
-    description:
-      -   #Denise
-      - Fin 
-      - Cour ondine
-    color: [190, 110, 236]
-  'q':
-    description:
-      -  #Chloé
-      - Fouille 
-      - Jonglage
-    color: [73, 221, 226]
-  's':
+      - 
+      - Noise
+      - + Music 2
+    include: green
+
+  'g':
     description:
-      -   #Denise
-      - Fin
-      - Jonglage
-    color: [190, 110, 236]
-  'd':
+      - 
+      - Music 1
+      - Seek 30/60
+    include: purple
+
+  'i':
     description:
-      -   #Denise
-      - Libération 
-      - Prisonnière
-    color: [190, 110, 236]
-  'f':
+      -
+      - Noise
+      - +low vol
+    include: green
+
+  'h':
     description:
-      -   #Denise
-      - Paf
-      - Baisser musique
-    color: [190, 110, 236]
-  'g':
+      -
+      - Noise
+      - 3 times
+    include: purple
+    repeat_delay: 2
+
+  'm':
     description:
-      -   #Denise
-      - Stop 
-      - libération
-    color: [190, 110, 236]
-  'h':
+      - 
+      - Musics
+      - 1 & 2
+    include: purple
+
+  'n':
     description:
-      -   #Denise
-      - Duo
-    color: [190, 110, 236]
-  'j':
+      -
+      - Low vol
+      - Up vol
+    include: green
+
+  'home':
     description:
-      -   #Jérôme
-      - Fin duo
-      - Trio
-    color: [240, 158, 0]
-  'k':
+      - 
+      - vlc
+    include: orange
+
+
+## Some general useful keys
+
+  'ESC':
     description:
-      -   #Jérôme
-      - Fin trio
-    color: [240, 158, 0]
-  'l':
+      - "!"
+      - STOP!
+    include: red
+
+  'F5':
     description:
-      -   #Jérôme
-      - Jeu à 
-      - 2 et 4
-    color: [240, 158, 0]
-  'm':
+      - "||"
+      - PAUSE
+    include: light_green
+
+  'F6':
     description:
-      -  #Chloé
-      - Fin jeu
-      - Baston
-    color: [73, 221, 226]
-  'w':
+      - ">"
+      - UNPAUSE
+    include: light_green
+
+  'F1':
     description:
-      -  #Christophe
-      - Fin baston
-      - Ralenti
-    color: [255, 255, 0]
-  'x':
+      -   
+      - Stop
+      - fade
+    include: orange
+
+  'F2':
     description:
-      -  #Christophe
-      - Fin ralenti
-    color: [255, 255, 0]
-  'c':
+      - 
+      - Stop
+      - actions
+    include: orange
+
+  'F4':
     description:
-      -  #Christophe
-      - Baston 2
-    color: [255, 255, 0]
-  'v':
+      -   
+      - Skip
+      - wait
+    include: pink
+
+  'F12':
     description:
-      -  #Auréliane
-      - Fin baston 2
-    color: [0, 190, 27]
-  'ESC':
+      - 
+      - vol+
+    include: yellow
+
+  'F11':
     description:
       - 
-      - STOP !
-    color: [255, 0, 0]
+      - "vol-"
+    include: yellow
 
-  'F1':
+  'right':
     description:
-      -  
-      - PAUSE
+      - 
+      - +10s
+    include: blue
 
-  'F2':
+  'left':
     description:
-      -  
-      - REPRENDRE
+      - 
+      - -10s
+    include: blue
 
+#################################################################
+##### Keys: what do the key actually do when you press them #####
 
 keys:
+# Play the songs
   'a':
     - play:
-        include: intro_jonglacro
+        include: music1
   'z': 
-    - stop:
-        include: intro_jonglacro
-        fade_out: 5
-    - wait:
-        duration: 7
     - play:
-        include: jonglacro_suite
+        include: music2
   'e':
-    - stop:
-        include: jonglacro_suite
-        fade_out: 5
-  'r':
     - play:
-        include: lancer_prisonniere
+        include: noise
+
+# Crossfade from any music to music 2
   't':
     - stop:
-        include: lancer_prisonniere
-        fade_out: 3
-  'y':
+        fade_out: 5
     - play:
-        include: quete
+        include: music2
+        fade_in: 5
+
+# 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':
-    - volume:
-        include: quete
-        value: 50
     - play:
-        include: bruit
+        include: noise
     - wait:
-        duration: 2
-    - volume:
-        include: quete
-        value: 100
-  'i':
-    - stop:
-        include: quete
-        fade_out: 5
-    - wait:
-        duration: 20
-    - play:
-        include: entree_ondine
-  'o':
+        duration: 0.2
     - stop:
-        include: entree_ondine
-        fade_out: 5
+        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':
+    - play: 
+        include: music1
+        start_at: 30
+    - wait: 
         duration: 5
-    - play:
-        include: cour_ondine
-  'p':
-    - stop:
-        include: cour_ondine
-        fade_out: 5
-  'q':
-    - play:
-        include: fouille_jonglage
-  's':
+        set_wait_id: g
+    - seek:
+        include: music1
+        delta: false
+        value: 60
+
+# Play music 1 and 2, after stopping all musics with a fade_out (and wait for this fade out)
+  'm':
     - stop:
-        include: fouille_jonglage
         fade_out: 2
-  'd':
-    - play:
-        include: liberation_prisonniere
-  'f':
-    - volume:
-        include: liberation_prisonniere
-        value: 20
-    - play:
-        include: paf
-  'g':
-    - stop:
-        include: liberation_prisonniere
-        fade_out: 3
-  'h':
+        wait: true
     - play:
-        include: duo_pirate_ondine
-  'j':
-    - stop:
-        include: duo_pirate_ondine
-        fade_out: 2
+        include: music1
     - wait:
-        duration: 2
+        include: music1
+        set_wait_id: m
     - play:
-        include: trio_jalousie
-  'k':
-    - play:
-        include: coup
-    - wait:
-        duration: 0.2
-    - stop:
-        include: trio_jalousie
+        include: music2
 
-  'l':
+# Lowers the volume of music 1 and 2 (if playing), during the duration of noise + 1 second
+  'i':
+    - volume:
+        include: music1
+        value: 50
+    - volume:
+        include: music2
+        value: 50
     - play:
-        include: piquage_2_4
-  'm':
-    - stop:
-        include: piquage_2_4
-        fade_out: 5
-    - wait:
-        duration: 7
-    - play:
-        include: baston
-  'w':
-    - stop:
-        include: baston
-        fade_out: 1
+        include: noise
     - wait:
+        include: noise
         duration: 1
-    - play:
-        include: ralenti
-  'x':
+        set_wait_id: i
+    - volume:
+        include: music1
+        value: 100
+        fade: 1
+    - volume:
+        include: music2
+        value: 100
+        fade: 1
+
+# Lowers the volume of music 1 and 2 (if playing) down to 10% with a 5 seconds fade, then back to 100% 
+  'n' :
+    - volume:
+        include: music1
+        value: 10
+        fade: 5
+    - volume:
+        include: music2
+        value: 10
+        fade: 5
+    - wait:
+        duration: 5
+        set_wait_id: n
+    - volume:
+        include: music1
+        value: 100
+        fade: 5
+    - volume:
+        include: music2
+        value: 100
+        fade: 5
+
+# Stops all musics, then plays noise repeated twice (3 times)
+  'h':
     - stop:
-        include: ralenti
-        fade_out: 2
-  'c':
+        fade_out: 0.5
     - play:
-        include: baston_ascension
-  'v':
-    - stop:
-        include: baston_ascension
-        fade_out: 2
+        include: noise
+        loop: 2
+
+  'home':
+    - run_command:
+        command: vlc *.mp3
+        wait: true
+
+
+##### Useful keys (good to have them all the time)
+
+# Emergency stop!
   'ESC':
-    - stop: ~
-    - stop_all_actions: ~
+    - stop_all_actions:
+        other_only: true
+    - stop:
+
 
-  'F1': 
-    - pause: ~
 
+# Pause and unpause
+  'F5': 
+    - pause:
+
+  'F6':
+    - unpause:
+
+# Stopping all musics, with a short fade (sounds natural)
+  'F1':
+    - stop:
+        fade_out: 1
+
+# Stopping all actions
   'F2':
-    - unpause: ~
+    - stop_all_actions:
+
+# 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
+
+
+# Changing volume
+  'F12':
+    - volume:
+        delta: true
+        value: +10
+        fade: 0.5
+
+  'F11':
+    - volume:
+        delta: true
+        value: -10
+        fade: 0.5
+  
+
+# Seek +- 10 seconds
+  'right':
+    - seek:
+        value: 10
+        delta: true
+
+  'left':
+    - seek:
+        value: -10
+        delta: true
+