Using Chat GPT AI to Code an Arduino MIDI Controller

Поделиться
HTML-код
  • Опубликовано: 4 июл 2024
  • 🎹 Nerd Musician Pro: go.musiconerd.com/nerd-musici...
    🎹 Curso Fazendo Música com Arduino em Português: go.musiconerd.com/fazendo-mus...
    👉 Chat GPT: chat.openai.com/
    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
    Instagram: / musiconerd
    Patreon: / nerdmusician
    Site: www.musiconerd.com
    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 コントローラーをコーディングする
  • ВидеоклипыВидеоклипы

Комментарии • 34

  • @KiahJones96
    @KiahJones96 9 месяцев назад

    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

  • @caiomurilopawilak6217
    @caiomurilopawilak6217 Год назад +1

    Parabéns pelo trabalho, Gustavo!

  • @Dr.SanjeevSaxena
    @Dr.SanjeevSaxena Год назад

    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...❤

  • @rivitheadlab2523
    @rivitheadlab2523 Год назад

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

  • @sandrainthesky1011
    @sandrainthesky1011 Год назад +1

    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.

  • @colintonks4060
    @colintonks4060 8 месяцев назад

    thank-you, super useful tutorial

  • @ForgottenSinner666
    @ForgottenSinner666 8 месяцев назад

    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 =)

  • @shik_tech
    @shik_tech Год назад

    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.

    • @NerdMusician
      @NerdMusician  Год назад +1

      I've been looking at the Open AI API and they use this model called Codex. It seems that it's most efficient with Python.
      What I did yesterday that showed a great result was pasting my own code before in Chat GPT and telling to use it as a template and only change certain variables when getting a prompt. It Worked perfeclty. So, it's a matter of fine tunning the model in what you want.

  • @kamiusu2360
    @kamiusu2360 Год назад

    Amazing) thank a lot)

  • @ImranAhmedMusic
    @ImranAhmedMusic Год назад

    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!

  • @rolfjohansen5376
    @rolfjohansen5376 Год назад +1

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

  • @wyldbylli4047
    @wyldbylli4047 Год назад

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

  • @kayboog2000
    @kayboog2000 Год назад +1

    OMG🤯

  • @sumitverma4044
    @sumitverma4044 Год назад

    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.

    • @NerdMusician
      @NerdMusician  Год назад

      Try here: Hairless Catalina
      github.com/projectgus/hairless-midiserial/issues/51?fbclid=IwAR0NHzDFxgooeNRH1Otq5OGzRWXXCGuIa66VsMJbg5Jd4k5HqllWCkDt4jM#issuecomment-552240866
      github.com/tyan0/hairless-midiserial
      github.com/tyan0/hairless-midiserial/releases/download/mod8/hairless-midiserial-0.4-mod8-M1Mac.zip

  • @felipemiranda6382
    @felipemiranda6382 Год назад

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

    • @NerdMusician
      @NerdMusician  Год назад

      Acabei de checar aquij e ta tudo bem: go.musiconerd.com/fazendo-musica-com-arduino

  • @giovannigripp3652
    @giovannigripp3652 8 месяцев назад

    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

    • @NerdMusician
      @NerdMusician  8 месяцев назад +1

      Costumo botar legendas nos meus vídeos, assim todos podem entender.

  • @juannauy4970
    @juannauy4970 Год назад

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

    • @NerdMusician
      @NerdMusician  Год назад

      Encoder won't work properly with a multiplexer, you need a I2C port expander or a board with more pins.

    • @juannauy4970
      @juannauy4970 Год назад

      @@NerdMusician thanks bro for respond, do you know if that affect the transmition velocity for each encoder?

  • @TheShoes43
    @TheShoes43 Год назад +1

    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

    • @sandrainthesky1011
      @sandrainthesky1011 Год назад

      Just use an analog switch 1:16 for example and scan over multiple pots. The same with buttons really then use the same routines two to handle them all. You could even pair the addresses between multiple analog switches. I would suggest though using interrupt style analog reads though to keep the flow in the mS range

  • @minkorrh
    @minkorrh Год назад

    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
    // 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
    MIDI_CREATE_DEFAULT_INSTANCE();
    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.

    • @danpedersen55
      @danpedersen55 Год назад +1

      You can use Arduino pro micro or Arduino Leonardo instead, as they have USB connection which can be recognized as a Midi controller, they both use atmega32u instead of atmega328, which Nano and Uno use.

  • @dsantos5526
    @dsantos5526 Год назад +1

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