Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two sounds at once?
#1
Is it possible to create two sounds at once?! I was thinking something like

SOUND 1000 AND 2000, 1

but then it just plays 1000
so, I was just wondering if it was possible to create a 'harmony' sound such as 1000 and 1500 at the same time? I have fiddled around with it and I haven't found a way to do it.
If anyone knows a way, please help me, because I guess I am just curious.

Thanks
ovaProgramming.

One night I had a dream where I was breaking balls. The next morning, BALLSBREAKER was born.

Quote: Excellent. Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Reply
#2
Well, I tried some ideas of mine out, and the closest thing to two sounds is to do something like this:

Code:
FOR I = 1 to 60    <-----(60 is how long you want both sounds to play)

    SOUND 1000 ,.025       <---(These are the two sounds played)
    SOUND 1500 ,.025

NEXT

What it does is go through both sounds so quickly that it pretty much sounds like they're playing at the same time, it sounds *slightly* bumpy, but it's about as good as it will get on PC Speaker.
Reply
#3
My advise to you is grab a copy of dsqb somewhere, since the pc speaker will only carry you so far.

get dsqb @ http://lithium.zext.net
b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
Reply
#4
You will have to read a lot of tutorials if you want to achieve this, you can't use a single QB instruction to do it.

With the speaker you should mix two waves by software , and use OUT instructions to switch speaker on and off following the wav. The output would be a square wavw, the only thing the PC speaker dcan do. Your program should keep switching on and off the speaker during the sound and would not be able to do anything else. You could even find in some old ftp site some TSR able to drive the speaker in the background.


By using a Sound Blaster you could set two different voices of the FM generator and trigger them, the program could do other things until the time to switch off the sound. It will work only with Sound Blaster and compatible cards. You can find example code at ABC
http://www.allbasiccode.com/

None of the ways will work with Windows XP, as the direct OUT instructions are blocked by the OS
Antoni
Reply
#5
so does the dosqb or whatever you guys said reroute the pc 'beeping' sounds thru the computer speakers? By the way, I tried that sound 1000 .025 and stuffbut it just souneded too metalic for my tastes. Anyway, thanks for your guys' help you have been my saving grace as far as qbasic goes. Big Grin
ovaProgramming.

One night I had a dream where I was breaking balls. The next morning, BALLSBREAKER was born.

Quote: Excellent. Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Reply
#6
d.s.4.q.b. (directsound for qb) is a sound blaster library that channels directsound calls through the clipboard to a vb slave that plays your stuff. yay.

oh, and:
DONT USE THE @%@$#n PC SPEAKER FOR ANYTHING.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#7
Code:
DONT USE THE @%@$#n PC SPEAKER FOR ANYTHING.

Why not? It's very adequate when you want to annoy the user! Big Grin
Antoni
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)