Skip to content

Change from absolute encoder to regular encoder with a switch #956

Answered by tttapa
MoSaye asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, but you'll have to use the Borrowed... variants, passing the encoder object by reference so it can be shared between the different MIDI elements.

For example (untested):

#include <Control_Surface.h>

BEGIN_CS_NAMESPACE
namespace Bankable {

template<uint8_t NumBanks>
struct BorrowedBankableCCAbsoluteEncoder : BorrowedMIDIAbsoluteEncoder<NumBanks, SingleAddress, ContinuousCCSender> {
  BorrowedBankableCCAbsoluteEncoder(BankConfig<NumBanks> config, AHEncoder &encoder,
                                    MIDIAddress address, int16_t speedMultiply = 1,
                                    uint8_t pulsesPerStep = 4)
    : BorrowedMIDIAbsoluteEncoder<NumBanks, SingleAddress, ContinuousCCSen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MoSaye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants