diff options
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 | ||