Shop OBEX P1 Docs P2 Docs Learn Events
Playing Tunes on Parallax LCD — Parallax Forums

Playing Tunes on Parallax LCD

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.

Comments

  • Tom, if I remember right you can't play tunes @ 19_200, I may be wrong but there was some reason you couldn't display text and play tunes at the same time. Please correct me if I'm wrong, because it would be nice to have your attention directed to the display with audio alerts.
  • MikeDYur wrote: »
    Tom, if I remember right you can't play tunes @ 19_200, I may be wrong but there was some reason you couldn't display text and play tunes at the same time. Please correct me if I'm wrong, because it would be nice to have your attention directed to the display with audio alerts.
    The LCD I have (sample of one) plays fine at 19200. And I can intersperse text and notes. The text is displayed as received, the notes are buffered.

    If I wanted an audio alert, I would send:
    214:  Whole note
    217:  Fifth scale
    222:  B (988 Hz)
    

    Do you know, was there a discussion of the uparmored LCD that I missed? Can you send me a pointer?
  • MikeDYurMikeDYur Posts: 2,176
    edited 2016-11-14 22:45
    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:
  • BTW: These have good sound, but you pay for that in the large size.
    2048 x 1152 - 805K
Sign In or Register to comment.