Bonjour à tous.
J'ai fait un sketch y'a environ 1 an pour la création d'un contrôleur midi DJ.
Voilà qu'un an après je veux rouvrir le sketch dans Arduino IDE, je vérifie (sans rien avoir touché) et il me sort des erreurs que je ne sais pas déchiffrer.
Voici mon code :
#include <Control_Surface.h> // Include the Control Surface library
#include <MIDIUSB.h> // Include The MIDIUSB Library
#include <Encoder.h> // Include the Encoder library.
USBMIDI_Interface midi; // Instantiate a MIDI Interface to use
// Instantiate an analog multiplexer
CD74HC4067 mux1 {
A0, // Analog input pin
{18, 19, 20, 21} // Address pins S0, S1, S2, S3
};
// Instantiate another analog multiplexer
CD74HC4067 mux2 {
16, // digital input pin
{18, 19, 20, 21} // Address pins S0, S1, S2, S3
};
// Instantiate an analog multiplexer
CD74HC4067 mux3 {
17, // digital input pin
{18, 19, 20, 21} // Address pins S0, S1, S2, S3
};
// Instantiate first shift register as output for the LEDs
SPIShiftRegisterOut<8> sreg1 {
SPI, // SPI interface to use
52, // Latch pin (ST_CP)
MSBFIRST, // Byte order
};
// Instantiate second shift register as output for the LEDs
SPIShiftRegisterOut<8> sreg2 {
SPI, // SPI interface to use
53, // Latch pin (ST_CP)
MSBFIRST, // Byte order
};
/////////////////////////// POTENTIOMETERS /////////////////////////////
// Create an array of CCPotentiometer objects that send out MIDI Control Change
// messages when you turn the potentiometers connected to the 16 inputs of the mux.
CCPotentiometer Potentiometers[] {
// Mux number.Pin(Number), CC number, MIDI Channel
{ mux1.pin(0), { 0x01, CHANNEL_1 } }, // Dry/Wet Adjust Effect DECK A
{ mux1.pin(1), { 0x02, CHANNEL_1 } }, // Effect Knob 1 DECK A
{ mux1.pin(2), { 0x03, CHANNEL_1 } }, // Effect Knob 2 DECK A
{ mux1.pin(3), { 0x04, CHANNEL_1 } }, // Effect Knob 3 DECK A
{ mux1.pin(4), { 0x05, CHANNEL_1 } }, // Gain Deck A (Bitwig)
{ mux1.pin(5), { 0x06, CHANNEL_1 } }, // Headphone Gain Deck A (Bitwig)
{ mux1.pin(6), { 0x07, CHANNEL_1 } }, // Low Cut Deck A (Bitwig)
{ mux1.pin(7), { 0x08, CHANNEL_1 } }, // SculptEQ Freq Deck A (Bitwig)
{ mux1.pin(8), { 0x09, CHANNEL_1 } }, // SculptEQ Gain Deck A (Bitwig)
{ mux1.pin(9), { 0x10, CHANNEL_1 } }, // High Cut Deck A (Bitwig)
{ mux1.pin(10), { 0x11, CHANNEL_1 } }, // Send 1 Deck A (Bitwig)
{ mux1.pin(11), { 0x12, CHANNEL_1 } }, // Send 2 Deck A (Bitwig)
{ mux1.pin(12), { 0X13, CHANNEL_1 } }, // Fader Deck A (Bitwig)
{ mux1.pin(13), { 0x14, CHANNEL_1 } }, // Dry/Wet Adjust Effect DECK C
{ mux1.pin(14), { 0x15, CHANNEL_1 } }, // Effect Knob 1 DECK C
{ mux1.pin(15), { 0x16, CHANNEL_1 } }, // Effect Knob 2 DECK C
};
CCPotentiometer potentiometers[] {
// Pin Number, CC Number, MIDI Channel Number
{A1, { 0x17, CHANNEL_1 } }, // Effect Knob 3 DECK C
{A2, { 0x18, CHANNEL_1 } }, // Gain Deck C (Bitwig)
{A3, { 0x19, CHANNEL_1 } }, // Headphone Gain Deck C (Bitwig)
{A4, { 0x20, CHANNEL_1 } }, // Low Cut Deck C (Bitwig)
{A5, { 0x21, CHANNEL_1 } }, // SculptEQ Frequency Deck C (Bitwig)
{A6, { 0x22, CHANNEL_1 } }, // SculptEQ Gain Deck C (Bitwig)
{A7, { 0x23, CHANNEL_1 } }, // High Cut Deck C (Bitwig)
{A8, { 0x24, CHANNEL_1 } }, // Send 1 Deck C (Bitwig)
{A9, { 0x25, CHANNEL_1 } }, // Send 2 Deck C (Bitwig)
{A10, { 0x26, CHANNEL_1 } }, // Fader Deck C (Bitwig)
{A11, { 0x27, CHANNEL_1 } }, // Master Volume
};
/////////////////////////// MOMENTARY SWITCH /////////////////////////////
NoteButton Buttons[] {
// Mux number.Pin(Number), MIDI note Number, MIDI Channel
{ mux2.pin(0), { MIDI_Notes::Ab(-1), CHANNEL_1 } }, // Unit On FX1 DECK A
{ mux2.pin(1), { MIDI_Notes::A(-1), CHANNEL_1 } }, // FX1 Select & Load DECK A
{ mux2.pin(2), { MIDI_Notes::Bb(-1), CHANNEL_1 } }, // FX2 Select & Load DECK A
{ mux2.pin(3), { MIDI_Notes::B(-1), CHANNEL_1 } }, // FX3 Select & Load DECK A
{ mux2.pin(4), { MIDI_Notes::C(-1), CHANNEL_1 } }, // FX4 Select & Load DECK A
{ mux2.pin(5), { MIDI_Notes::Db(-1), CHANNEL_1 } }, // Button FX Knob 1 DECK A
{ mux2.pin(6), { MIDI_Notes::D(-1), CHANNEL_1 } }, // Button FX Knob 2 DECK A
{ mux2.pin(7), { MIDI_Notes::Eb(-1), CHANNEL_1 } }, // Button FX Knob 3 DECK A
{ mux2.pin(8), { MIDI_Notes::E(-1), CHANNEL_1 } }, // Set As Tempo Master DECK A
{ mux2.pin(9), { MIDI_Notes::F_(-1), CHANNEL_1 } }, // Sync DECK A
{ mux2.pin(10), { MIDI_Notes::Gb(-1), CHANNEL_1 } }, // Play/Pause DECK A
{ mux2.pin(11), { MIDI_Notes::G(-1), CHANNEL_1 } }, // Cue DECK A
{ mux2.pin(12), { MIDI_Notes::Ab(0), CHANNEL_1 } }, // Headphone On DECK A (Bitwig)
{ mux2.pin(13), { MIDI_Notes::A(0), CHANNEL_1 } }, // BeatJump Backward DECK A
{ mux2.pin(14), { MIDI_Notes::Bb(0), CHANNEL_1 } }, // BeatJump Forward DECK A
{ mux2.pin(15), { MIDI_Notes::B(0), CHANNEL_1 } },
{ mux3.pin(0), { MIDI_Notes::C(0), CHANNEL_1 } }, // Unit On FX1 DECK C
{ mux3.pin(1), { MIDI_Notes::Db(0), CHANNEL_1 } }, // FX1 Select & Load DECK C
{ mux3.pin(2), { MIDI_Notes::D(0), CHANNEL_1 } }, // FX2 Select & Load DECK C
{ mux3.pin(3), { MIDI_Notes::Eb(0), CHANNEL_1 } }, // FX3 Select & Load DECK C
{ mux3.pin(4), { MIDI_Notes::E(0), CHANNEL_1 } }, // FX4 Select & Load DECK C
{ mux3.pin(5), { MIDI_Notes::F_(0), CHANNEL_1 } }, // Button FX Knob 1 DECK C
{ mux3.pin(6), { MIDI_Notes::Gb(0), CHANNEL_1 } }, // Button FX Knob 2 DECK C
{ mux3.pin(7), { MIDI_Notes::G(0), CHANNEL_1 } }, // Button FX Knob 3 DECK C
{ mux3.pin(8), { MIDI_Notes::Ab(1), CHANNEL_1 } }, // Set As Tempo Master DECK C
{ mux3.pin(9), { MIDI_Notes::A(1), CHANNEL_1 } }, // Sync DECK C
{ mux3.pin(10), { MIDI_Notes::Bb(1), CHANNEL_1 } }, // Play/Pause DECK C
{ mux3.pin(11), { MIDI_Notes::B(1), CHANNEL_1 } }, // Cue DECK C
{ mux3.pin(12), { MIDI_Notes::C(1), CHANNEL_1 } }, // Headphone On DECK C (Bitwig)
{ mux3.pin(13), { MIDI_Notes::Db(1), CHANNEL_1 } }, // BeatJump Backward DECK C
{ mux3.pin(14), { MIDI_Notes::D(1), CHANNEL_1 } }, // BeatJump Forward DECK C
{ mux3.pin(15), { MIDI_Notes::Eb(1), CHANNEL_1 } },
};
NoteButton Button[] {
// Pin Number, MIDI note Number, MIDI Channel
{40, {MIDI_Notes::E(1), CHANNEL_1} }, // Load Deck C
{41, {MIDI_Notes::F_(1), CHANNEL_1} }, // Loop Size Select & Set 16, Size Selector Loop, Move Selector Loop Deck C
{42, {MIDI_Notes::Gb(1), CHANNEL_1} }, // Loop Active Deck C
{43, {MIDI_Notes::G(1), CHANNEL_1} }, // Load Deck A
{44, {MIDI_Notes::Ab(2), CHANNEL_1} }, // Loop Size Select & Set 16, Size Selector Loop, Move Selector Loop Deck A
{45, {MIDI_Notes::A(2), CHANNEL_1} }, // Loop Active Deck A
};
/////////////////////////// LED /////////////////////////////
// Instantiate the LED that will light up when corresponding MIDI Note is playing
NoteLED leds[] {
// Pin Number, MIDI Note, MIDI channel
{22, {MIDI_Notes::Bb(2), CHANNEL_1} }, // FX On Deck A
{23, {MIDI_Notes::B(2), CHANNEL_1} }, // FX1 Select & Load Deck A
{24, {MIDI_Notes::C(2), CHANNEL_1} }, // FX2 Select & Load Deck A
{25, {MIDI_Notes::Db(2), CHANNEL_1} }, // FX3 Select & Load Deck A
{26, {MIDI_Notes::D(2), CHANNEL_1} }, // FX4 Select & Load Deck A
{27, {MIDI_Notes::Eb(2), CHANNEL_1} }, // Button FX Knob 1 Deck A
{28, {MIDI_Notes::E(2), CHANNEL_1} }, // Button FX Knob 2 Deck A
{29, {MIDI_Notes::F_(2), CHANNEL_1} }, // Button FX Knob 3 Deck A
{30, {MIDI_Notes::Gb(2), CHANNEL_1} }, // Set As Tempo Master Deck A
{31, {MIDI_Notes::G(2), CHANNEL_1} }, // Sync Deck A
{32, {MIDI_Notes::Ab(3), CHANNEL_1} }, // Play/Pause DECK A
{33, {MIDI_Notes::A(3), CHANNEL_1} }, // Cue DECK A
{34, {MIDI_Notes::Bb(3), CHANNEL_1} }, // Headphone On DECK A (Bitwig)
{35, {MIDI_Notes::B(3), CHANNEL_1} }, // BeatJump Backward DECK A
{36, {MIDI_Notes::C(3), CHANNEL_1} }, // BeatJump Forward DECK A
{37, {MIDI_Notes::Db(3), CHANNEL_1} }, // Loop Size Select & Set 16, Size Selector Loop, Move Selector Loop Deck A
{38, {MIDI_Notes::D(3), CHANNEL_1} }, // Loop Active Deck A
{39, {MIDI_Notes::Eb(3), CHANNEL_1} }, // Loop Size Select & Set 16, Size Selector Loop, Move Selector Loop Deck C
};
// Create an array of LEDs that listen to MIDI Note messages, turning on and off
// the LEDs connected to the eight output pins of the shift register
NoteLED led[] {
// sregpin number, note number, channel
{sreg1.pin(0), {MIDI_Notes::E(3), CHANNEL_1} }, // Loop Active Deck C
{sreg1.pin(1), {MIDI_Notes::F_(3), CHANNEL_1} }, // FX On Deck C
{sreg1.pin(2), {MIDI_Notes::Gb(3), CHANNEL_1} }, // FX1 Select & Load Deck C
{sreg1.pin(3), {MIDI_Notes::G(3), CHANNEL_1} }, // FX2 Select & Load Deck C
{sreg1.pin(4), {MIDI_Notes::Ab(4), CHANNEL_1} }, // FX3 Select & Load Deck C
{sreg1.pin(5), {MIDI_Notes::A(4), CHANNEL_1} }, // FX4 Select & Load Deck C
{sreg1.pin(6), {MIDI_Notes::Bb(4), CHANNEL_1} }, // Button FX Knob 1 DECK C
{sreg1.pin(7), {MIDI_Notes::B(4), CHANNEL_1} }, // Button FX Knob 2 DECK C
{sreg2.pin(0), {MIDI_Notes::C(4), CHANNEL_1} }, // Button FX Knob 3 DECK C
{sreg2.pin(1), {MIDI_Notes::Db(4), CHANNEL_1} }, // Set As Tempo Master Deck C
{sreg2.pin(2), {MIDI_Notes::D(4), CHANNEL_1} }, // Sync Deck C
{sreg2.pin(3), {MIDI_Notes::Eb(4), CHANNEL_1} }, // Play/Pause DECK C
{sreg2.pin(4), {MIDI_Notes::E(4), CHANNEL_1} }, // Cue DECK C
{sreg2.pin(5), {MIDI_Notes::F_(4), CHANNEL_1} }, // Headphone On DECK C (Bitwig)
{sreg2.pin(6), {MIDI_Notes::Gb(4), CHANNEL_1} }, // BeatJump Backward DECK C
{sreg2.pin(7), {MIDI_Notes::G(4), CHANNEL_1} }, // BeatJump Forward DECK C
};
/////////////////////////// ROTARY ENCODERS /////////////////////////////
CCRotaryEncoder enc1 = { //Load & Search DECK A
{0, 1}, // pins
{100, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc2 = { // Loop Size DECK A
{2, 3}, // pins
{101, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc3 = { // Loop Move DECK A
{4, 5}, // pins
{102, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc4 = { // Cue Jump DECK A
{6, 7}, // pins
{103, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc5 = { //Load & Search DECK C
{8, 9}, // pins
{104, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc6 = { // loop Size DECK C
{10, 11}, // pins
{105, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc7 = { // Loop Move DECK C
{12, 13}, // pins
{106, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
CCRotaryEncoder enc8 = { // Cue Jump DECK C
{14, 15}, // pins
{107, CHANNEL_1}, // MIDI address (CC number + optional channel)
1, // optional multiplier if the control isn't fast enough
};
void setup() {
// Select the correct relative MIDI CC mode.
// Options:
// - TWOS_COMPLEMENT (default)
// - BINARY_OFFSET
// - SIGN_MAGNITUDE
// - NEXT_ADDRESS
// Aliases:
// - REAPER_RELATIVE_1
// - REAPER_RELATIVE_2
// - REAPER_RELATIVE_3
// - TRACKTION_RELATIVE
// - MACKIE_CONTROL_RELATIVE
// - KORG_KONTROL_INC_DEC_1
RelativeCCSender::setMode(relativeCCmode::TWOS_COMPLEMENT);
Control_Surface.begin(); // Initialize the Control Surface
}
void loop() {
Control_Surface.loop(); // Update the Control Surface
}
Et voici les erreurs qu'il me sort quand je vérifie :
In file included from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/Display/Helpers/Bresenham.hpp:5:0,
from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/Display/MCU/VUDisplay.hpp:102,
from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/Control_Surface.h:25,
from C:\Users\Ray-Me\Documents\Arduino\Controller Deck A&C\Controller_Mixer\Controller_Mixer.ino:1:
C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/AH/STL/cmath:16:31: note: #pragma message: FMA math fix
#pragma message("FMA math fix")
^
In file included from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/AH/Math/Vector.hpp:20:0,
from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src\AH\Math\Quaternion.hpp:29,
from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src\AH\Math\Quaternion.cpp:1:
C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/AH/STL/cmath:16:31: note: #pragma message: FMA math fix
#pragma message("FMA math fix")
^
In file included from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src\AH\Math\Vector.hpp:20:0,
from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src\AH\Math\Vector.cpp:1:
C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/AH/STL/cmath:16:31: note: #pragma message: FMA math fix
#pragma message("FMA math fix")
^
In file included from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src\Display\Helpers\Bresenham.hpp:5:0,
from C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src\Display\Helpers\Bresenham.cpp:1:
C:\Users\Ray-Me\Documents\Arduino\libraries\Control_Surface\src/AH/STL/cmath:16:31: note: #pragma message: FMA math fix
#pragma message("FMA math fix")
^
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\5' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\26' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\7' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\2' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\2' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\16' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\260' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\2' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\16' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\342' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\36' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\16' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\342' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\250' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\250' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\240' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\10' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\36' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\1' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\36' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\34' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\36' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\377' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:2: error: stray '\377' in program
C:\Users\Ray-Me\Documents\Arduino\libraries\MIDIUSB\src\._MIDIUSB.cpp:1:9: error: 'Mac' does not name a type
exit status 1
Compilation error: exit status 1
Je précise que j'ai toute mes librairies à jour. Je ne comprends pas du tout ce qu'il se passe. Si quelqu'un pouvait m'expliquer.
Merci