You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
function beep(soundNumber, duration#, frequency)
length = frequency * duration#
size = 12 + (length * 4)
memblock = CreateMemblock(size)
SetMemblockByte(memblock, 0, 1)
SetMemblockByte(memblock, 1, 0)
SetMemblockByte(memblock, 2, 8)
SetMemblockByte(memblock, 3, 0)
SetMemblockInt(memblock, 4, frequency)
SetMemblockInt(memblock, 8, length)
for i = 12 to (size/4) - 4 step 4
SetMemblockInt(memblock, i, 255)
soundNumber = CreateSoundFromMemblock(1, memblock)
Login to post a reply