Это видео недоступно.
Сожалеем об этом.
Raspberry Pi Pico PIO - Ep. 17 - MIDI for the Pico
HTML-код
- Опубликовано: 17 авг 2024
- Join David as he dives into the gory details of MIDI (Musical Instrument Digital Interface) and uses it to play music on a Yamaha Tyros with a Raspberry Pi Pico.
Link to Program Files for Episode 17:
github.com/Lif...
Voltage level convertor video:
• Raspberry Pi Pico - Si...
PIO Episode 7 “C Trials”
• Raspberry Pi Pico PIO ...
6N138 optocoupler:
www.amazon.com...
Female MIDI connectors:
www.amazon.com...
MIDI cable:
www.amazon.com...
00:00 Introduction
00:38 Evolution of MIDI
02:45 How does MIDI work?
03:16 MIDI hardware
03:58 MIDI Signals
05:25 Building the Pico/MIDI interface
06:53 Receiving MIDI
09:24 Transmitting MIDI
10:40 PIO program
14:33 Playing notes
19:02 Playing a song
21:32 Closing
Music:
(Pinnacle 25 royalty-free music):
Pulsing Dance
House Fever
Reaction Time
City Night Groove
Yamaha Corporation
Tyros on board demonstration music 2002
Thank you for sharing the video. I have learned many things and this helps me in my masterwork.
Glad it was helpful! Thanks for watching!
Great video! I plan to tackle the PIO programming some day and your tutorial videos are excellent. Cheers from Sweden.
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!
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!
Awesome, thank you!
Great resource in case I need to redo the electronics on some dead midi controllers I just bought
Good luck; hope these help.
Thanks for all your videos about the Pico and PIO. For a future series please consider a project with the DMX lighting protocol.
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!
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!
That's a great idea! I think it would be really easy, one PIO for each MIDI in and one for the MIDI out.
@@LifewithDavid1 Thanks!
Nice content, thank you, David.
Thank you!
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.
Thanks for the tip. I'll consider those if I get deeper into MIDI design. Thanks for watching!
It has been very nice to learn from your videos, thank you!
@@fabiovsroque I'm glad they were helpful.. Thanks for watching!
I guess the keyboard uses key up rather than note off is to allow the note to sustain .
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).
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!
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!
Great video, thanks for sharing!
You're very welcome!
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?
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!
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.
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.
Thanks for sharing this, sir.
My pleasure!
Hi
Can you make source for music keyboard,
Please confirm us,
Thanks,
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.
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 ?
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.
@@LifewithDavid1 might need 2 based on location, control room, stage, usb : so 1 pico is usb host the other client ...
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
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!
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
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!