Selector that listens for MIDI Program Change events on a given MIDI Channel, and uses the program number as its selection. This version displays the setting using LEDs. More...
#include <Selectors/LEDs/SelectorLEDs.hpp>
Public Member Functions | |
| ProgramChangeSelectorLEDs (Selectable< N > &selectable, const MIDICNChannel &address, const PinList< N > &ledPins) | |
| void | begin () override | 
| Initialize the input element.  More... | |
| void | reset () override | 
| Reset the input element to its initial state.  More... | |
| bool | updateImpl (const ChannelMessageMatcher &midimsg, const MIDICNChannelAddress &target) override | 
| Update the internal state with the new MIDI message.  More... | |
| void | update () override | 
| Update this updatable.  More... | |
| virtual void | update () | 
| Update the value of the input element. Used for decaying VU meters etc.  More... | |
| void | set (setting_t newSetting) | 
| Select the given selection.  More... | |
| void | increment (Wrap wrap) | 
| Add one to the setting, wrap around or clamp, depending on the parameter, if the new setting would be out of range.  More... | |
| void | decrement (Wrap wrap) | 
| Subtract one from the setting, wrap around or clamp, depending on the parameter, if the new setting would be out of range.  More... | |
| setting_t | get () const | 
| Get the current selection/setting.  More... | |
| void | enable () | 
| Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.  More... | |
| void | disable () | 
| Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.  More... | |
| bool | isEnabled () | 
| Check if this updatable is enabled.  More... | |
| bool | updateWith (const ChannelMessageMatcher &midimsg) | 
| Receive a new MIDI message and update the internal state.  More... | |
Static Public Member Functions | |
| static void | enable (Updatable *element) | 
| static void | enable (Updatable &element) | 
| static void | enable (U(&array)[N]) | 
| static void | disable (Updatable< NormalUpdatable > *element) | 
| static void | disable (Updatable< NormalUpdatable > &element) | 
| static void | disable (U(&array)[N]) | 
| static void | beginAll () | 
| Begin all enabled instances of this class.  More... | |
| static void | beginAll () | 
| static void | updateAll () | 
| Update all enabled instances of this class.  More... | |
| static void | updateAll () | 
| Update all MIDIInputElementPC elements.  More... | |
| static void | resetAll () | 
| Reset all MIDIInputElementPC elements to their initial state.  More... | |
| static void | updateAllWith (const ChannelMessageMatcher &midimsg) | 
| Update all MIDIInputElementPC elements with a new MIDI message.  More... | |
Public Attributes | |
| SelectorLEDsCallback< N > | callback | 
Protected Attributes | |
| setting_t | setting = 0 | 
| The selection of the selector.  More... | |
| Updatable< NormalUpdatable > * | next | 
| MIDIInputElementPC * | next | 
| Updatable< NormalUpdatable > * | previous | 
| MIDIInputElementPC * | previous | 
| const MIDICNChannelAddress | address | 
Private Member Functions | |
| MIDICNChannelAddress | getTarget (const ChannelMessageMatcher &midimsg) const override | 
| Program Change doesn't have an address, so the target consists of just the channel and the cable number.  More... | |
| void | moveDown () | 
| Move down this element in the linked list of elements.  More... | |
| virtual bool | match (const MIDICNChannelAddress &target) const | 
| Check if the address of the incoming MIDI message matches an address of this element.  More... | |
Private Attributes | |
| Selectable< N > & | selectable | 
Static Private Attributes | |
| static DoublyLinkedList< Updatable< NormalUpdatable > > | updatables | 
| static DoublyLinkedList< MIDIInputElementPC > | elements | 
Selector that listens for MIDI Program Change events on a given MIDI Channel, and uses the program number as its selection. This version displays the setting using LEDs.
| N | The number of settings. The maximum program number is \( N - 1 \). | 
Definition at line 185 of file SelectorLEDs.hpp.
      
  | 
  inline | 
Definition at line 188 of file SelectorLEDs.hpp.
      
  | 
  inlineoverridevirtualinherited | 
Initialize the input element.
Reimplemented from MIDIInputElement.
Definition at line 18 of file ProgramChangeSelector.hpp.
      
  | 
  inlineoverridevirtualinherited | 
Reset the input element to its initial state.
Reimplemented from MIDIInputElement.
Definition at line 23 of file ProgramChangeSelector.hpp.
      
  | 
  inlineoverridevirtualinherited | 
Update the internal state with the new MIDI message.
Implements MIDIInputElement.
Definition at line 25 of file ProgramChangeSelector.hpp.
      
  | 
  inlineoverridevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
Update the value of the input element. Used for decaying VU meters etc.
Reimplemented in VU_Base< NumValues, Callback >, VU_Base< NumBanks, Callback >, VU_Base< NumBanks, VULEDsCallback< NumLEDs > >, VU_Base< NumBanks, VUEmptyCallback >, VU_Base< 1, VUEmptyCallback >, VU_Base< 1, VULEDsCallback< NumLEDs > >, and VU_Base< 1, Callback >.
Definition at line 36 of file MIDIInputElement.hpp.
      
  | 
  inlineinherited | 
