Auto play Sound then auto exit
You can play a wav file, for sound using this.
REM
DEFLNG A-Z
wav1& = _SNDOPEN("anywavfile.wav", "sync,vol")
_SNDVOL wav1&, 0.9
t1 = _FREETIMER
ON TIMER(t1, 10) GOSUB Finish 'the "10" is 10 seconds
TIMER(t1) ON
PRINT "This is my wav sound or music""
DO
IF NOT _SNDPLAYING(wav1&) THEN
_SNDPLAY wav1&
END IF
LOOP WHILE Done = 0
TIMER(t1) OFF
TIMER(t1) FREE
_SNDSTOP wav1&
_SNDCLOSE wav1&
SLEEP 1
SYSTEM
Finish:
Done = 1
RETURN
Use any WAV file,where it says, "anywavfile.wav" The wav will continue to be played until on timer auto end is reached.
Be sure to change the name to the name of the file you use,
Also the file must be in the same folder as QB64.
______________----__________________________---___--------
Garry mentioned MIDI tunes & I remembered Barry Taylor who produced some 500 MIDI works of high quality. He did the traditional music of England, Scotland, Ireland, Canada, America... Link is:
http://www.contemplator.com/tunebook/A lot of MIDI stuff is rather stilted and lacking in feeling but this is good stuff because Barry Taylor has the gift.
--Quark