Jump to content
IGNORED

Looking for a sound routine


Vorticon

Recommended Posts

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...

Link to comment
Share on other sites

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.

 

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
Link to comment
Share on other sites

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.

 

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...