Select the given selection.
| newSetting | The new setting to select [0, N-1]. | 
Definition at line 89 of file Selector.hpp.
      
  | 
  inlineinherited | 
Add one to the setting, wrap around or clamp, depending on the parameter, if the new setting would be out of range.
| wrap | Wrap or clamp if the new setting would be out of range. | 
Definition at line 105 of file Selector.hpp.
      
  | 
  inlineinherited | 
Subtract one from the setting, wrap around or clamp, depending on the parameter, if the new setting would be out of range.
| wrap | Wrap or clamp if the new setting would be out of range. | 
Definition at line 124 of file Selector.hpp.
      
  | 
  inlineinherited | 
Get the current selection/setting.
Definition at line 47 of file Selector.hpp.
      
  | 
  inlineinherited | 
Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.
Definition at line 45 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 85 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 87 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 90 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.
Definition at line 55 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 95 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 97 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 100 of file Updatable.hpp.
      
  | 
  inlineinherited | 
Check if this updatable is enabled.
Definition at line 69 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Begin all enabled instances of this class.
Definition at line 73 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Definition at line 37 of file MIDIInputElementPC.hpp.
      
  | 
  inlinestaticinherited | 
Update all enabled instances of this class.
Definition at line 80 of file Updatable.hpp.
      
  | 
  inlinestaticinherited | 
Update all MIDIInputElementPC elements.
Definition at line 58 of file MIDIInputElementPC.hpp.
      
  | 
  inlinestaticinherited | 
Reset all MIDIInputElementPC elements to their initial state.
Definition at line 49 of file MIDIInputElementPC.hpp.
      
  | 
  inlinestaticinherited | 
Update all MIDIInputElementPC elements with a new MIDI message.
Definition at line 70 of file MIDIInputElementPC.hpp.
      
  | 
  inlineoverrideprivatevirtualinherited | 
Program Change doesn't have an address, so the target consists of just the channel and the cable number.
Reimplemented from MIDIInputElement.
Definition at line 85 of file MIDIInputElementPC.hpp.
      
  | 
  inlineprivateinherited | 
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 95 of file MIDIInputElementPC.hpp.
      
  | 
  inlineinherited | 
Receive a new MIDI message and update the internal state.
Definition at line 39 of file MIDIInputElement.hpp.
      
  | 
  inlineprivatevirtualinherited | 
Check if the address of the incoming MIDI message matches an address of this element.
Reimplemented in GenericVU< NumBanks, Callback >, GenericVU< NumBanks >, GenericVU< NumBanks, VULEDsCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, BankSize, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, BankSize, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, BankSize, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, BankSize, NoteCCFastLEDCallback< ColorMapper > >, GenericVPotRing< NumBanks, Callback >, GenericVPotRing< NumBanks >, GenericVPotRing< NumBanks, VPotRingLEDsCallback >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLED< 1 > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLEDPWM< 1 > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCFastLEDCallback< ColorMapper > >, GenericNoteCCRange< MIDIInputElementCC, 1, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCLED< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, RangeLen, NoteCCLEDPWM< RangeLen > >, GenericNoteCCRange< MIDIInputElementNote, 1, NoteCCLEDBarCallback< NumLEDs > >, GenericNoteCCRange< MIDIInputElementCC, RangeLen, NoteCCLEDPWM< RangeLen > >, SevenSegmentDisplay< LENGTH >, SevenSegmentDisplay< AssignmentDisplayLength >, and SevenSegmentDisplay< TimeDisplayLength >.
Definition at line 75 of file MIDIInputElement.hpp.
      
  | 
  privateinherited | 
Definition at line 137 of file Selector.hpp.
      
  | 
  inherited | 
Definition at line 140 of file Selector.hpp.
      
  | 
  protectedinherited | 
The selection of the selector.
It is saved in the selector as well as the selectable, because you need it in order to implement increment/decrement methods.
Definition at line 53 of file Selector.hpp.
      
  | 
  staticprivateinherited | 
Definition at line 106 of file Updatable.hpp.
      
  | 
  protectedinherited | 
Definition at line 305 of file LinkedList.hpp.
      
  | 
  protectedinherited | 
Definition at line 305 of file LinkedList.hpp.
      
  | 
  protectedinherited | 
Definition at line 306 of file LinkedList.hpp.
      
  | 
  protectedinherited | 
Definition at line 306 of file LinkedList.hpp.
      
  | 
  staticprivateinherited | 
Definition at line 100 of file MIDIInputElementPC.hpp.
      
  | 
  protectedinherited | 
Definition at line 80 of file MIDIInputElement.hpp.
 1.8.16