Jump to content



0

Looking for a sound routine


4 replies to this topic

#1 Vorticon OFFLINE  

Vorticon

    Moonsweeper

  • 494 posts
  • Location:St. Paul, MN, USA

Posted Thu Oct 13, 2011 1:20 PM

Hi.

I'm looking for an XB sound routine that generates the sound of a cannon. I am terrible at this sort of stuff, so if anyone here has something along these lines, would you mind sharing it?
I also need one with sounds of swords clashing, but if I recall correctly, 99'er magazine had a sound article that included this very particular sound pattern. I'll see if I can locate it.
In case you're wondering, I've decided to create a new XB game between now and Faire time so I can have something interesting to present because unfortunately it does not look like Ultimate Planet is going to make it in time (not even close). It's going to be quite a squeeze, but I think I can make it given how speedy XB programming can be. Forth would have been nice, but I don't have a good grasp of it yet...

#2 Willsy OFFLINE  

Willsy

    Dragonstomper

  • 765 posts
  • Location:Uzbekistan (no, really!)

Posted Thu Oct 13, 2011 2:04 PM

Can you bring what you have so far of Ultimate Planet? I'm sure plenty of people would like a proper demo of it, myself included!

Mark

#3 adamantyr OFFLINE  

adamantyr

    Moonsweeper

  • 424 posts

Posted Thu Oct 13, 2011 2:23 PM

View PostVorticon, on Thu Oct 13, 2011 1:20 PM, said:

I'm looking for an XB sound routine that generates the sound of a cannon. I am terrible at this sort of stuff, so if anyone here has something along these lines, would you mind sharing it?

The best way to craft sounds is to think about what they're made up of. A cannon is an explosive "whuf" sound, followed by a high-pitched whine of the cannon ball, going from high to low as it approaches the target.

The explosion can be done just using the noise generator:

100 FOR I=0 TO 30 STEP 5
110 CALL SOUND(-200,-7,I)
120 NEXT I

The high-pitched whine is a little more difficult, as BASIC will tend to stutter a bit... try this:

130 FOR I=1 TO 10
140 CALL SOUND(-500,2000-(I^3),0)
150 NEXT I

The trick here is to start at a very high sound, but descend at an exponential rate, but still only have around 10-20 sound changes to make it fairly fast. Or you can just forgo the whine sound and stick with the explosion too, maybe add a reverb effect to it instead.

View PostVorticon, on Thu Oct 13, 2011 1:20 PM, said:

I also need one with sounds of swords clashing, but if I recall correctly, 99'er magazine had a sound article that included this very particular sound pattern. I'll see if I can locate it.

Yes, I've read the same article, but it's easy to recreate here. What you need is to use the multiple voices at high pitches, each slightly different, and have it fade over time:

100 FOR I=0 TO 30 STEP 6
110 CALL SOUND(-100,3000,I,2000,I,1000,I)
120 NEXT I

The fun of sound effects is playing around until you find the right ones!

Adamantyr

Edited by adamantyr, Thu Oct 13, 2011 2:23 PM.


#4 Vorticon OFFLINE  

Vorticon

    Moonsweeper

  • 494 posts
  • Location:St. Paul, MN, USA

Posted Thu Oct 13, 2011 2:24 PM

View PostWillsy, on Thu Oct 13, 2011 2:04 PM, said:

Can you bring what you have so far of Ultimate Planet? I'm sure plenty of people would like a proper demo of it, myself included!

Mark
Sure.

#5 Vorticon OFFLINE  

Vorticon

    Moonsweeper

  • 494 posts
  • Location:St. Paul, MN, USA

Posted Thu Oct 13, 2011 2:27 PM

View Postadamantyr, on Thu Oct 13, 2011 2:23 PM, said:

View PostVorticon, on Thu Oct 13, 2011 1:20 PM, said:

I'm looking for an XB sound routine that generates the sound of a cannon. I am terrible at this sort of stuff, so if anyone here has something along these lines, would you mind sharing it?

The best way to craft sounds is to think about what they're made up of. A cannon is an explosive "whuf" sound, followed by a high-pitched whine of the cannon ball, going from high to low as it approaches the target.

The explosion can be done just using the noise generator:

100 FOR I=0 TO 30 STEP 5
110 CALL SOUND(-200,-7,I)
120 NEXT I

The high-pitched whine is a little more difficult, as BASIC will tend to stutter a bit... try this:

130 FOR I=1 TO 10
140 CALL SOUND(-500,2000-(I^3),0)
150 NEXT I

The trick here is to start at a very high sound, but descend at an exponential rate, but still only have around 10-20 sound changes to make it fairly fast. Or you can just forgo the whine sound and stick with the explosion too, maybe add a reverb effect to it instead.

View PostVorticon, on Thu Oct 13, 2011 1:20 PM, said:

I also need one with sounds of swords clashing, but if I recall correctly, 99'er magazine had a sound article that included this very particular sound pattern. I'll see if I can locate it.

Yes, I've read the same article, but it's easy to recreate here. What you need is to use the multiple voices at high pitches, each slightly different, and have it fade over time:

100 FOR I=0 TO 30 STEP 6
110 CALL SOUND(-100,3000,I,2000,I,1000,I)
120 NEXT I

The fun of sound effects is playing around until you find the right ones!

Adamantyr

Thanks! I'll try these out tonight.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users