eijifrey posted this topic originally. I was hoping to get some additional help on the code he wrote for reading a midi file from a SD reader and creating digital outputs. He posted his code in a posti back in October, 2022 with the same title as above. I am trying to figure out if there is a way to put a display on the arduino and select which file to play. Also how to connect a speaker to hear the midi file play. Thanks in advance for any assistance.
Can you supply a link to that topic please?
Did you get a chance to look at the project?
To do that you need a MIDI sound module to put the MIDI signals through. Something like this:-
Although it says it is for the FeatherWing then you can simply wire it up to any processor with a few extra components. This is a schematic you can use to turn it into a real MIDI input sound module.
Yes, just use an I2C OLED display, there are plenty on eBay. You will then need to read the SD card's directory (list of files) and then have some way of scrolling through the list as you can only get about 5 lines of text on these things. A rotary encoder is probably the best thing to use.
However, you should not expect this forum to write specific custom code for you unless you want to pay someone for doing it. If that is the case then I can move this post into the correct section for that.
He is still a forum member, so if you want to call him, or any other member, up then use an @ and his user name and he should receive a notification.
Like this @marco_c
Thanks for the response.
Ok, you got my attention ![]()
There are examples in the MD_MIDIFile library (Play_LCD and Play_LCD2) for listing the files and selecting from and LCD, so that may help.
Interfacing to outputs is shown in the PlayIO example and explained a bit more in this blog post, which may be a good place to start: https://arduinoplusplus.wordpress.com/2022/04/09/interfacing-midi-files-to-i-o-actuators/
Thanks. I modified your original program for 20 outputs. I have ordered some air valves to connect to the output.
I appreciate your help. I will work on the code for reading the files on the SD card. If I get it working will be glad to share.
Follow up. Reading the files from the sd card and driving the output works fine. Trying to figure out how to get the directory to appear on the tft display and select which one to play. If you have any ideas on where to start would be appreciated. Have a great day.
Well, the Play_LCD examples show how to get the files from the SD card. Once you have those you should be able to at least list them on the display.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
