Weekly Qbasic and Qb64 Lesson Topics
October 12, 2024, 08:30:51 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

Play,and Sound

Pages: [1]
  Print  
Author Topic: Play,and Sound  (Read 291 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« on: January 19, 2011, 11:43:27 pm »

Ted, or "Clippy" at qb64, posted this for me on QB64, it is a good demo, of useing the sound, and data statements, also locate, and more...a very good demo, Thanks "Clippy"
---------code below--------------
Code:
SCREEN 13
OUT &H3C8, 0
OUT &H3C9, 0
OUT &H3C9, 0
OUT &H3C9, 20
COLOR 1
FOR i% = 1 TO 21
    LOCATE 2 + i%, 2: PRINT CHR$(178)
    LOCATE 2 + i%, 39: PRINT CHR$(178)
NEXT i%
FOR i% = 2 TO 39
    LOCATE 2, i%: PRINT CHR$(223)
    LOCATE 23, i%: PRINT CHR$(220)
NEXT i%
COLOR 9
LOCATE 3, 16: PRINT CHR$(34); "MY BONNIE"; CHR$(34)
SLEEP 3
FOR i% = 1 TO 34
    SELECT CASE i%
        CASE 1: LOCATE 5, 5
        CASE 10: LOCATE 10, 5
        CASE 18: LOCATE 15, 5
        CASE 27: LOCATE 20, 5
    END SELECT
    READ note%, duration%, word$
    SOUND note%, duration%: PRINT word$;
NEXT i%
DATA 392,8,"My ",659,8,"Bon-",587,8,"nie ",523,8,"lies ",587,8,"O-",523,8,"Ver ",440,8,"the "
DATA 392,8,"O-",330,32,"cean ",392,8,"My ",659,8,"Bon-",587,8,"nie ",523,8,"lies "
DATA 523,8,"O-",494,8,"ver ",523,8,"the ",587,40,"sea ",392,8,"My ",659,8,"Bon-",587,8,"nie"
DATA 523,8," lies ",587,8,"O-",523,8,"ver ",440,8,"the ",392,8,"O-",330,32,"cean ",392,8,"Oh "
DATA 440,8,"bring ",587,8,"back ",523,8,"my ",494,8,"Bon-",440,8,"nie ",494,8,"to ",523,32,"me..!"
SLEEP 2
LOCATE 23, 16: PRINT "Thank You!"
SLEEP 2
END   
-------------------end code---------
« Last Edit: April 13, 2012, 09:28:48 pm by GarrisonRicketson » Report Spam   Logged

Share on Facebook Share on Twitter


Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy