#include <MIDI_Inputs/LEDs/NoteCCRangeLEDs.hpp>
|
static bool | inRange (uint8_t toMatch, uint8_t base, uint8_t length) |
| Check whether a given address is within a range of given length starting from the given base address. More...
|
|
template<uint8_t BankSize>
class Bankable::CCValueLEDPWM< BankSize >
Definition at line 427 of file NoteCCRangeLEDs.hpp.
◆ CCValueLEDPWM()
◆ match()
|
inlineoverrideprivatevirtualinherited |
Check if the address of the incoming MIDI message is within the range of addresses and in one of the banks of this element.
Reimplemented from MIDIInputElement.
Definition at line 262 of file NoteCCRange.hpp.
◆ getSelection()
|
inlineoverrideprivatevirtualinherited |
◆ getBankIndex() [1/2]
|
inlineoverrideprivatevirtualinherited |
◆ getBankIndex() [2/2]
Calculate the bank setting of a given MIDI address, relative to a base address.
- Parameters
-
target | The MIDI address to calculate the bank setting of. |
base | The base address to compare it to (the address of bank setting 0). |
Definition at line 71 of file BankableMIDIInput.hpp.
◆ getRangeIndex() [1/2]
|
inlineoverrideprivatevirtualinherited |
◆ getRangeIndex() [2/2]
If matchBankableAddressInRange returned true, get the index of the message in the range.
Definition at line 143 of file BankableMIDIInput.hpp.
◆ onBankSettingChange()
|
inlineoverrideprivatevirtualinherited |
A function to be executed each time the bank setting changes.
Think of an LED that indicates whether a track is muted or not. If this LED is bankable, let's say with 4 tracks per bank, 2 banks, and a base address of 3, then this LED object keeps the state of tracks 3 and 7. When the bank setting is 0, the LED displays the state of track 3, when the bank setting is 1, the LED displays the state of track 7.
To know when to update the LED, this callback is used.
Reimplemented from BankableMIDIInput< NumBanks >.
Definition at line 280 of file NoteCCRange.hpp.
◆ getValue() [1/4]
uint8_t getValue |
( |
uint8_t |
index | ) |
const |
|
inlinefinaloverridevirtualinherited |
◆ getValue() [2/4]
Get the velocity or controller value for the given index in the range.
◆ getValue() [3/4]
Get the velocity or controller value of the first or only note or controller.
Definition at line 82 of file NoteCCRange.hpp.
◆ getValue() [4/4]
uint8_t getValue |
( |
| ) |
const |
|
inlineinherited |
Get the velocity or controller value of the first or only note or controller.
Definition at line 24 of file NoteCCRange.hpp.
◆ begin()
|
inlineoverridevirtualinherited |
◆ reset()
|
inlineoverridevirtualinherited |
◆ updateImpl()
|
inlineoverrideprivatevirtualinherited |
◆ getValueFromMIDIMessage()
|
inlinestaticprivateinherited |
Extract the "value" from a MIDI Note or Control Change message.
For Note On and Control Change, this is simply the second data byte, for Note Off, it's zero.
Definition at line 120 of file NoteCCRange.hpp.
◆ length() [1/2]
constexpr static uint8_t length |
|
inlinestaticconstexprinherited |
◆ length() [2/2]
Get the length of the range of note/CC addresses.
Definition at line 19 of file NoteCCRange.hpp.
◆ beginAll()
◆ updateAll()
static void updateAll |
( |
| ) |
|
|
inlinestaticinherited |
◆ resetAll()
◆ updateAllWith()
◆ moveDown()
Move down this element in the linked list of elements.
This means that the element will be checked earlier on the next iteration.
Definition at line 94 of file MIDIInputElementCC.hpp.
◆ update()
◆ updateWith()
◆ getTarget()
|
inlineprivatevirtualinherited |
Extract the target address from a MIDI message.
- Note
- This base version of the function is only valid for messages that use data1 as an address (i.e. Note On, Note Off, Polyphonic Key Pressure and Control Change), because it assumes that the target address consists of the address (data 1), the MIDI channel and the cable number.
Reimplemented in MIDIInputElementPC, MIDIInputElementChannelPressure, VU_Base< NumValues, Callback >, VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, VU_Base< NumBanks, VUEmptyCallback >, VU_Base< 1, VUEmptyCallback >, and VU_Base< 1, VULEDsCallback< NumLEDs > >.
Definition at line 63 of file MIDIInputElement.hpp.
◆ matchBankable() [1/2]
bool matchBankable |
( |
uint8_t |
toMatch, |
|
|
uint8_t |
base |
|
) |
| const |
|
inlineprotectedinherited |
Check if the given address is part of the bank relative to the base address.
Consider the following example:
A Bank with 4 tracks per bank (T), 2 bank settings (N), and a base address of 3.
0 1 2 3 4 5 6 7 8 9 10 11 12 ...
Addresses before the base adddress are not matched (0, 1, 2).
Addresses after N * T are not matched (8, 9, 10, 11, 12).
Addresses with a distance to the base address that is not a multiple of N are not matched (4, 5, 6).
- Parameters
-
toMatch | The address to check. |
base | The base address (the address of bank setting 0). |
- Note
- Equivalent to
matchBankableInRange(toMatch, base, 1)
.
Definition at line 113 of file BankableMIDIInput.hpp.
◆ matchBankable() [2/2]
Check whether a given address is part of the bank relative to the base address.
- Parameters
-
toMatch | The address to check. |
base | The base address (the address of bank setting 0). |
Definition at line 174 of file BankableMIDIInput.hpp.
◆ matchBankableInRange()
bool matchBankableInRange |
( |
uint8_t |
toMatch, |
|
|
uint8_t |
base, |
|
|
uint8_t |
length |
|
) |
| const |
|
inlineprotectedinherited |
Check if the given address is part of the bank relative to the base address.
- Todo:
- This is very hard to explain without a specific example ...
- Parameters
-
toMatch | The address to check. |
base | The base address (the address of bank setting 0). |
length | The length of the range. |
Definition at line 132 of file BankableMIDIInput.hpp.
◆ inRange()
static bool inRange |
( |
uint8_t |
toMatch, |
|
|
uint8_t |
base, |
|
|
uint8_t |
length |
|
) |
| |
|
inlinestaticprotectedinherited |
Check whether a given address is within a range of given length starting from the given base address.
- Parameters
-
toMatch | The address to check |
base | The base address, start of the range. |
length | The length of the range. |
Definition at line 161 of file BankableMIDIInput.hpp.
◆ matchBankableAddressInRange()
bool matchBankableAddressInRange |
( |
const MIDIAddress & |
toMatch, |
|
|
const MIDIAddress & |
base, |
|
|
uint8_t |
length |
|
) |
| const |
|
inlineprotectedinherited |
Check whether a given address is part of the bank relative to the base address and within a range with a given length.
- Parameters
-
toMatch | The address to check. |
base | The base address (the address of bank setting 0). |
length | The length of the range. |
Definition at line 211 of file BankableMIDIInput.hpp.
◆ values
A 2D array for saving all values of the range, for all banks.
Definition at line 142 of file NoteCCRange.hpp.
◆ callback
Callback that is called when a value in the active bank changes.
Definition at line 146 of file NoteCCRange.hpp.
◆ elements
◆ address
◆ next
◆ previous
◆ rangeLength
◆ bank
◆ type
The documentation for this class was generated from the following file: