aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--documentation_en.md2
-rw-r--r--documentation_fr.md2
-rw-r--r--music_sampler/actions/__init__.py1
-rw-r--r--music_sampler/actions/comment.py5
-rw-r--r--music_sampler/helpers.py2
-rw-r--r--music_sampler/mapping.py2
-rw-r--r--music_sampler/sysfont.py2
7 files changed, 13 insertions, 3 deletions
diff --git a/documentation_en.md b/documentation_en.md
index ee95ad3..c616eda 100644
--- a/documentation_en.md
+++ b/documentation_en.md
@@ -348,6 +348,8 @@ Pauses "music1.mp3" for 10 seconds and reruns it afterward, seeking to 5 seconds
348later. 348later.
349 349
350#### List of all the actions: 350#### List of all the actions:
351- `comment`: does nothing, but shows a comment in the action windows
352 * `message: "some text"` the message to show
351- `play` : start a music. Music Sampler only runs a music once (if you want to 353- `play` : start a music. Music Sampler only runs a music once (if you want to
352 have it playing several time concurrently, duplicate it or make symbolic 354 have it playing several time concurrently, duplicate it or make symbolic
353 link). Parameters: 355 link). Parameters:
diff --git a/documentation_fr.md b/documentation_fr.md
index 76a4b97..7434a5c 100644
--- a/documentation_fr.md
+++ b/documentation_fr.md
@@ -371,6 +371,8 @@ Met en pause la musique "music1.mp3" pour 10 secondes et la relance après, en
371avançant de 5 secondes dans la musique. 371avançant de 5 secondes dans la musique.
372 372
373#### Liste des actions possibles: 373#### Liste des actions possibles:
374- `comment`: ne fait aucune action, mais affiche un message dans la zone des actions
375 * `message: "some text"` le message à afficher
374- `play` : joue une musique. music_sampler ne joue qu'une musique à la fois : si 376- `play` : joue une musique. music_sampler ne joue qu'une musique à la fois : si
375 la musique demandée est déjà en train d'être jouée, elle n'est pas relancée ou 377 la musique demandée est déjà en train d'être jouée, elle n'est pas relancée ou
376 jouée "par dessus". Paramètres : 378 jouée "par dessus". Paramètres :
diff --git a/music_sampler/actions/__init__.py b/music_sampler/actions/__init__.py
index e0671fe..2f4cc54 100644
--- a/music_sampler/actions/__init__.py
+++ b/music_sampler/actions/__init__.py
@@ -1,3 +1,4 @@
1from . import comment
1from . import interrupt_wait 2from . import interrupt_wait
2from . import load_music 3from . import load_music
3from . import pause 4from . import pause
diff --git a/music_sampler/actions/comment.py b/music_sampler/actions/comment.py
new file mode 100644
index 0000000..c7baa82
--- /dev/null
+++ b/music_sampler/actions/comment.py
@@ -0,0 +1,5 @@
1def run(action, music=None, **kwargs):
2 pass
3
4def description(action, message, **kwargs):
5 return message
diff --git a/music_sampler/helpers.py b/music_sampler/helpers.py
index fbd338b..9eb1a95 100644
--- a/music_sampler/helpers.py
+++ b/music_sampler/helpers.py
@@ -232,7 +232,7 @@ def dump_config():
232 item, max_size, getattr(Config, item))) 232 item, max_size, getattr(Config, item)))
233 233
234def build_config(args): 234def build_config(args):
235 stream = open(Config.yml_file, "r") 235 stream = open(Config.yml_file, "r", encoding='utf8')
236 try: 236 try:
237 config = yaml.safe_load(stream) 237 config = yaml.safe_load(stream)
238 except Exception as e: 238 except Exception as e:
diff --git a/music_sampler/mapping.py b/music_sampler/mapping.py
index 193f5e5..fc9768b 100644
--- a/music_sampler/mapping.py
+++ b/music_sampler/mapping.py
@@ -391,7 +391,7 @@ class Mapping(RelativeLayout):
391 "a float, ignored".format(filename)) 391 "a float, ignored".format(filename))
392 return music_property 392 return music_property
393 393
394 stream = open(Config.yml_file, "r") 394 stream = open(Config.yml_file, "r", encoding='utf8')
395 try: 395 try:
396 config = yaml.safe_load(stream) 396 config = yaml.safe_load(stream)
397 except Exception as e: 397 except Exception as e:
diff --git a/music_sampler/sysfont.py b/music_sampler/sysfont.py
index f47693e..7bb518e 100644
--- a/music_sampler/sysfont.py
+++ b/music_sampler/sysfont.py
@@ -115,7 +115,7 @@ def _cache_fonts_fontconfig():
115 115
116 # get the font name 116 # get the font name
117 name = None 117 name = None
118 if len(values) > 3: 118 if len(values) > 4:
119 fullnames, fullnamelangs = values[3:] 119 fullnames, fullnamelangs = values[3:]
120 langs = fullnamelangs.split(",") 120 langs = fullnamelangs.split(",")
121 try: 121 try: