-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmappings.py
50 lines (40 loc) · 1.68 KB
/
mappings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from __future__ import absolute_import, print_function, unicode_literals
from ableton.v3.control_surface import HIGH_PRIORITY
from ableton.v3.control_surface.mode import MomentaryBehaviour
def create_mappings(control_surface):
mappings = {}
# session box display
mappings['Session'] = dict()
# needed for session box control
mappings['Session_Navigation'] = dict(
left_button='left_button',
right_button='right_button')
mappings['Mixer'] = dict(
pan_controls='pan_controls',
mute_buttons='mute_buttons',
solo_buttons='solo_buttons',
track_select_buttons='rec_arm_buttons',
volume_controls='volume_controls',
master_track_volume_control='master_volume_control')
mappings['Encoder_Modes'] = dict(
send=dict(component='Mixer', send_a_controls='send_a_controls',
send_b_controls='send_b_controls'),
device=dict(component='Device', parameter_controls='encoders'))
mappings['Main_Modes'] = dict(
shift_button='shift_button',
default=dict(
modes=[
dict(component='Session'),
dict(component='Session_Navigation', priority=HIGH_PRIORITY),
dict(component='Mixer')]),
shift=dict(
modes=[
dict(component='Session'),
dict(component='Session_Navigation'),
dict(component='Mixer'),
dict(component='Encoder_Modes',
send_button='left_button',
device_button='right_button',
priority=HIGH_PRIORITY)],
behaviour=(MomentaryBehaviour())))
return mappings