]>
git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blob - helpers/actions/play.py
1 def run(action
, music
=None, fade_in
=0, start_at
=0,
2 restart_if_running
=False, volume
=100,
4 for music
in action
.music_list(music
):
13 elif not music
.is_in_use():
20 def description(action
, music
=None, fade_in
=0, start_at
=0,
21 restart_if_running
=False, volume
=100, loop
=0, **kwargs
):
24 message
+= "« {} »".format(music
.name
)
26 message
+= "all musics"
29 message
+= " at {}s".format(start_at
)
32 message
+= " with {}s fade_in".format(fade_in
)
34 message
+= " at volume {}%".format(volume
)
37 message
+= " {} times".format(loop
+ 1)
41 if restart_if_running
:
42 message
+= " (restarting if already running)"