主题:能用QB写一首歌吗?
mind
[专家分:0] 发布于 2005-08-09 17:45:00
我想用QB写一首曲.用它的那一些语句呀
回复列表 (共15个回复)
沙发
moz [专家分:37620] 发布于 2005-08-10 11:07:00
play
板凳
def [专家分:3380] 发布于 2005-08-13 22:00:00
QB7.1的程序用己蚀本编写可以支持续行符
3 楼
pyh2005 [专家分:40] 发布于 2005-08-14 13:36:00
可以试一下东方红
程序如下:
play "o3g4g8a8d2p32c4c8<a8>d2p32g4g4a8>c8<a8g4c4c8<a8>d2p32"
play "g4d4c4<b8a8g4>g4d4e8d8c4c8<a8>d8e8d8c8d8c8<b8aeg2"
4 楼
XX龟 [专家分:40] 发布于 2005-08-26 10:14:00
可以!只要你加个函数就可以了
5 楼
wangyunchaoPIG [专家分:130] 发布于 2007-05-04 17:06:00
可以用"PLAY"语句
可以看"南开大学出版社"的一本(名字我忘了)封面有一个地球,里面有更详细的介绍.
6 楼
天尝地酒 [专家分:870] 发布于 2007-08-08 09:35:00
可以用PLAY!
7 楼
mxalbert1996 [专家分:780] 发布于 2007-08-14 20:38:00
我这里有一个音乐盒的程序:
DECLARE SUB dreem ()
DECLARE SUB happy ()
DECLARE SUB tal ()
DECLARE SUB G ()
DECLARE SUB ff ()
DECLARE SUB win ()
DECLARE SUB one ()
DECLARE SUB two ()
DECLARE SUB three ()
DECLARE SUB four ()
COLOR 3
10 CLS
LOCATE 8, 26: PRINT "Music begining !"
LOCATE 10, 54: PRINT "(8) : A same song ."
LOCATE 9, 12: PRINT "music - - - (1) : Song and smile ."
LOCATE 9, 54: PRINT "(7) : Talimo River ."
LOCATE 10, 24: PRINT "(2) : Gulangyu seaside ."
LOCATE 11, 24: PRINT "(3) : Small i ."
LOCATE 11, 54: PRINT "(9) : Beautiful dream ."
LOCATE 12, 24: PRINT "(4) : Wins !"
LOCATE 12, 54: PRINT "(10) : Your music ."
LOCATE 13, 24: PRINT "(5) : Glad song !"
LOCATE 13, 54: PRINT "(11) : The end ."
LOCATE 14, 24: PRINT "(6) : From new land ."
INPUT " What ?", w$
IF w$ = "1" THEN CALL one: GOTO 10
IF w$ = "2" THEN CALL two: GOTO 10
IF w$ = "3" THEN CALL four: GOTO 10
IF w$ = "4" THEN CALL win: GOTO 10
IF w$ = "5" THEN CALL G: GOTO 10
IF w$ = "6" THEN CALL ff: GOTO 10
IF w$ = "7" THEN CALL tal: GOTO 10
IF w$ = "8" THEN CALL happy: GOTO 10
IF w$ = "9" THEN CALL dreem: GOTO 10
IF w$ = "10" THEN GOTO 20
IF w$ = "11" THEN END
IF w$ > "10" OR w$ < "1" THEN GOTO 10
20
DO
'PRINT INKEY$
a$ = INKEY$
IF a$ = "`" THEN GOTO 10
IF a$ = "1" THEN PLAY "o2c4"
IF a$ = "2" THEN PLAY "o2d4"
IF a$ = "3" THEN PLAY "o2e3"
IF a$ = "4" THEN PLAY "o2f4"
IF a$ = "5" THEN PLAY "o2g4"
IF a$ = "6" THEN PLAY "o2a4"
IF a$ = "7" THEN PLAY "o2b4"
IF a$ = "8" THEN PLAY "o3c4"
IF a$ = "9" THEN PLAY "o3d4"
IF a$ = "0" THEN PLAY "o3e4"
IF a$ = "q" OR a$ = "Q" THEN PLAY "o3f4"
IF a$ = "w" OR a$ = "W" THEN PLAY "o3g4"
IF a$ = "e" OR a$ = "E" THEN PLAY "o3a4"
IF a$ = "r" OR a$ = "R" THEN PLAY "o3b4"
IF a$ = "t" OR a$ = "T" THEN PLAY "o4c4"
IF a$ = "y" OR a$ = "Y" THEN PLAY "o4d4"
IF a$ = "u" OR a$ = "U" THEN PLAY "o4e4"
IF a$ = "i" OR a$ = "I" THEN PLAY "o4f4"
IF a$ = "o" OR a$ = "O" THEN PLAY "o4g4"
IF a$ = "p" OR a$ = "P" THEN PLAY "o4a4"
LOOP
GOTO 10
SUB dreem
PLAY "o4c8o3b8o4c8o3g3e3d8c8d8a2a4g8o4f8e8e8d8c8d8o3a8b8o4c1c8"
PLAY "o4c8o3b8o4c8o3g3e3d8c8d8a2a4g8b8a8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1d4d4d4e4g4a16g4p4o2g4a1a1o4c4c4c4c4o3a3b8o4c2c4c4c4c4o3a3b8o4c2d3d8d4d4c2d2o3b1b1o4c4c4c4c4o3a3b8o4c2c4c4c4c4o3a3b8o4c2d3d8d4c4o3b2g4b4a1a1"
END SUB
SUB tal
FOR i = 1 TO 2
PLAY "o3a8p20e8a8e8p32a8p20e8a8e8p32e4g8f16e16d4a4g8f16e16d16e16f16a16e1d8d16d16c8d16e16d8c16o2b16a16b16g8o3c8p8o2b16a16b16o3d16o2a16a16a16a16a8e8a16a16a16a16a8e8a8a16e16a8e8"
PLAY "o2a16a8a16a8o3f8e4c8d8e16e8d16o2b8o3c2o2a16a8a16a8o3f8e4c8d8e8d8c8o2b8o3c32o2a2a16a8a16a8o3f8e4c8d8e16e8d16c8o2b8o3c2o2a16a8a16a8o3f8e4c8d8e8d8c8o2b8a2a16a8a16a4a16a8a16a4a16a8a16a4a16a8b16o3c16d16o2b16o3c16o2b16o3c16o2b16g16a4a16a8a16a4a16a8a16a8a8a16a8b16o3c16d16o2b16o3c16o2b16o3c16o2b16g16"
PLAY "a4o3a1e4g8f16e16d4a4g8f16e16d16e16f16a16e1d8d8c8d16e16d8c16o2b16a16b16g8o3c8p8o2b16a16b16o3d16o2a2o3"
NEXT
END SUB
SUB three
PLAY "o3"
PLAY "c2"
PLAY "e4"
PLAY "d8"
PLAY "c4"
PLAY "g4"
PLAY "f8"
PLAY "e4"
PLAY "d8"
PLAY "c4"
END SUB
SUB two
PLAY "o3e8f8"
FOR i = 1 TO 3
PLAY "g8a8a8g8g8e8p8g8g8e8e8d8o2a2g8b4o3c8d4e4c3p4"
PLAY "g8a8a8g8g8e8e8d8c3o2g8g2a8a4g8o3d8e8f8e8d2p4"
PLAY "g8a8a8g8g8e8e8d8c3o2a8a2g8b4o3c8de4c2p8"
PLAY "c8a4a8b8o4c3d8c6o3g16g2g8c8f4f8a8o4c3d8"
PLAY "c6o3g16g2g8a8a8g8g8e8e4p8g8g8e8e8d8d2"
PLAY "e8f8e8d8o2a2g8b4o3c8d4e4c2"
NEXT
END SUB
SUB win
PLAY "o4c2e2g2f8p8e8p8d8p8c8p8c2c6c16d2d6d16e2e8c8d8e8f8e8f8g8a8g8a8b8o5c2c8o4c8d8e8f8e8f8g8a8g8a8b8o5c2c8p3"
END SUB
9 楼
igdx [专家分:110] 发布于 2007-08-15 14:36:00
会乐理啦
10 楼
yfyf [专家分:440] 发布于 2007-08-15 18:39:00
欢乐颂:
play "e8e8f8g8g8f8e8d8c8c8d8e8e4d16d16e8e8f8g8g8f8e8d8c8c8d8e8d4c16c1"
play "d8d8e8c8d4e16f16e8c8d8e8f8e8d8c8d8g8e8e8e8f8g8g8f8e8d8c8c8d8e8d4c8c1"
我来回复