home *** CD-ROM | disk | FTP | other *** search
- $include "pbasmlib.inc"
- $link "pbasmlib.pbl"
-
- 'PBASMLIB Demo #1
- '(C) Copyright 1993 by Tim Gerchmez
- 'All Rights Reserved.
- '
- 'Written 12/15/93, revised 2/94
- '
-
- fadeout 20
- cls
- locate 2,26:print "PBASMLIB Demo #1"
- locate 3,26:print "----------------"
- print:print "This is a demonstration of the SBFMPLAY routine in the PBASMLIB Sound"
- print "module. The Sound module lets you play FM synthesized music (all 9 voices)"
- print "directly from BASIC - without loading an external driver. This means that"
- print "you can use a command similar to PB's PLAY command, but play from the "
- print "Soundblaster rather than the PC speaker! PBASMLIB also includes hundreds "
- print "of other routines, all written in fast, tight assembly language for "
- print "unparallelled speed and power. You can interface directly to MS-DOS, the "
- print "ROM BIOS and the mouse driver, as well as perform many other low-level "
- print "functions with ease!"
- print
- print "(1) Edelweiss (5) Aloha Oe (9) Try to Remember"
- print "(2) We've Got Tonight (6) Born Free (A) Send in the Clowns"
- print "(3) Puff the Magic Dragon (7) Greensleeves (B) Memory"
- print "(4) Minuet (8) Let it be Me (C) Yesterday":print
- print "The Sound module in PBASMLIB adds only a bit over 8K of code to your"
- print "PowerBASIC program, yet gives you access to all the power of the"
- print "Soundblaster's FM music capabilities! You can also write programs that"
- print "TALK if you load the SB speech driver first.";
- fadein 20
-
- readypoint:
- while inkey$<>"":wend
- keypoint:
- do
- a$=inkey$
- loop while a$=""
- if a$=chr$(27) then fadeout 20:cls:blankin:end
- if sbdetect=0 then cls:print:print "Soundblaster required - sorry.":end
- if lcase$(a$)="a" then gosub clowns:goto keypoint
- if lcase$(a$)="b" then gosub memory:goto keypoint
- if lcase$(a$)="c" then gosub yesterday:goto keypoint
- if a$<"1" or a$>"9" then goto keypoint
- on val(a$) gosub edel,tonight,puff,minuet,aloha,born,green,beme,remember
- goto readypoint
-
-
- 'Greensleeves
- green:
- a$="p6n7d h8f r.g a b-a h0g r.e c d e h8f r.d d c#d h5e r.c#o4a r."
- b$=p$+"o5d h8f r.g a b-a h0g r.e c d e h8f e d h5c#o4b o5c#h8d r.r.r.r."
- c$="h3o6c r.c c o5b a h0g r.e c d e h8f r.d d c#d h5e r.c#o4a r.r."
- d$="o5h3o6c r.c c o5b a h0g r.e c d e h8f e d h5c#o4b o5c#h8d r.r.r.r."
- sbfmplay a$+b$+c$+d$
- return
-
- 'Minuet
- minuet:
- bar1$="t3o4w4h0g r.c d e f h0g r.c r.c r.h3a r.f g a b h0o5c r.o4c r.c r."
- bar2$="h4f r.g f e d h0e r.f e d c ":bar3$="o3b r.o4c d e c h4d r.r.r.r."
- bar4$="h4d r.e d c o3b o4h0c r.r.r.r."
- sbfmplay bar1$+bar2$+bar3$+bar1$+bar2$+bar4$
- return
-
- 'Ahoha Oe
- Aloha:
- bar1$="n7t0i1p5w6g h3a r.o6c r.f r.r.o5a h0g r.o6c r.e r.r.c "
- bar2$="o5h4b r2a b o6c d d f f o5h0o6e r.c r.o5g r.r."
- bar3$="o5h4b r.o6c r.e d o5b g h0o6c r.r.r."
- sbfmplay bar1$+bar2$+bar1$+bar3$
- return
-
- 'Puff the Magic Dragon
- puff:
- bar1$="n8s0t3h3w7f r3w4f w7f f hce r.c r.hid r.f f h3c r.r.c "
- bar2$="o4hib-b-o5c o4b-h3a o5c f w4f f "
- bar3$="w7h4f d e f h0g r.r.r."
- bar4$="w7h4d f h0e g h3f r.r.r."
- sbfmplay bar1$+bar2$+bar3$+bar1$+bar2$+bar4$
- return
-
- 'We've got tonight
- tonight:
- bar1$="p6s1n8o5b a g h4d r.rh1.r.r.b a g h0d d r.r.h1r.r."
- bar2$="b o6d o5b h4o6d r.rh0.r.r.e d c o5h4o6d r.r.o5h1o6r.r."
- bar3$="o5b o6d o5b h4o6d r.r.o5w2b a g w5r.r.h0r.r.b a g h4g r.r.r.r.r."
- sbfmplay bar1$+bar2$+bar1$+bar3$
- return
-
- 'Born free
- born:
- bar1$="p4w7n3n8t2h0o5c r.r.o4g r.r.h3r.r.g a g f h0e r.r.c r.r.h3r.r.g a g f h9b r.r.g r.e "
- bar2$="h4f r.f f e d h0e r.r.r.r.r.r.r.r."
- bar3$="h4g r.g g a g h4b r.r.r.r.r.r.r.r."
- bar4$="o5h8d r.r.o4a r.r.r.r.a b a g hce r.r.o5c r.r.r.r.c d o4a o5c h3d r.c d r.c h1d r.c d r.c h4d r.r.r.r.r.r.r.r."
- bar5$="h8o5c r.r.c r.r.o4h0o5c r.r.r.r.r.r.r.r."
- sbfmplay bar1$+bar2$+bar1$+bar3$+bar4$+bar1$+bar5$
- return
-
- 'Edelweiss
- edel:
- bar1$="i1n1h0e r.g h4o6d r.r.o5h0o6c r.o5g h3f r.r.h0e r."
- bar2$="e hce f g h8a r.r.h4g r.r."
- bar3$="g h4g a b h0o6c v2o5g v1o6v2o5e v1o5h0v2c v1o6r.r."
- bar4$="o5h4o6d o5g g b a g h0e r.g o6c r.r.o5h3a r.o6c o5h1o6d r.c o5h4b r.r.g r.r."
- bar5$="h0e r.g hbo6d r.r.o5h3o6c r.o5g haf r.r.h0e r."
- sbfmplay bar1$+bar2$+bar1$+bar3$+bar4$+bar5$+bar3$
- return
-
- 'Let it be me
-
- beme:
-
- bar1$="p7n7n2w4h3r.a a a h0o6x6c r.o5w2b-w4a g h8r.f g a x6hca r.w2g w4f e hir.d f g x6h3f r.c r.hbr.f h0f e h3f r.r.r."
- bar2$="hio6r.d d d o5hco6c r.o5a r.hir.o6d e d o5h3o6c r.o5a r.r.hbb-o6c d o5h3o6c r.o5f r.hir.f g a h5a r.r.r."
- sbfmplay bar1$+bar1$+bar2$+bar1$
- return
-
- 'Try to Remember
- remember:
-
- bar1$="h3n3n8w6a a a a g f hbo4b-b-b-h0b-o5c d "
- bar2$="w6h3c r.o4a o5f r.c hbd r.o4b-o5h0g d r."
- bar3$="w6o6hcc c c h8c o5b-a hbb-b-b-h0b-a g h3a a a hia g f hbg r.d h0e c r."
- bar4$="w6h3a f w4a f hia f a f a f w8h3a f r.r.r."
- sbfmplay bar1$+bar2$+bar1$+bar2$+bar3$+bar1$+bar4$
- return
-
- 'Send in the clowns
- clowns:
- bar1$="w8n1n8i2o4b-o5c f h3f r.r.r.hir.o4b-o5c f h3f r.r.r."
- bar2$="g a f g a a a r.r.r.a a o6c o5c hid r.r.r.r."
- bar3$="d f o4b-o5h0c r.r.r.r.d f e h3f r.r.r.r.r."
- sbfmplay bar1$+bar2$+bar3$
- return
-
- 'Memory
- memory:
-
- bar1$="v4i1v5i1v6i1v1i2t0s1w6n8h0o6c r.c r.r.r.o5b o6c d c o5a hco6c r.r.c r.r.r."
- bar2$="o5b o6c d c o5g h3a r.r.a r.r.r.f g a g f h9e r.r.r.r.r.r."
- bar3$="o5e g h8g r.r.d r.e f r.g a r.b hco6c o5b a g r.r.r.r."
- bar4$="o5e c h4g r.r.g r.r.r.r.o4a a b o5c h0c r.r.r.r.r."
- sbfmplay bar1$+bar2$+bar3$+bar4$
- return
-
- yesterday:
- bar0$="w6p5t3v4i1v5i1v6i1v1n3n8"
- bar1$="o4h3g w4f w6f r.r.r.r.h5r.r.a b o5w4c#w6d e f h8e r.d d r.r.r."
- bar2$="hir.r.d d h0c o4b-a g h3b-r.a a r.g r.h8f r.a r.h4g r.d r.hif r.h3a a r.r.r.r."
- bar3$="t3o4h5a r.r.r.a r.r.r.o5h8d r.e r.hif r.e d h0e r.r."
- bar4$="d w4c w6d r.w5r.w6o4h3a r.r.r.r.r.r."
- bar5$="d c r.e r.h3f r.c r.o4b-r.a r."
- bar6$="h8f r.a r.h4g r.d r.hif r.h3a a r.r.r.r.r.r."
- sbfmplay bar0$+bar1$+bar2$+bar1$+bar2$+bar3$+bar4$+bar3$+bar5$+bar1$+bar2$+bar6$
- return
-