Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NN0401.ZIP
Filename : MUSIC.PRG
* Greg Lief
* It is my fervent hope that this article leaves you inspired to
* experiment with music in your Clipper applications. I shall bid you
* adieu with this familiar ditty:
PRIVATE tonestr, durstr, note_no
* Tonestr holds the frequency values.
tonestr = '659587523587659622659523587587587587'
tonestr = tonestr + '587523493523587554587493523523523523'
tonestr = tonestr + '392415440415392415440415392587587587'
tonestr = tonestr + '392415440415392415440415392659659659'
tonestr = tonestr + '659587523587659622659523587587587587'
tonestr = tonestr + '587415440587659784'
* Durstr holds the duration values.
durstr = '030102020202020202020210030102020202020202020210'
durstr = durstr + '03010301030103010202021003010301030103'
durstr = durstr + '01020202100301020202020202020202100202'
durstr = durstr + '02060414'
FOR note_no = 1 TO 66
TONE(VAL(SUBSTR(tonestr, (note_no - 1) * 3 + 1, 3)), ;
VAL(SUBSTR(durstr, (note_no - 1) * 2 + 1, 2)))
NEXT
* That's all, folks!
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/