Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The sound effect thread
#1
Hello everyone,

I thought this would be a nifty place to pop some routines to make sound effects without resorting to asm.

Code:
sub soundBwop()

    dim x, y as uByte

    do until x = 255

        out 254, (y * 8)

        let y = x

        do until y > 239

            let y = y + 16

        loop

        let x = x + 1

    loop

end sub

Which makes a nice 'bwop' sound. it'll also change your border colour, so add the border value to the out statement to stop it changing colour. For example, for the a blue border:
Code:
out 254, (y * 8) + 1

You can play around with this, such as changing the 16 for an 8, or making y count down so the loop duration gets longer each time.

Steve
Reply


Messages In This Thread
The sound effect thread - by worcestersource - 02-19-2022, 12:03 AM
RE: The sound effect thread - by boriel - 02-19-2022, 11:31 AM
RE: The sound effect thread - by Jbizzel - 02-20-2022, 09:42 PM
RE: The sound effect thread - by worcestersource - 02-23-2022, 02:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)