The prototype is almost working.
Now quite what we mean by working, is a debate that I’m sure I could run to hours but best to save you such concerns and leave it to the brave boys and girls down in the R&D department and there many, many hours spent on the zynthian tower dungeons, “encouragement equipment” to answer this question.
A thingy has been built and it’s almost ready to have a name so suggestions along the lines of zynrduino or zynhui would be considered.
I’ve even managed to make the hardware semi modular
3 of the encoders work, which is odd cos I’m pretty sure they worked as a switch on the Pedal board, and I’m fairly sure the signal makes it to the pins.
Which looks great until you realise that the Channel Encoder on pins 10 & 11 just doesn’t function.
Since it’s a big exercise in cut & paste I can’t find the construction of the MIDI_CC object that allows me to set the MIDI out channel.
So I’d love to know how to do that . . .
Otherwise with these setting the encoders sent value 1 or 127 depending on which way they are going, and continue to do so for ever. So they make good signals to control a zynth.
Have wired up the basic encoder switches and need to add code for front panel switches.
Might add a LED or two for some feedback, and testing.
#include <Encoder.h>
#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
using namespace MIDI_Notes;
// Instantiate a CCRotaryEncoder object
CCRotaryEncoder enc01 = {
{0, 1}, // pins
MIDI_CC::Balance, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc02 = {
{3, 4}, // pins
MIDI_CC::Pan, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc03 = {
{7, 8}, // pins
MIDI_CC::Portamento_Time, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc04 = {
{10, 11}, // pins
MIDI_CC::Data_Entry_MSB, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
NoteButton button03 = {
2, // Push button on pin 3
{note(D, 4), CHANNEL_16}, // Note C4 on MIDI channel 16
};
NoteButton button06 = {
5, // Push button on pin 5
{note(F, 4), CHANNEL_16}, // Note C4 on MIDI channel 16
};
NoteButton button07 = {
6, // Push button on pin 6
{note(Gb, 4),CHANNEL_16}, // Note C4 on MIDI channel 16
};
NoteButton button10 = {
9, // Push button on pin 1
{note(A, 4), CHANNEL_16}, // Note C4 on MIDI channel 16
};
void setup() {
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}