diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-27 21:33:09 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-07-27 21:33:09 +0200 |
commit | 63ba5a8dc2aa4ec3e6f203b0ba4db249ecf0b00e (patch) | |
tree | f043ab215425aca3434bf178029dad9f9e62dbe9 /music_sampler/actions/stop_all_actions.py | |
parent | 35bde798b6cda13579337b0ec5a803fdd5eab19a (diff) | |
download | MusicSampler-63ba5a8dc2aa4ec3e6f203b0ba4db249ecf0b00e.tar.gz MusicSampler-63ba5a8dc2aa4ec3e6f203b0ba4db249ecf0b00e.tar.zst MusicSampler-63ba5a8dc2aa4ec3e6f203b0ba4db249ecf0b00e.zip |
Rename helpers to music_sampler
Diffstat (limited to 'music_sampler/actions/stop_all_actions.py')
-rw-r--r-- | music_sampler/actions/stop_all_actions.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/music_sampler/actions/stop_all_actions.py b/music_sampler/actions/stop_all_actions.py new file mode 100644 index 0000000..4ea875a --- /dev/null +++ b/music_sampler/actions/stop_all_actions.py | |||
@@ -0,0 +1,14 @@ | |||
1 | def run(action, key_start_time=0, other_only=False, **kwargs): | ||
2 | if other_only: | ||
3 | action.mapping.stop_all_running( | ||
4 | except_key=action.key, | ||
5 | key_start_time=key_start_time) | ||
6 | else: | ||
7 | action.mapping.stop_all_running() | ||
8 | |||
9 | def description(action, other_only=False, **kwargs): | ||
10 | message = "stopping all actions" | ||
11 | if other_only: | ||
12 | message += " except this key" | ||
13 | |||
14 | return message | ||