Playing Tunes on Parallax LCD
tomcrawford
Posts: 1,129
in Accessories
The Latest versions of Parallax Serial LCD include a Piezospeaker. It is possible to play recognizable tunes.
Attached is an object converting ABC notation (Follow this link) to commands sent to the LCD. It includes ABC notation for "Happy Birthday" and the verse of "Ashokan Farewell". Here are a few items I noticed:
1. The LCD will buffer a few tens of notes, so you can send a whole (short) song at once.
2. The LCD always puts a short rest after notes so you cannot play a dotted note (a dotted quarter note is played as three eighth notes). I increased them to the next-sized note.
3. The tunes are recognizable, but just barely.
Attached is an object converting ABC notation (Follow this link) to commands sent to the LCD. It includes ABC notation for "Happy Birthday" and the verse of "Ashokan Farewell". Here are a few items I noticed:
1. The LCD will buffer a few tens of notes, so you can send a whole (short) song at once.
2. The LCD always puts a short rest after notes so you cannot play a dotted note (a dotted quarter note is played as three eighth notes). I increased them to the next-sized note.
3. The tunes are recognizable, but just barely.
Comments
If I wanted an audio alert, I would send:
Do you know, was there a discussion of the uparmored LCD that I missed? Can you send me a pointer?
I'm not sure, someone else has an answer to that maybe.
Your code works great!
And I may be full of beans about text and sound simultaneously, could be BS2 coding I was thinking of. That was years ago I was referring to, and I knew less about programming.
I know one thing though, you can do a lot better than the piezo speaker that is on that LCD. I was testing about ten different salvaged piezo speakers last night for a robot project. The size has some difference in volume and tonal quality, and I found one the same size as the one on the back of the LCD, it has very noticeable difference in volume and quality compared to the others. Certain frequencies really stand out, (gets your attention). As far as the one on the LCD, it may be a question of what is driving it.
It will take me awhile to see what's going on in your code, but it sounds great.
As always I love the work you do, what was it you said? Anything worth doing, is worth overdoing. :thumb: