seeing though you liked that one heres another where you can cut out a section from a sample in milliseconds .
function cutsamplesection(snum,startpos,endpos)
mb = 1
make memblock from sound mb,snum
size = get memblock size(mb)
bytespersec = memblock dword(mb,8)*2
startpos = startpos * bytespersec / 1000
endpos = endpos * bytespersec / 1000
cutsize = endpos - startpos
if cutsize > size
exitfunction
endif
copy memblock mb,mb,startpos,28,cutsize
for i = cutsize to size- 1
write memblock byte mb,i,0
next i
make memblock 2,cutsize+28
copy memblock mb,2,0,0,cutsize
make sound from memblock snum ,2
delete memblock mb
delete memblock 2
endfunction
I was making a sample editor , but its starting to get difficult lol , will keep at it though.
chunks
nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.