The LittleV Graphics Library (LVGL) has some nice demo code. One example is a music player demo, it needs the latest version of LVGL. I was updating the VEXcode LVGL library repo today to the latest (7.11.0) and thought it might be fun to try the music player on the V5. Works quite nicely.
source the for project is here.
and if you want to change LVGL configuration, the vexcode lvgl library project is here.
No, it’s just the most recent demo that LVGL seems to use everywhere.
Just wanted to show, again, that VEXcode V5 Pro can easily use LVGL to create a more advanced UI.
Taran, speakers are not the only way to play music - any mechanical system that could generate vibrations in the audible frequency range could be used as a musical instrument:
Here is a simple Stepper Motor Music making tutorial with step-by-step build instructions, note frequency chart, and source code examples:
The biggest challenge would be to turn mp3 audio into midi format, but there are plenty of online mp3 to midi converters. And, coincidentally, LVGL music demo lv_demo_music, that James linked, comes with a spectrum analyser script spectrum.py that uses one of the popular python libraries for doing such conversions.
I think that, once you are done with LRT project, and given all these code examples and a small pile of noisy V5 motors, you should be able to tackle this music thing with ease.
What happened to the VEX three wire speaker?
I remember seeing it somewhere and was wondering if it was an official product and why it isn’t for sale.
Could you just connect a separate (not competition legal) speaker to the 3-wire ports and manually send analog data to it? I don’t know it it’s possible either to get a speaker that would work in the port or to manually send the analog waveform to it. It would be cool though.
you can’t do that, as we have explained before. The cortex used a dedicated connection for the speaker that was connected to a digital to analog converter, the cpu driving the 3wire ports on a V5 does not have that capability.
3-wire expander
8x MC29
Splice MC29 wires into 8 monotone speakers with different pitches
Connect MC29s to ADI expander
Write some code to play tones on the right speaker
Write some code to convert sound files to bleeps and bloops
???
Profit