18 lines I think. Will load a sound and create a visualisation from it, just like Windows Media Player. Of course, it's not that pretty but shows it can be done
If you have DBP then there's no need for media (see code). Press space to repeat sound.
Thanks to Van-B for showing me how to use sounds and memblocks through that excellent waveform code
rem Load the sound to be used
load sound "C:\program files\Dark Basic Software\Dark Basic Professional\Media\Sounds\Aliens\Kamikazi.wav",1
rem Make waveform to show user and set up memblocks
sync rate 0 : make memblock from sound 1,1 : sndlen=get memblock size(1)
do
play sound 1 : start = timer()
do
rem Clear screen
cls
rem Get length of sound in SECONDS
secs = int((sndlen / (sound speed(1))))
rem Get the elapsed time in MILLISECONDS
elapsed = timer()-start
rem Get the stepvalue between each millisecond
stepval# = (sndlen / secs)/1000
rem Get the current position based on stepvalue
p = int(elapsed * stepval#)
rem Do not get info if past end of sound
if p
You are the http://s15.sitemeter.com/meter.asp?site=s15dtsig[/img]th person to view this signature.
Programmers don't die, they just Gosub without return....