]> git.sesse.net Git - nageru/blob - nageru/nageru_midi_mapping.proto
Fix a comment typo.
[nageru] / nageru / nageru_midi_mapping.proto
1 // Mappings from MIDI controllers to the UI. (We don't really build
2 // a more complicated data structure than this in Nageru itself either;
3 // we just edit and match directly against the protobuf.)
4
5 syntax = "proto2";
6
7 import "midi_mapping.proto";
8
9 // All the mappings for a given a bus.
10 message MIDIMappingBusProto {
11         // TODO: If we need support for lots of buses (i.e., more than the typical eight
12         // on a mixer), add a system for bus banks, like we have for controller banks.
13         // optional int32 bus_bank = 1;
14
15         optional MIDIControllerProto stereo_width = 37;
16         optional MIDIControllerProto treble = 2;
17         optional MIDIControllerProto mid = 3;
18         optional MIDIControllerProto bass = 4;
19         optional MIDIControllerProto gain = 5;
20         optional MIDIControllerProto compressor_threshold = 6;
21         optional MIDIControllerProto fader = 7;
22
23         optional MIDIButtonProto toggle_mute = 8;
24         optional MIDIButtonProto toggle_locut = 9;
25         optional MIDIButtonProto toggle_auto_gain_staging = 10;
26         optional MIDIButtonProto toggle_compressor = 11;
27         optional MIDIButtonProto clear_peak = 12;
28
29         // These are really global (controller bank change affects all buses),
30         // but it's not uncommon that we'd want one button per bus to switch banks.
31         // E.g., if the user binds the “mute” button to “next bank”, they'd want every
32         // mute button on the mixer to do that, so they need one mapping per bus.
33         optional MIDIButtonProto prev_bank = 13;
34         optional MIDIButtonProto next_bank = 14;
35         optional MIDIButtonProto select_bank_1 = 15;
36         optional MIDIButtonProto select_bank_2 = 16;
37         optional MIDIButtonProto select_bank_3 = 17;
38         optional MIDIButtonProto select_bank_4 = 18;
39         optional MIDIButtonProto select_bank_5 = 19;
40         optional MIDIButtonProto toggle_limiter = 20;
41         optional MIDIButtonProto toggle_auto_makeup_gain = 21;
42
43         // Video mixing.
44         optional MIDIButtonProto switch_video_channel = 38;
45         optional MIDIButtonProto apply_transition = 39;
46
47         // Main UI. Really global, but see the comment on lo-cut etc. above.
48         optional MIDIButtonProto prev_audio_view = 40;
49         optional MIDIButtonProto next_audio_view = 41;
50         optional MIDIButtonProto begin_new_video_segment = 42;
51         optional MIDIButtonProto exit = 43;
52
53         // These are also global (they belong to the master bus), and unlike
54         // the bank change commands, one would usually have only one of each,
55         // but there's no reason to limit them to one each, and the editor UI
56         // becomes simpler if they are the treated the same way as the bank
57         // commands.
58         optional MIDIControllerProto locut = 22;
59         optional MIDIControllerProto limiter_threshold = 23;
60         optional MIDIControllerProto makeup_gain = 24;
61
62         // Per-bus lights.
63         optional MIDILightProto is_muted = 25;
64         optional MIDILightProto locut_is_on = 26;
65         optional MIDILightProto auto_gain_staging_is_on = 27;
66         optional MIDILightProto compressor_is_on = 28;
67         optional MIDILightProto has_peaked = 29;
68
69         // Global lights. Same logic as above for why they're in this proto.
70         optional MIDILightProto bank_1_is_selected = 30;
71         optional MIDILightProto bank_2_is_selected = 31;
72         optional MIDILightProto bank_3_is_selected = 32;
73         optional MIDILightProto bank_4_is_selected = 33;
74         optional MIDILightProto bank_5_is_selected = 34;
75         optional MIDILightProto limiter_is_on = 35;
76         optional MIDILightProto auto_makeup_gain_is_on = 36;
77 }
78
79 // The top-level protobuf, containing all the bus mappings, as well as
80 // more global settings.
81 //
82 // Since a typical mixer will have fewer physical controls than what Nageru
83 // could use, Nageru supports so-called controller banks. A mapping can
84 // optionally belong to a bank, and if so, that mapping is only active when
85 // that bank is selected. The user can then select the current bank using
86 // other mappings, typically by having some mixer button assigned to
87 // “next bank”. This yields effective multiplexing of lesser-used controls.
88 message MIDIMappingProto {
89         optional int32 num_controller_banks = 1 [default = 0];  // Max 5.
90
91         // Bus controller banks.
92         optional int32 stereo_width_bank = 19;
93         optional int32 treble_bank = 2;
94         optional int32 mid_bank = 3;
95         optional int32 bass_bank = 4;
96         optional int32 gain_bank = 5;
97         optional int32 compressor_threshold_bank = 6;
98         optional int32 fader_bank = 7;
99
100         // Bus button banks.
101         optional int32 toggle_mute_bank = 8;
102         optional int32 toggle_locut_bank = 9;
103         optional int32 toggle_auto_gain_staging_bank = 10;
104         optional int32 toggle_compressor_bank = 11;
105         optional int32 clear_peak_bank = 12;
106
107         // Bus (not non-audio) buttons.
108         optional int32 switch_video_channel_bank = 24;
109         optional int32 apply_transition_bank = 25;
110
111         // Global controller banks.
112         optional int32 locut_bank = 13;
113         optional int32 limiter_threshold_bank = 14;
114         optional int32 makeup_gain_bank = 15;
115
116         // Global buttons.
117         optional int32 toggle_limiter_bank = 16;
118         optional int32 toggle_auto_makeup_gain_bank = 17;
119
120         // Global non-audio buttons.
121         optional int32 prev_audio_view_bank = 20;
122         optional int32 next_audio_view_bank = 21;
123         optional int32 begin_new_video_segment_bank = 22;
124         optional int32 exit_bank = 23;
125
126         repeated MIDIMappingBusProto bus_mapping = 18;
127 }