MIDI Controller & Synthesizer Project

Hi Ive been busy with Evans project (https://www.youtube.com/watch?v=4iOyT_pyUXc&feature=emb_logo) and got it working. However I need to extend the midi to allow me to change other synth controls.
I want to add 2 more potentiometers as below to control echo or reverb or any other effect.
Ive added 2 pots to the board on A2 and A3.
Also want to be able to change the preset sound to other sounds.
Can someone please let me know how to do this the code in arduino is:
Thanks in advance.

#include “MIDI_Controller.h” // Include the library

const int c = 60;

const uint8_t velocity = 0b1111111; // Maximum velocity (0b1111111 = 0x7F = 127)
const uint8_t addresses[3][4] = { // button keymap
{c+0, c-5, c+2, c+3},
{c+4, c+5, c+6, c+7},
{c+12, c+9, c+14, c+11},
};

ButtonMatrix<3, 4> buttonmatrix({7, 6,5}, {11, 10, 9, 8} , addresses, 1, velocity);

// Create a new instance of the class ‘Analog’, called ‘potentiometer’, on pin A0,
// that sends MIDI messages with controller 7 (channel volume) on channel 1
Analog potentiometer1(A0, MIDI_CC::Channel_Volume, 1);

// Create a new instance of the class ‘AnalogHiRes’, called ‘potentiometer’, on pin A1,
// that sends MIDI Pitch Bend messages on channel 1
AnalogHiRes potentiometer2(A1, 1);

// Create a new instance of the class ‘?’, called ‘potentiometer’, on pin A2,
// that sends ??? on channel 1 Reverb
Analog potentiometer3(A2, MIDI_CC::Reverb, 1);

// Create a new instance of the class ‘?’, called ‘potentiometer’, on pin A3,
// that sends ??? on channel 1 Echo
Analog potentiometer4(A3, MIDI_CC::Echo, 1);

void setup() {}

void loop() {
MIDI_Controller.refresh();
}

@wro Thank you for posting your question on the Forum. I have not worked with this project, however this is a note in the Maker.io project that states " You can program more potentiometers using these formats and by looking at the MIDI_Constants folder on the GitHub page."

Here is a link to the Project page.
https://www.digikey.com/en/maker/projects/agm-summer-break-edition-raspberry-pi-midi-controller-synthesizer/45f94d1c75644494aaf7dda60e9b8693

I can also reach out to the author if this does not help.
-Robert

Hi Robert
appreciate the quick response.
I have tried that solution as per the MIDI_Constants folder on the GitHub page. I will try this again - if still stuck then Ill let you know and then perhaps we can reach out to the author.

1 Like