Using Chat GPT AI to Code an Arduino MIDI Controller

preview_player
Показать описание

In this video, I'm going to code a MIDI controller only using Chat GPT AI to generate the code for me. Only through the use of text prompts, it will generate Arduino code for making an Arduino MIDI controller!
Btw, even the Thumbnail of this video was made using Midjourney's AI.

0:00 Intro
0:38 What is Chat GPT
2:23 Blink
2:29 Buttons
9:00 Potentiometers
16:25 Done
17:56 Final Thoughts



Translated titles:
Usando Chat GPT AI para codificar un controlador Arduino MIDI

Verwenden von Chat GPT AI zum Codieren eines Arduino MIDI-Controllers

Utilisation de Chat GPT AI pour coder un contrôleur MIDI Arduino

Usando Chat GPT AI para codificar um controlador Arduino MIDI

Arduino MIDI नियंत्रक को कोड करने के लिए Chat GPT AI क

使用 Chat GPT AI 编写 Arduino MIDI 控制器

Chat GPT AI を使用して Arduino MIDI コントローラーをコーディングする
Рекомендации по теме
Комментарии
Автор

Love your stuff man, you just make this stuff that seems inaccessible so simple. I really appreciate it. Also love that tim and eric clip in the beginning lol

KiahJones
Автор

I've just started following you... I must say your content is unique and quite encouraging me to dive deeper into understanding Midi and related programming skills.
I'm gonna wet my hands soon...❤

Dr.SanjeevSaxena
Автор

Thanks for covering this. I had a conversation with the cashier at the huge store and he recommended it.

rivitheadlab
Автор

It will get better with time I’m sure! I think a very good description would make it work more accurately thanks for posting this very interesting test of the system.

sandrainthesky
Автор

Watched almost all your videos =)
Thank you, I found answers to all my questions and solved all my current problems. Chat gpt is a real time saver, it is a good teacher and a helper who is always ready!
Thank you for your work, for helping interested people! good luck, we are waiting for your new projects =)

ForgottenSinner
Автор

Great video!
I also tried to do the same but found out just like you, it is great for starters and not for complex programming. Knowing what to ask from it might be the key for getting the right answer.
I think a dedicated AI machine for programming might be available in the near future.

shik_tech
Автор

ahh man you are still the boss!! your videos have been very inspiring. Btw, does hairless work now on the newer macs after they stopped support for 32 bit softwares? it didn't work the last time i checked, would be a great favor if you can shed some light on this issue. I'm using a macbook pro with m1 pro chop. I am stuck with this laptop and would love to continue exploring the craziness. Thank you!! LOVE YOUR CHANNEL!

ImranAhmedMusic
Автор

can Arduino be programmed with Python instead of c/c++ ?

rolfjohansen
Автор

Didn't even think of this. I did get close to getting it to program my td 3 lul.

wyldbylli
Автор

Oi, Gustavo! Tudo bem? O Link para curso em português está off no post do blog. Pode checar?

felipemiranda
Автор

hi, awesome video, can i have 10 encoder on an arduino with less pins (for example with an multiplexer)?

juannauy
Автор

Hi, Thanks for sharing this video. Looks very useful. A very quick, question. I saw you are using Hairless Midi I recently tried it on my mac with Monterey but it's not supported. Please guide me on how I can use this on my machine. I would be very glad for your help.

sumitverma
Автор

Parabéns... Mas poderia fazer esses mesmos vídeos em português, pois tem mais brasileiros carentes dessa informação do que os gringos. Vc é brasileiro

giovannigripp
Автор

Hello sir i have watched many of your videos and am building a midi board with your lib.. Its so useful and easy to use. One thing i was going to ask is there somewhere where you talk about chaining many mux multiplexors together? I didnt know if your course just showed how to do it with one or many? I would like to run about 100 buttons and 20 sliders :o. also in your lib do you have to use a creatin multiplexor? i see you using a library for a specific one? lastly is there a discord or something to discuss? Again thank you so much for all your tutorials

TheShoes
Автор

I tried this and asked "write code for a midi controller that has 4 momentary switches using an arduino nano"

this is the result:
As an AI language model, I cannot write codes independently yet, but I can provide a sample code that implements a midi controller using an Arduino Nano with four momentary switches.

scss

#include <MIDI.h>

// set pin numbers for buttons
int buttonPin1 = 2; // digital pin 2
int buttonPin2 = 3; // digital pin 3
int buttonPin3 = 4; // digital pin 4
int buttonPin4 = 5; // digital pin 5

// set up MIDI interface


void setup() {
// set button pins as inputs
pinMode(buttonPin1, INPUT_PULLUP);
pinMode(buttonPin2, INPUT_PULLUP);
pinMode(buttonPin3, INPUT_PULLUP);
pinMode(buttonPin4, INPUT_PULLUP);

// start MIDI interface
MIDI.begin();
}

void loop() {
// check button states
int button1State = digitalRead(buttonPin1);
int button2State = digitalRead(buttonPin2);
int button3State = digitalRead(buttonPin3);
int button4State = digitalRead(buttonPin4);

// send MIDI messages when a button is pressed
if (button1State == LOW) {
MIDI.sendNoteOn(60, 127, 1); //note 60, velocity 127, channel 1
delay(100);
MIDI.sendNoteOff(60, 0, 1); //note 60, velocity 0, channel 1
}

if (button2State == LOW) {
MIDI.sendNoteOn(62, 127, 1); //note 62, velocity 127, channel 1
delay(100);
MIDI.sendNoteOff(62, 0, 1); //note 62, velocity 0, channel 1
}

if (button3State == LOW) {
MIDI.sendNoteOn(64, 127, 1); //note 64, velocity 127, channel 1
delay(100);
MIDI.sendNoteOff(64, 0, 1); //note 64, velocity 0, channel 1
}

if (button4State == LOW) {
MIDI.sendNoteOn(65, 127, 1); //note 65, velocity 127, channel 1
delay(100);
MIDI.sendNoteOff(65, 0, 1); //note 65, velocity 0, channel 1
}
}

In this code, the MIDI library is used to interface with the MIDI device. The buttonPin variables are set to the pin numbers where the buttons are connected to. In the setup() function, the button pins are set as inputs with pull-up resistors, and the MIDI interface is started using the MIDI.begin() function.

In the loop() function, the state of each button is checked using digitalRead(). If a button is pressed (i.e. its state is LOW), a MIDI message is sent using the MIDI.sendNoteOn() function, with the appropriate note, velocity, and channel values. A brief delay is added before sending a MIDI.sendNoteOff() message to turn off the note. This way, the MIDI device can differentiate between a note being played and a note being released.

The example code above should work as a starting point for building a MIDI controller using an Arduino Nano with four momentary switches. You may adjust this code based on your project's specific requirements.


/end CHATGPT


I haven't tried it yet as I have no idea it will work, but I'm about to start breadboarding. I need to qualify the USB in ChatGPT which I forgot to do.

OK, even ChatGPT thinks using a Nano with USB connectivity is a chore. I'll break down and buy a Teensy board. It would be interesting to learn but I'm not a coder outside of html, css, and basic Javascript and don't have the desire or time to muddle through this and pull more hair out.

minkorrh
Автор

Poxa cara, tu manda um aviso pra mim pra assistir um vídeo em inglês? Ah mano, vai te catar!!!

dsantos