Example
dur1 con 2
dur2 con 1
nA con 440
nB con 494
nC con 523
nD con 587
nE con 659
nF con 698
nG con 784
nA2 con 880
sound8 outl,[dur1\nc\ne\ng,dur2\nf\na\nc\a2]
This program first defines nA – nA2 as the musical notes (equal tempered scale) A, B, C… A2 respectively. Then it plays the chord C-E-G for 2 seconds (on pins P0 to P2), followed by the chord F-A-C-A2 for one second (on pins P0 to P3). The remaining pins on the port remain silent. Of course, flats and sharps can also be defined; a quick internet search will give you the frequencies you need.