I'm trying to program a Teensy 4.0 to control my Sounddevices Scorpio.
The scorpio uses the Mackie MCU protocol to communicate with an external controller.
At the moment i am able to get play, pauze, stop, record working. What i want to achieve is to control the value of the faders on channels 1-12 with a potentiometer.
This is the code i have right now:
I'm very new to the use of arduino's/ teensy's and coding and i was hoping you could help me get my code working.
The scorpio uses the Mackie MCU protocol to communicate with an external controller.
At the moment i am able to get play, pauze, stop, record working. What i want to achieve is to control the value of the faders on channels 1-12 with a potentiometer.
This is the code i have right now:
Code:
#include <Encoder.h> // Include the Encoder library.
// This must be done before the Control Surface library if you want to use encoders
#include <Control_Surface.h> // Include the Control Surface library
// Instantiate a MIDI over USB interface.
USBMIDI_Interface midi;
// Instantiate an array of NoteButton objects that send
// MIDI note events when a push button is pressed/released
NoteButton buttons[] {
{ 4, MCU::PLAY }, // Push button on pin 4, “play” control
{ 5, MCU::STOP },
{ 6, MCU::RECORD },
{ 7, MCU::REWIND },
{ 8, MCU::FAST_FWD },
};
// Instantiate a CCPotentiometer object
CCPotentiometer potentiometer {
A0, // Analog pin connected to potentiometer
{MIDI_CC::Channel_Volume, CHANNEL_1}, // Channel volume of channel 1
};
void setup() {
// Select the correct relative MIDI CC mode:
RelativeCCSender::setMode(relativeCCmode::MACKIE_CONTROL_RELATIVE);
Control_Surface.begin(); // Initialize Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}
I'm very new to the use of arduino's/ teensy's and coding and i was hoping you could help me get my code working.