larcerkev Posted August 19, 2011 Share Posted August 19, 2011 (edited) I was wondering if there was a way to play an audio file or a simple Beep without having a delay in the script and having it loop over itself if there was a massive amount of plays. I tried something like repeating Beep(1700,20) for about 20 times within a second and the beeps become delayed and are played out longer then they should be. Edit: SoundPlay() makes the script freeze after a few plays of the sound file. Edited August 19, 2011 by larcerkev Link to comment Share on other sites More sharing options...
czardas Posted August 19, 2011 Share Posted August 19, 2011 If you want simultaneous sounds you could try to do something with midi. Here's the original You can play sounds simultaneously using _MidiOutShortMsg() but you cannot duplicate the same frequency. If you have 440 Hz on flute and then you want to add 440 Hz on violin, the flute will be cancelled out. If you use different frequencies, that doesn't happen.You might want to look at one of my creations using a small set of functions from the original midi UDF in this thread: The chimes are sounds that fade naturally. You will probably want to select a different type of instrument, if you wish to have a continuous sound. You can stop any particular frequency at any moment you choose. It might require some study. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
monoscout999 Posted August 19, 2011 Share Posted August 19, 2011 I use The Bass.Dll with a multitrack proyect I'm working on, i don`t do test with an overload CPU usage, but for short sounds it works perfectly. Link to comment Share on other sites More sharing options...
smashly Posted August 20, 2011 Share Posted August 20, 2011 Hi,I use irrKlang with AutoIt, to run multiple sounds at the same time.Bass.dll, is good, but I notice it seems to skip a sound if it can't keep up.eg: in an autoit game I wrote I wanted a sound to be played every time I fired the button no matter how fast I click the button, even if the sound was already playing and in use, play it again at the same time even if other shooting sounds hadn't finished.Bass.dll started to skip the shot sound by the 4th rapid press of the shot button.irrKlang happily played the sound no mater how fast or how many times I pressed the button and just didn't skip a beat.For an example of irrKlang shot sound I mentioned then you could look at Cheers Link to comment Share on other sites More sharing options...
monoscout999 Posted August 20, 2011 Share Posted August 20, 2011 I dont have problems with bass,dll, but IrrKlang sound intersting Here you got a rar file that contains a snippet of what i am working on.Download Link from the Spanish Forum!! (Yeah it works!) Link to comment Share on other sites More sharing options...
JohnOne Posted August 20, 2011 Share Posted August 20, 2011 (edited) I imagine you could use sndrec32.exe if you are using winXP Something like $sExe = "C:\Windows\system32\sndrec32.exe /play C:\my\path\to\wav.wav" Run($sExe) Unfortunately Its not in vista or 7, and I dont know if its available to download or if it even works on them. Edited August 20, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
larcerkev Posted August 21, 2011 Author Share Posted August 21, 2011 I was finally able to get BASS to play my file and it seems to work just fine. Thank you all for your suggestions and ideas. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now