Raspberry Pi Pico PIO - Ep. 17 - MIDI for the Pico

Поділитися
Вставка
  • Опубліковано 25 сер 2024

КОМЕНТАРІ • 40

  • @haryoulimohamed3891
    @haryoulimohamed3891 3 місяці тому

    Thank you for sharing the video. I have learned many things and this helps me in my masterwork.

    • @LifewithDavid1
      @LifewithDavid1  3 місяці тому

      Glad it was helpful! Thanks for watching!

  • @MeeBilt
    @MeeBilt Рік тому +1

    Great video! I plan to tackle the PIO programming some day and your tutorial videos are excellent. Cheers from Sweden.

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +2

      Thank you very much and thanks for watching. Visiting Sweden by ocean cruising ship was one of my all time favorite things, Arriving in Stockholm through the archipelago was awesome!

  • @YeaSeb.
    @YeaSeb. Місяць тому

    Great resource in case I need to redo the electronics on some dead midi controllers I just bought

  • @Ololoshize
    @Ololoshize Рік тому +1

    Nice content, thank you, David.

  • @evoprox1
    @evoprox1 Рік тому

    Some great coding there with good explanations, thanks a bunch! Looking forward to your next video on Midi and other time critical code on the Pico. Keep it up!

  • @laurieinjapan
    @laurieinjapan Рік тому

    Great video, thanks for sharing!

  • @goowatch
    @goowatch Рік тому

    Thanks for all your videos about the Pico and PIO. For a future series please consider a project with the DMX lighting protocol.

    • @LifewithDavid1
      @LifewithDavid1  Рік тому

      That would be interesting. That would be a whole new subject for me; I don't have any experience with DMX. I'm not sure I could do it justice; but I'll put it on the list of potential videos. Thanks for watching!

  • @rogrevs
    @rogrevs Рік тому +2

    Thanks for another great video on PIO. I have been messing about with MIDI recently and wondering about using a Pico to merge 2 or more MIDI input signals into one output signal. What I want to do is mix the output from a MIDI keyboard or sequencer (providing note instructions) with the output of one or more midi controllers (providing cc instructions) to create a single MIDI stream that can control an experimental digital synthesizer. The information you have presented looks like a good starting point!

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +1

      That's a great idea! I think it would be really easy, one PIO for each MIDI in and one for the MIDI out.

    • @rogrevs
      @rogrevs Рік тому

      @@LifewithDavid1 Thanks!

  • @geroblacksmith
    @geroblacksmith 11 місяців тому

    Thanks for sharing this, sir.

  • @fabiovsroque
    @fabiovsroque Рік тому +1

    I am not using the 6N138 anymore, now I am using the 6N137, it has a NAND port at the output, and is way faster, giving you a nice sharp edged sinal.

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +1

      Thanks for the tip. I'll consider those if I get deeper into MIDI design. Thanks for watching!

    • @fabiovsroque
      @fabiovsroque Рік тому

      It has been very nice to learn from your videos, thank you!

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +1

      @@fabiovsroque I'm glad they were helpful.. Thanks for watching!

  • @wktodd
    @wktodd Рік тому +2

    I guess the keyboard uses key up rather than note off is to allow the note to sustain .

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +1

      I was a little surprised to see that; but looking at the MIDI files, I can see why they do it. I'm still studying it; but you can use one note-on command and then string a bunch of on and off notes together using just two bytes per note (one for pitch and one for velocity).

  • @pedropig
    @pedropig Місяць тому

    Maybe I’ve missed something, but what does the 0x100 appended to each on/off message actually do? I can’t find a reference to it elsewhere. Thanks for any help!

    • @LifewithDavid1
      @LifewithDavid1  Місяць тому

      I'm sorry, it WAS a little vague. Check out lines 58 through 64 of the PIO program (about 14:06 in the video), I used uint (32 bit word) instead of an unsigned character (8 bits) because I wanted to transmit 0x00 to signify the end of the midi event. Since I'm only transmitting the least significant 8 bits of the 32 bit word (the ninth bit is set), it was just an easy way to flag the end of the midi event while still transmitting a null character. Hope this helps. Thanks for watching!

  • @jayfagerlie3369
    @jayfagerlie3369 Рік тому

    What about a simple UART RX function that waits for a MIDI Program change (0XC0 to 0XCF) ?
    and maps that to a 1-128 (0-127) memory location?

    • @LifewithDavid1
      @LifewithDavid1  Рік тому

      Thanks for the suggestion! That should be pretty easy. I was hoping to make a MIDI recorder, but I've gotten side-tracked with bare metal assembly programming on the RP2040. Maybe I can combine everything after I learn assembly on the Pico! Thanks for watching!

  • @ezion67
    @ezion67 Рік тому

    Thanks for this series, makes the whole PIO thing a lot easier accessible.
    You don't need a level shifter for Midi. Midi uses a current loop of 5 to 7mA. You can drive Midi Out at other voltages than 5V just by changing the resistor values.
    The Midi input 6n138 opto is quite happy to work at 3V. No changes needed, though you might want to add 4k7 from pin 7 to ground.
    Think it might even be possible to have the PIO state machine sort out things like running status and system real-time messages. That could make things a lot easier for the main program.

    • @LifewithDavid1
      @LifewithDavid1  Рік тому

      Thanks for the info; I was kind of wondering about that. When I make videos; I go a little conservative because I don't want to blow up anybody's Pico.
      I have to think about it a little more, but I hope PIO can do a little more. However, I've been experimenting with MicroPython; and I'm impressed how fast it actually is. More to follow.

  • @louaibeiruti6681
    @louaibeiruti6681 Рік тому

    Hi
    Can you make source for music keyboard,
    Please confirm us,
    Thanks,

    • @LifewithDavid1
      @LifewithDavid1  Рік тому

      The files and sources for materials are listed in the description. The actual keyboard is over 10 years old and is a Yamaha Tyros 1.

  • @jyvben1520
    @jyvben1520 Рік тому

    Wow, C++ part too complex for me, but excellent visuals, great intro for anyone trying midi.
    so the pico could record when receiving midi data, 2 picos could be used to test wiring with passthru to midi device/synth.
    remote test pico sends to second pico+synth, after local test which tests wiring from second pico to synth.
    midi is also used for lighting effects/motor control. Other pins on Din connector for extra channels / loopback debugging ?

    • @LifewithDavid1
      @LifewithDavid1  Рік тому

      That's a very interesting project. In fact, it could all be done with one Pico. There are eight PIO state machines, each can run a separate program. Those 8 plus the 2 on-board UARTs give 10 independent serial interfaces that the little Pico can manage. It also has two cores that can run independently.
      I don't know about using the extra pins for any other functions. MIDI cables only have 2 conductors and a shield. I think the industry is moving toward MIDI 2.0 including USB and Ethernet. However, the old school DIN cables will be with us forever; MIDI 2.0 is backward compatible with 1.0.

    • @jyvben1520
      @jyvben1520 Рік тому

      @@LifewithDavid1 might need 2 based on location, control room, stage, usb : so 1 pico is usb host the other client ...

  • @kwankunghkg
    @kwankunghkg Рік тому

    Thank You David Very Much for Sharing, very detail explanation of signal level MIDI implementation with Pico PIO . catch your video while studying DIY FPGA MIDI synthesizer & DAW/VST software (e.g. MIDI-OX , Ableton ) . Thinking about Rpi 7" touch screen for DIY LaunchPad ... (ee maker from HK)
    ref :
    MIDI for the Arduino / Notes and Volts
    youtube / playlist?list=PL4_gPbvyebyH2xfPXePHtx8gK5zPBrVkg

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +1

      Sounds like a neat project. I was thinking about doing something like that; but the siren song of assembly language has lured me to other places for now. Good luck!

  • @manuelr7121
    @manuelr7121 Рік тому

    im learning to repair electronics mostly musical stuff like amps and own a bunch of pi picos so this is really intresting,the only problem is i cant program in c or c++ only in python , and don t have time to learn

    • @LifewithDavid1
      @LifewithDavid1  Рік тому +1

      MicroPython would work for for what I did during this video. It might even work for simple songs; I'll have to look into it. Thanks for watching!