]>
git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blob - music_sampler/actions/volume.py
1 def run(action
, music
=None, value
=100, fade
=0, delta
=False, **kwargs
):
3 music
.set_volume(value
, delta
=delta
, fade
=fade
)
5 action
.mapping
.set_master_volume(value
, delta
=delta
, fade
=fade
)
7 def description(action
, music
=None,
8 value
=100, delta
=False, fade
=0, **kwargs
):
13 message
+= "{:+d}% to volume of « {} »"
15 formats
.append(music
.name
)
17 message
+= "{:+d}% to volume"
21 message
+= "setting volume of « {} » to {}%"
22 formats
.append(music
.name
)
25 message
+= "setting volume to {}%"
29 message
+= " with {}s fade"
32 return _(message
).format(*formats
)