Using encoder to scroll tracks and change banks, DIY MIDI controller,

Hi there:) I am building a midi console to control ableton with the help of the awesome Control Surface library by tttapa (Control Surface: Main Page)
I want to have some banks so i can map my potentiometers to different settings depending on the bank selected. Also I want to be able to scroll through my tracks(this was solved by using remotify to generate a python script).

Is it possible to use my encoder in the following way:

When connected on the computer and ableton, due to the script installed, by rotating the encocder i scroll through my tracks.
When the push button of the encoder is pressed, my encoder exits scrolling mode and enters bank mode, meaning when i rotate my encoder it scrolls through the different banks.
When the push button of the encoder is pressed again the encoder goes back to scrolling through the tracks

Any help appreciated:):slight_smile:

Sure.  Debounce* the switch, detect the switch state change*, use the state change to toggle a boolean value which is then used to select either scrolling or bank mode.

  • file -> examples/digital/

Also: Timer counter state change toggle FSM - all at once

So I found a solution by using this code here Toggle between Bank & direct CCRotaryEncoder with pushButton · Issue #448 · tttapa/Control-Surface · GitHub that uses the borrowed encoder classes that store a reference to the Encoder object, not just a copy of the Encoder itself.

No though the problem is that I haven't figured yet how to insert an Encoder Selector in this piece of code so when the button is pressed the Borrowed encoder that will be enabled will function as a bank selector......Any ideas?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.