Skip to content

Commit 9c4cdd4

Browse files
committed
Deprecate more all-caps constants/enums
1 parent 5acdb1c commit 9c4cdd4

File tree

57 files changed

+842
-832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+842
-832
lines changed

examples/1. MIDI Output/Other/MIDI-Controller-Finished-Example/MIDI-Controller-Finished-Example.ino

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ const int speedMultiplier = 1;
4747
Bank<2> bank(4); // A bank with four channels, and 2 bank settings
4848

4949
Bankable::CCPotentiometer faders[] {
50-
{{bank, BankType::CHANGE_CHANNEL}, A0, {MIDI_CC::Channel_Volume, Channel_1}},
51-
{{bank, BankType::CHANGE_CHANNEL}, A1, {MIDI_CC::Channel_Volume, Channel_2}},
52-
{{bank, BankType::CHANGE_CHANNEL}, A2, {MIDI_CC::Channel_Volume, Channel_3}},
53-
{{bank, BankType::CHANGE_CHANNEL}, A3, {MIDI_CC::Channel_Volume, Channel_4}},
50+
{{bank, BankType::ChangeChannel}, A0, {MIDI_CC::Channel_Volume, Channel_1}},
51+
{{bank, BankType::ChangeChannel}, A1, {MIDI_CC::Channel_Volume, Channel_2}},
52+
{{bank, BankType::ChangeChannel}, A2, {MIDI_CC::Channel_Volume, Channel_3}},
53+
{{bank, BankType::ChangeChannel}, A3, {MIDI_CC::Channel_Volume, Channel_4}},
5454
};
5555

