Control-Surface
Control-Surface copied to clipboard
reset transposer
Post your code hi Pieter , hope you are fine? I just seen in an exemple that pushing transposer up and down at the same time will reset the transposer, how could I reset my encoder transposer when pushing on the push button of the encoder that is wired to pin 3 please?
CCButtonLatched button1 = {3, {120, CHANNEL_16}};
// Instantiate an encoder to change the transposition
EncoderSelector<transposer.getNumberOfBanks()> selector = {
transposer,
{4, 5},
4,
Wrap::Wrap,
};
If you look at the documentation for the EncoderSelector
constructor, you'll see that the second argument is of type EncoderSwitchPinList
, which has the switchPin
as a third optional constructor parameter.
EncoderSelector<transposer.getNumberOfBanks()> selector = {
transposer,
{4, 5, 3},
4,
Wrap::Wrap,
};
You mean that if I write like this my button will automatically become a reset button for the encoder selector?