Making things move musically - Control a servo with USB MIDI

Поделиться
HTML-код
  • Опубликовано: 16 янв 2023
  • In this tutorial, we'll go through the equipment, connections, and code to make a servo motor move with USB MIDI.
    To follow along here is the required equipment:
    www.amazon.com/shop/onehacker...
    ‪@goBILDA‬ Servo Used: www.gobilda.com/2000-series-d...
    I may make a small commission if you buy items through these links.
  • РазвлеченияРазвлечения

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

  • @hyperorbit
    @hyperorbit Год назад +4

    Wow I really appreciate you making some tutorials. This is gold.

  • @gearscodeandfire
    @gearscodeandfire 6 месяцев назад

    This is awesome, I'm finally beginning my aforementioned "deep dive" on your stuff from Instagram. Keep up the great work!

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

    Nice tutorial easy to follow

  • @sadandsentimental
    @sadandsentimental Год назад +2

    This is really great! I really enjoyed the Enter Sandman video too. I’d like to see ideas of how to raise the hi-hat up and down with solenoids or servos, and how to get servos to move with nuance… the way that a human might move a shaker for instance, with a fast stop and a slow return motion.

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

      Gotcha, yeah! I think controlling the speed over time would definitely make a good future topic. We could link it to the velocity data that comes in with MIDI note on messages.

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

      Thinking about hi-hats, besides the main solenoid to pull the top cymbal down, maybe a second solenoid could be used to control the angle of the bottom cymbal? Typically hi-hat stands have a screw that is used to set a permanent angle for the bottom cymbal, but that screw could be removed and a solenoid with a pin could be used to adjust the angle? Maybe Aaron has already tried this?

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

    this is epic.. learned a lot from you. thank you

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

    This is awesome! Keep making videos like this. I've been wanting to get into some projects like this and had no idea where to start. No I do xD

  • @zakklee2556
    @zakklee2556 6 месяцев назад

    Wow! more please.

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

    Great video! Yes please show controls for all the things: steppers, actuators, solenoids. Mark rober showed a piano with precision solenoids that can do hard or soft hits.

  • @raymondloomer5405
    @raymondloomer5405 7 месяцев назад

    nice

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

    This video is amazing! Your patience in explaining is admirable! How can we deal with multiple servos that respond to a preprogrammed drum midi track for a robot drummer? Will you make any video on that?

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

      Thank you! Yeah, I'm sure I'll do one getting into sequencing. I'm trying to break it down a little at a time to keep them not too long.

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

      @@onehackerband that’s a very nice idea! One step at the time

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

    nice!

  • @PauloRicardo-pp4ml
    @PauloRicardo-pp4ml Год назад

    cool

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

    I have a acoustic bass and I was looking for exactly this! In your setup with the bass, you have what looks like black and blue clamps, that attach to the neck of the bass guitar. Is that 3D printed? And how do you translate the notes into the left and right hand movements of the servos? One has to push down the string, the other has to pluck it. I have no idea how to program that. Could you make a video about all that? Or do you sell a kit or a tutorial, with all the detailed informations? I love your work! It seems like a lot of time and ingenuity went into it! Thank you so much, Thomas

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

      Thank you! Yeah, lots of the mounting hardware is 3D printed. I use a microcontroller to translate MIDI into servo positions. I recently did a beginners tutorial on getting servos moving with MIDI on my channel. I’ll get to some more advanced topics soon!

  • @pablohdz14
    @pablohdz14 5 месяцев назад

    Im very curious how do you put the servos into the piano?

  • @namcomamia21
    @namcomamia21 7 месяцев назад

    How could I change the code if I want to use the servo as the plucking mechanism of the guitar
    (I mean, for the first note, the servo would move to a position , and for the next note, the servo would move to another position)

    • @onehackerband
      @onehackerband  7 месяцев назад +1

      You’d need to store both positions as Ints use and a Boolean that tracks if the pick was last up or down. Use an if/else statement to check the Boolean condition, set it as the opposite in each and recall one position in the “if”, and the other in the “else”.

    • @namcomamia21
      @namcomamia21 5 месяцев назад

      Thanks
      Also, I wondered how could I use esp32 with midiusb?
      Should I download any libraries for it?

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

    10

  • @larryyneely5765
    @larryyneely5765 2 месяца назад

    I TRIED your code, but it won't compile, i keep geting errors

    • @onehackerband
      @onehackerband  2 месяца назад

      What board are you using? And what is the error?

    • @larryyneely5765
      @larryyneely5765 2 месяца назад

      @@onehackerband TEENSY 4.1 , AND A LEONARDO, but thats not the problem, i tried to copy the code that you created, but it won't compile, when i get to usbMIDI,thats where it goes off the rails. do you have a print of the code?

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

    This is almost what i'm looking for. I want to control the servo's with the midi sliders/faders. I've got an example : ruclips.net/video/2W60-hqMbVQ/видео.html i even got the code but it's based on serial. And i really want this to run on a teensy via usbMIDI and im unable to understand how to convert your program which works on my teensy into his script and make it usbmidi compatible. EDIT: This is solved!

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

      never mind! i just used a more then one note for 1 servo with different angles for each note. Thanks for this great and very clear tutorial!

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

      If you want something continuous/analog-like such as what a knob would give you, I'd use a CC. You can check for that type with usbMIDI.ControlChange. I think data1 would probably be the CC# and data2 would be the value, but you might want to check.

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

      @@onehackerband I already got it running and put it on my github. Many were searching for it. I also gave you some credit in the notes. Here is the result using the first method with multiple keys for different servo degree values. ruclips.net/video/Eh0sY5u-GfU/видео.html instead of using a 3d printer and design parts i just do glue and stuff i find around the house haha. Thnx again! Really looking forward for more of your content!