5656
CCPotentiometer knobsTop[] {
@@ -61,17 +61,17 @@ CCPotentiometer knobsTop[] {
6161
};
6262

6363
Bankable::CCPotentiometer knobsSide[] {
64-
{{bank, BankType::CHANGE_CHANNEL}, A8, {MIDI_CC::Pan, Channel_1}},
65-
{{bank, BankType::CHANGE_CHANNEL}, A9, {MIDI_CC::Pan, Channel_2}},
66-
{{bank, BankType::CHANGE_CHANNEL}, A10, {MIDI_CC::Pan, Channel_3}},
67-
{{bank, BankType::CHANGE_CHANNEL}, A11, {MIDI_CC::Pan, Channel_4}},
64+
{{bank, BankType::ChangeChannel}, A8, {MIDI_CC::Pan, Channel_1}},
65+
{{bank, BankType::ChangeChannel}, A9, {MIDI_CC::Pan, Channel_2}},
66+
{{bank, BankType::ChangeChannel}, A10, {MIDI_CC::Pan, Channel_3}},
67+
{{bank, BankType::ChangeChannel}, A11, {MIDI_CC::Pan, Channel_4}},
6868
};
6969

7070
Bankable::NoteButtonLatching switches[] {
71-
{{bank, BankType::CHANGE_ADDRESS}, 2, MCU::MUTE_1},
72-
{{bank, BankType::CHANGE_ADDRESS}, 3, MCU::MUTE_2},
73-
{{bank, BankType::CHANGE_ADDRESS}, 5, MCU::MUTE_3},
74-
{{bank, BankType::CHANGE_ADDRESS}, 7, MCU::MUTE_4},
71+
{{bank, BankType::ChangeAddress}, 2, MCU::MUTE_1},
72+
{{bank, BankType::ChangeAddress}, 3, MCU::MUTE_2},
73+
{{bank, BankType::ChangeAddress}, 5, MCU::MUTE_3},
74+
{{bank, BankType::ChangeAddress}, 7, MCU::MUTE_4},
7575
};
7676

7777
CCRotaryEncoder enc {

examples/3. MIDI Interfaces/Send-All-MIDI-Messages/Send-All-MIDI-Messages.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
* Program Change Channel: 9 Data 1: 0x06
1616
* Channel Pressure Channel: 3 Data 1: 0x40
1717
* Pitch Bend Channel: 3 Data 1: 0x7f Data 2: 0x7f (16383)
18-
* System Common MTC_QUARTER_FRAME Data 1: 0x2f
19-
* System Common SONG_POSITION_POINTER Data 1: 0x10 Data 2: 0x4e (10000)
20-
* System Common SONG_SELECT Data 1: 0x46
21-
* System Common TUNE_REQUEST
18+
* System Common MTCQuarterFrame Data 1: 0x2f
19+
* System Common SongPositionPointer Data 1: 0x10 Data 2: 0x4e (10000)
20+
* System Common SongSelect Data 1: 0x46
21+
* System Common TuneRequest
2222
* System Exclusive [10] F0 00 01 02 03 04 05 06 07 F7
2323
* System Exclusive [6+] F0 10 11 12 13 14
2424
* System Exclusive [6+] 15 16 17 18 19 1A
2525
* System Exclusive [6] 1B 1C 1D 1E 1F F7
26-
* Real-Time TIMING_CLOCK
27-
* Real-Time START
28-
* Real-Time CONTINUE
29-
* Real-Time STOP
30-
* Real-Time ACTIVE_SENSING
31-
* Real-Time SYSTEM_RESET
26+
* Real-Time TimingClock
27+
* Real-Time Start
28+
* Real-Time Continue
29+
* Real-Time Stop
30+
* Real-Time ActiveSensing
31+
* Real-Time SystemReset
3232
* ~~~
3333
*
3434
* @see @ref midi_md-sending "MIDI Tutorial: Sending MIDI messages"

examples/5.Banks/Bank/Bank.ino

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,50 +80,50 @@
8080
// Instantiate a MIDI over USB interface
8181
USBMIDI_Interface midi;
8282

83-
// Instantiate four Banks, with two tracks per bank.
83+
// Instantiate four Banks, with two tracks per bank.
8484
// Compare these numbers to the diagram above.
8585
Bank<4> bank(2);
8686
// │ └───── number of tracks per bank
8787
// └───────────── number of banks
8888

8989
// Instantiate a Bank selector to control which one of the four Banks is active.
9090
IncrementDecrementSelector<4> selector {
91-
bank, // Bank to manage
92-
{2, 3}, // push button pins (increment, decrement)
93-
Wrap::Wrap, // Wrap around
91+
bank, // Bank to manage
92+
{2, 3}, // push button pins (increment, decrement)
93+
Wrap::Wrap, // Wrap around
9494
};
9595

96-
// Wrapping around means that if you're in Bank 4 and you press the increment
96+
// Wrapping around means that if you're in Bank 4 and you press the increment
9797
// button, you wrap back around to Bank 1. Similarly, if you're in Bank 1 and
9898
// you press the decrement button, you wrap back around to Bank 4.
99-
// The alternative to Wrap::Wrap is Wrap::Clamp. In that case, pressing the
100-
// increment button when you're in Bank 4 won't do anything, you'll stay in
101-
// Bank 4. If you're in Bank 1 and press the decrement button, you'll stay in
99+
// The alternative to Wrap::Wrap is Wrap::Clamp. In that case, pressing the
100+
// increment button when you're in Bank 4 won't do anything, you'll stay in
101+
// Bank 4. If you're in Bank 1 and press the decrement button, you'll stay in
102102
// Bank 1.
103103

104104
// Instantiate two potentiometers for the volume controls.
105105
Bankable::CCPotentiometer potentiometer1 {
106-
{bank, BankType::CHANGE_CHANNEL}, // bank configuration
106+
{bank, BankType::ChangeChannel}, // bank configuration
107107
A0, // analog pin
108108
{MIDI_CC::Channel_Volume, Channel_1}, // address
109109
};
110110
Bankable::CCPotentiometer potentiometer2 {
111-
{bank, BankType::CHANGE_CHANNEL}, // bank configuration
111+
{bank, BankType::ChangeChannel}, // bank configuration
112112
A1, // analog pin
113113
{MIDI_CC::Channel_Volume, Channel_2}, // address
114114
};
115115

116116
// The addresses specified here are the addresses for the first Bank.
117117
// The addresses used in the other Banks are derived from these base addresses
118118
// by adding the number of tracks of the bank to the base address.
119-
// For example, in Bank 1, the first potentiometer will send on Channel 1,
120-
// in Bank 2, the first potentiometer will send on Channel 1 + 2 = Channel 3,
119+
// For example, in Bank 1, the first potentiometer will send on Channel 1,
120+
// in Bank 2, the first potentiometer will send on Channel 1 + 2 = Channel 3,
121121
// because 2 is the number of tracks in the Bank.
122-
//
122+
//
123123
// The bank setting can affect the Channel (as in this example), the address, or
124-
// the MIDI USB Cable Number. You can change this behavior by changing the
125-
// BankType in the bank configuration above to `BankType::CHANGE_ADDRESS` or
126-
// `BankType::CHANGE_CABLENB`.
124+
// the MIDI USB Cable Number. You can change this behavior by changing the
125+
// BankType in the bank configuration above to `BankType::ChangeAddress` or
126+
// `BankType::ChangeCable`.
127127

128128
void setup() {
129129
Control_Surface.begin(); // Initialize Control Surface

examples/5.Banks/Bankable-Smart-Control-Change-Potentiometer/Bankable-Smart-Control-Change-Potentiometer.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Bank<4> bank;
5353
IncrementDecrementSelector<4> selector {bank, {2, 3}};
5454

5555
// Handy type alias
56-
using CCSmartPot = Bankable::CCSmartPotentiometer<4>;
56+
using CCSmartPot = Bankable::CCSmartPotentiometer<4>;
5757

5858
// Instantiate a CCPotentiometer object
5959
CCSmartPot potentiometer {
60-
{bank, BankType::CHANGE_CHANNEL}, // Bank configuration
60+
{bank, BankType::ChangeChannel}, // Bank configuration
6161
A0, // Analog pin connected to potentiometer
6262
{MIDI_CC::Channel_Volume, Channel_1}, // Channel volume of channel 1
6363
};
@@ -70,7 +70,7 @@ CCSmartPot potentiometer {
7070
*
7171
* // Instantiate a CCPotentiometer object
7272
* PBSmartPot potentiometer {
73-
* {bank, BankType::CHANGE_CHANNEL}, // Bank configuration
73+
* {bank, BankType::ChangeChannel}, // Bank configuration
7474
* A0, // Analog pin connected to potentiometer
7575
* Channel_1, // Channel 1
7676
* };
@@ -88,7 +88,7 @@ void loop() {
8888
// Turn on an LED to indicate that the potentiometer
8989
// value is too low to be active
9090
} else if (potentiometer.getState() == CCSmartPot::Higher) {
91-
// Turn on an LED to indicate that the potentiometer
91+
// Turn on an LED to indicate that the potentiometer
9292
// value is too high to be active
9393
}
9494
}

examples/Extending-the-library/Custom-MIDI-Output-Element-Bankable/Custom-MIDI-Output-Element-Bankable.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ IncrementSelector<4> selector {
152152

153153
// Instantiate a MyNoteButton object
154154
MyNoteButton button {
155-
{bank, BankType::CHANGE_ADDRESS}, // bank changes the note number (address)
156-
5, // Push button on pin 5
157-
{MIDI_Notes::C(2), Channel_1}, // Base address: Note C2 on MIDI channel 1
158-
0x7F, // Maximum velocity
155+
{bank, BankType::ChangeAddress}, // bank changes the note number (address)
156+
5, // Push button on pin 5
157+
{MIDI_Notes::C(2), Channel_1}, // Base address: Note C2 on MIDI channel 1
158+
0x7F, // Maximum velocity
159159
};
160160

161161
void setup() {

examples/Extending-the-library/Custom-Note-LED-Input-Element-Callback-FastLED/Custom-Note-LED-Input-Element-Callback-FastLED.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ USBMIDI_Interface midi;
3939

4040
// Custom MIDI Input Element to handle incoming note events and control the LEDs.
4141
template <uint8_t RangeLen>
42-
class CustomNoteLED : public MatchingMIDIInputElement<MIDIMessageType::NOTE_ON,
42+
class CustomNoteLED : public MatchingMIDIInputElement<MIDIMessageType::NoteOn,
4343
TwoByteRangeMIDIMatcher> {
4444
public:
4545
// Constructor
4646
CustomNoteLED(CRGB *ledcolors, MIDIAddress address)
47-
: MatchingMIDIInputElement<MIDIMessageType::NOTE_ON,
47+
: MatchingMIDIInputElement<MIDIMessageType::NoteOn,
4848
TwoByteRangeMIDIMatcher>({address, RangeLen}),
4949
ledcolors(ledcolors) {}
5050

examples/Extending-the-library/Custom-Note-LED-Input-Element-Callback/Custom-Note-LED-Input-Element-Callback.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CustomNoteLED
4242
// you want to listen to MIDI Note events by specifying the MIDI message type,
4343
// and use a simple 2-byte message matcher, since MIDI Note events have two
4444
// data bytes.
45-
: public MatchingMIDIInputElement<MIDIMessageType::NOTE_ON,
45+
: public MatchingMIDIInputElement<MIDIMessageType::NoteOn,
4646
TwoByteMIDIMatcher> {
4747
public:
4848
// Constructor
@@ -80,9 +80,9 @@ class CustomNoteLED
8080

8181
// Instantiate the LED that will light up when middle C is playing.
8282
CustomNoteLED led {
83-
3, // Pin with the LED connected (PWM capable)
83+
3, // Pin with the LED connected (PWM capable)
8484
{MIDI_Notes::C(4), Channel_1}, // Note C4 on MIDI channel 1
85-
10, // Intensity when off
85+
10, // Intensity when off
8686
};
8787

8888
void setup() {

examples/Extending-the-library/Custom-USB-MIDI-Backend/Custom-USB-MIDI-Backend.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ void loop() {
6868
static Timer<millis> timer {1000};
6969
if (timer)
7070
// As an example, send a MIDI timing clock message every second.
71-
Control_Surface.sendRealTime(MIDIMessageType::TIMING_CLOCK);
71+
Control_Surface.sendRealTime(MIDIMessageType::TimingClock);
7272
Control_Surface.loop();
7373
}

examples/Other/GitHub-issues/Encoder-Selector-Bank/Encoder-Selector-Bank.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ EncoderSelector<120> selector {
2121
// The potentiometer that sends MIDI messages
2222
// the address (controller number) depends on the bank setting
2323
Bankable::CCPotentiometer potentiometer {
24-
{bank, BankType::CHANGE_ADDRESS}, // Bank configuration
25-
A0, // Analog pin for potentiometer
26-
{0x00, Channel_1}, // Base CC address
24+
{bank, BankType::ChangeAddress}, // Bank configuration
25+
A0, // Analog pin for potentiometer
26+
{0x00, Channel_1}, // Base CC address
2727
};
2828

2929
void setup() {

examples/Other/GitHub-issues/Other/MIDI_controller-97/MIDI_controller-97.ino

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ IncrementDecrementSelectorLEDs<4> bankSelector {
2929

3030
using namespace MIDI_CC;
3131
Bankable::CCPotentiometer potentiometers[] {
32-
{{bank, BankType::CHANGE_CHANNEL}, A0, {Channel_Volume, Channel_1}},
33-
{{bank, BankType::CHANGE_CHANNEL}, A1, {Channel_Volume, Channel_2}},
34-
{{bank, BankType::CHANGE_CHANNEL}, A2, {Sound_Controller_3, Channel_3}},
35-
{{bank, BankType::CHANGE_CHANNEL}, A3, {Sound_Controller_4, Channel_4}},
36-
{{bank, BankType::CHANGE_CHANNEL}, A4, {Sound_Controller_5, Channel_5}},
37-
{{bank, BankType::CHANGE_CHANNEL}, A5, {Sound_Controller_6, Channel_6}},
38-
{{bank, BankType::CHANGE_CHANNEL}, A6, {Effects_1, Channel_7}},
39-
{{bank, BankType::CHANGE_CHANNEL}, A7, {Effects_2, Channel_8}},
40-
{{bank, BankType::CHANGE_CHANNEL}, A8, {Effects_3, Channel_9}},
41-
{{bank, BankType::CHANGE_CHANNEL}, A9, {Effects_4, Channel_10}},
42-
{{bank, BankType::CHANGE_CHANNEL}, A10, {Effect_Control_1, Channel_11}},
43-
{{bank, BankType::CHANGE_CHANNEL}, A11, {Effect_Control_2, Channel_12}},
32+
{{bank, BankType::ChangeChannel}, A0, {Channel_Volume, Channel_1}},
33+
{{bank, BankType::ChangeChannel}, A1, {Channel_Volume, Channel_2}},
34+
{{bank, BankType::ChangeChannel}, A2, {Sound_Controller_3, Channel_3}},
35+
{{bank, BankType::ChangeChannel}, A3, {Sound_Controller_4, Channel_4}},
36+
{{bank, BankType::ChangeChannel}, A4, {Sound_Controller_5, Channel_5}},
37+
{{bank, BankType::ChangeChannel}, A5, {Sound_Controller_6, Channel_6}},
38+
{{bank, BankType::ChangeChannel}, A6, {Effects_1, Channel_7}},
39+
{{bank, BankType::ChangeChannel}, A7, {Effects_2, Channel_8}},
40+
{{bank, BankType::ChangeChannel}, A8, {Effects_3, Channel_9}},
41+
{{bank, BankType::ChangeChannel}, A9, {Effects_4, Channel_10}},
42+
{{bank, BankType::ChangeChannel}, A10, {Effect_Control_1, Channel_11}},
43+
{{bank, BankType::ChangeChannel}, A11, {Effect_Control_2, Channel_12}},
4444
};
4545

4646
Bankable::NoteButton muteButtons[] {

0 commit comments

Comments
 (0)