-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Midi feature and example #83
base: master
Are you sure you want to change the base?
Conversation
Fix load user code bug
Hi @Dr-Dawg I'm sorry it took longer. @ All |
Hi @baldram, glad to hear from you. No need to hurry, take your time. I'm sure someone will look over this as soon as he wants to use Midi features together with the library. |
order of switchToMp3Mode and loadDefaultVs1053Patches is changed
order of switchToMp3Mode and loadDefaultVs1053Patches is changed
order of switchToMp3Mode and loadDefaultVs1053Patches is changed
Fetched the latest library changes and changed the order of switchToMp3Mode and loadDefaultVs1053Patches in docs and two examples. |
I had some major issues with lost notes. The following logic was resolving my issues
|
Hey @pschatzmann so you tested the implementation. Sounds exciting! It's high time to merge this PR. What was the hardware you used (the ESP board and VS chip)? @Dr-Dawg what do you think about the eventual adjustment? |
The test was with an ES1002 based board and a cheap ESP32 devkit clone. |
So finally someone had a use for the MIDI code! :-) Anyway one should keep in mind, I encountered issues with VS1003 for some reason sometimes DREQ being ALWAYS down. |
@pschatzmann What data did you use to observe "lost notes"? Is it enough to use any basic example? |
I did my own example using my own API just playing notes: https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-vs1053/streams-midi-vs1053/streams-midi-vs1053.ino |
Just for sake of documenting this weird issue, the DREQ constantly low is a known bug in a older version of the RTMIDI patch for VS1003. My code would hang after changing the 0xA register to 0x30 because it was waiting for the DREQ permission to be down. Initialy I attempted to override the awaits without much success but then I found a more recent version of the firmware in the VSLI website that worked. However for some reason, it only worked after I sent it using the legacy version with two arrays containing registers and bytes instead of the compressed version. I tested it using an Arduino Mega with a VS1053/VS1003 LC Electronics board. |
Thanks a lot for the clarification, @varlen ! |
New function sendMidiMessage added to the library.
The example plays (pseudo-)random MIDI notes and instruements.
Tested with Arduino IDE and with ESP32 Devkitc V4 and ESP8266 NodeMCu V3 and VS1053 and VS1003 from LC Technology.
I'm not exactly sure, if setting VS1053 Start adress for the user code is really needed, maybe this is already done by the patch itself.