Program Change with Leonardo + tttapa

Hi,

Im trying to build my first midi footcontroller and after some reading found a post which explaines exactly what I want to do.

I simply want to connect 9 momentary switches to my Leonardo and have them programmed to select Program Change 1 to 9.

I installed the tttapa sketch by PieterP but I get the following error:

exit status 1
no matching function for call to ‘SelectorPC::SelectorPC(, )’

Heres the code I used (6 switches to try it out):

#include <frequencyToNote.h>
#include <MIDIUSB.h>
#include <pitchToFrequency.h>
#include <pitchToNote.h>

#include <Control_Surface.h> // Include the library

// Patch Selector selecting patches 1, 2, 3, 4, 5, 6
// when buttons on pins 2, 3, 4, 5, 6, 7 are pressed, respectively
SelectorPC sel( { 1, 2, 3, 4, 5, 6 }, { 2, 3, 4, 5, 6, 7 } );

void setup() {} // Nothing to set up

void loop() {
// Refresh the control surface, send a Program Change
// event when the patch number changes
Control_Surface.refresh();
}

until it doesn't compile it doesn't matter what you connect to the board. even the board doesn't need to be connected for build.

did you install the Control-Surface library?

Juraj:
until it doesn't compile it doesn't matter what you connect to the board. even the board doesn't need to be connected for build.

did you install the Control-Surface library?

Yes I did