Replies: 2 comments
-
Same as discussion BLE-MIDI 93 |
Beta Was this translation helpful? Give feedback.
-
Here is what ChatGPT came up with (of what you can find if you search the web for Certainly! I'll guide you through creating an Arduino MIDI controller that uses a potentiometer to send MIDI Control Change (CC) messages. Requirements: Steps: GND pin of the potentiometer to the GND of Arduino. Go to Sketch -> Include Library -> Manage Libraries.
Upload the code: |
Beta Was this translation helpful? Give feedback.
-
Hi There,
I'm building a bluetooth midi controller using my ESP32-S3 board- spoiler alert, I am a hobbyist so my knowledge is limited at best.
The controller I'm building needs to send midi signal from 2x buttons, 2x B10K potentiometers and 2x rotary encoders. So far I have managed to get the bluetooth midi connection working fine and the 2 buttons are sending midi over bluetooth successfully, but I'm completely at a loss on how to code the pots and the rotary encoders. Could anyone assist me with this?
BOARD USED: ESP32-S3
POT1 PIN: 4
POT2 PIN: 5
BUTTON1 PIN: 6
BUTTON2 PIN: 7
ROTARY1a PIN: 15
ROTARY1b PIN: 16
ROTARY2a PIN: 17
ROTARY2b PIN: 18
Any help would be massively appreciated!
Here's my current code that includes the 2x buttons:
`#include <BLEMIDI_Transport.h>
#include <hardware/BLEMIDI_ESP32.h>
//BLEMIDI_CREATE_DEFAULT_INSTANCE()
BLEMIDI_CREATE_INSTANCE("FAM_INSTRUMENT", MIDI)
const int btnPin1 = 6;
const int btnPin2 = 7;
int midiNote;
int btnState;
int lastBtnState;
void setup() {
pinMode(btnPin1, INPUT_PULLUP);
pinMode(btnPin2, INPUT_PULLUP);
MIDI.begin();
}
void loop() {
lastBtnState = btnState;
btnState = digitalRead(btnPin1);
if(lastBtnState == 1 && btnState == 0){
MIDI.sendNoteOn(60, 127, 1);
delay(50);
}
else if(lastBtnState == 0 && btnState == 1){
MIDI.sendNoteOff(60, 0, 1);
delay(150);
}
lastBtnState = btnState;
btnState = digitalRead(btnPin2);
if(lastBtnState == 1 && btnState == 0){
MIDI.sendNoteOn(70, 127, 1);
delay(50);
}
else if(lastBtnState == 0 && btnState == 1){
MIDI.sendNoteOff(70, 0, 1);
delay(150);
}
}`
Thank you so much in advance for anyone taking the time to look at this and help me :)
Beta Was this translation helpful? Give feedback.
All reactions