Line data Source code
1 : #pragma once 2 : 3 : #include <MIDI_Outputs/Abstract/MIDIFilteredAnalog.hpp> 4 : #include <MIDI_Senders/ContinuousCCSender.hpp> 5 : 6 : BEGIN_CS_NAMESPACE 7 : 8 : /** 9 : * @brief A class of MIDIOutputElement%s that read the analog input from a 10 : * **potentiometer or fader**, and send out 7-bit MIDI 11 : * **Control Change** events. 12 : * 13 : * The analog input is filtered and hysteresis is applied for maximum 14 : * stability. 15 : * This version cannot be banked. 16 : * 17 : * @ingroup MIDIOutputElements 18 : */ 19 : class CCPotentiometer : public MIDIFilteredAnalog<ContinuousCCSender> { 20 : public: 21 : /** 22 : * @brief Create a new CCPotentiometer object with the given analog pin, 23 : * controller number and channel. 24 : * 25 : * @param analogPin 26 : * The analog input pin to read from. 27 : * @param address 28 : * The MIDI address containing the controller number [0, 119], 29 : * channel [Channel_1, Channel_16], and optional cable number 30 : * [Cable_1, Cable_16]. 31 : */ 32 4 : CCPotentiometer(pin_t analogPin, MIDIAddress address) 33 4 : : MIDIFilteredAnalog(analogPin, address, {}) {} 34 : }; 35 : 36 : END_CS_NAMESPACE