dost0011 Posted September 24, 2008 Share Posted September 24, 2008 Hi, I have a really big problem: I have to play 2 Sounds at the same time with different volumes. The Volumes must be changeable. I know, this is not a specific autoit Problem. But do anybody know, how to do this ? Something like a DJ Studio ? Many thanks ! Link to comment Share on other sites More sharing options...
technotronix Posted September 24, 2008 Share Posted September 24, 2008 Uhmm, maybe try to download virtual dj, you go to piratebay, download there a torrent and open it with a torrent downloader (µtorrent maybe?)..than instal ur virtual dj and woops, you can play 2 tracks at a diffrent volume and you can mix it toghter en save it, and you can even putt some effects in it atomix virtual dj 5.2 is the newest Let me know if the was helpfull Link to comment Share on other sites More sharing options...
dost0011 Posted September 25, 2008 Author Share Posted September 25, 2008 Uhmm, maybe try to download virtual dj, you go to piratebay, download there a torrent and open it with a torrent downloader (µtorrent maybe?)..than instal ur virtual dj and woops, you can play 2 tracks at a diffrent volume and you can mix it toghter en save it, and you can even putt some effects in it >_< atomix virtual dj 5.2 is the newestLet me know if the was helpfullHi,of course you couldn't help me with this comment I don't need virtual dj. I wrote a Halloween program, that creates at any time several sounds and I want to set the Volume for each "track" at running time (not mix it together offline)Is there anybody out there, who knows how to do this ?Thanks Link to comment Share on other sites More sharing options...
nobbe Posted September 25, 2008 Share Posted September 25, 2008 expandcollapse popup;=============================================================================== ;=============================================================================== ; include "wmp.au3" Global $oPlayer1 = ObjCreate("WMPlayer.OCX") Global $oPlayer2 = ObjCreate("WMPlayer.OCX") $song1 = @ScriptDir & "\test1.mp3" ; requires full path name ... $song2 = @ScriptDir & "\test2.mp3" ; requires full path name ... $rc = WMLoadFile($oPlayer1, $song1) MsgBox(0, "1 rc", $rc) $rc = WMLoadFile($oPlayer2, $song2) MsgBox(0, "2 rc", $rc) $rc = WMGetDuration($oPlayer1); MsgBox(0, "2 rc", $rc) ; turns the volume down and back up slowly... song 1 For $i = 100 To 0 Step - 1 WMSetVolume($oPlayer1, $i) Sleep(10) Next For $i = 0 To 100 WMSetVolume($oPlayer1, $i) Sleep(10) Next ; turns the volume down and back up slowly... song2 For $i = 100 To 0 Step - 1 WMSetVolume($oPlayer2, $i) Sleep(10) Next For $i = 0 To 100 WMSetVolume($oPlayer2, $i) Sleep(10) Next MsgBox(0, "pause", "") WMPause($oPlayer1) Sleep(300) MsgBox(0, "play", "") $rc = WMGetPosition($oPlayer1) MsgBox(0, "POS", $rc) WMPlay($oPlayer1) Sleep(3000) MsgBox(0, "stop","") WMStop($oPlayer1) WMStop($oPlayer2) exit ; ---------------------------- ; some functions Func WMLoadFile($wm_obj, $sFilename) $wm_obj.url = $sFilename While Not WMGetState($wm_obj) = "Playing" Sleep(100) WEnd EndFunc ;==>WMLoadFile Func WMSetVolume($wm_obj, $iVol) ;iVol can be between 0 and 100 $wm_obj.settings.volume = $iVol EndFunc ;==>WMSetVolume Func WMFastForward($wm_obj) $wm_obj.controls.fastForward() EndFunc ;==>WMFastForward Func WMReverse($wm_obj) $wm_obj.controls.fastReverse() EndFunc ;==>WMReverse Func WMPause($wm_obj) $wm_obj.controls.pause() EndFunc ;==>WMPause Func WMPlay($wm_obj) $wm_obj.controls.play() EndFunc ;==>WMPlay Func WMStop($wm_obj) $wm_obj.controls.stop() EndFunc ;==>WMStop Func WMGetPosition($wm_obj) local $pos $pos = $wm_obj.controls.currentPosition () return $pos EndFunc ;==>WMGetPosition Func WMGetDuration($wm_obj) Local $len $len = $wm_obj.currentMedia.duration Return $len EndFunc ;==>WMGetDuration Func WMGetState($wm_obj) local $sStates = "Undefined,Stopped,Paused,Playing,ScanForward,ScanReverse,Buffering," $sStates &= "Waiting,MediaEnded,Transitioning,Ready,Reconnecting" local $aStates = StringSplit($sStates, ",") $iState = $wm_obj.playState () Return $aStates[$iState] EndFunc ;==>WMGetState Link to comment Share on other sites More sharing options...
dost0011 Posted September 26, 2008 Author Share Posted September 26, 2008 Great and unbelievable !!!!!!!! Many thousand thanks ! Link to comment Share on other sites More sharing options...
dost0011 Posted November 4, 2008 Author Share Posted November 4, 2008 Next Problem: Is there any possibility to change the Balance (Left channel/Right Channel) ONLY for this player ? For example: I have 2 Stereo Samples playing at the same Time. The User changes now Sample 1 to left channel und Sample 2 to Right Channel... Many Thanks ! Link to comment Share on other sites More sharing options...
Madza91 Posted November 4, 2008 Share Posted November 4, 2008 Maybe this can you help [quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :) Link to comment Share on other sites More sharing options...
dost0011 Posted November 5, 2008 Author Share Posted November 5, 2008 Maybe this can you help Can anybody help me ? Please ? Link to comment Share on other sites More sharing options...
SuneC Posted November 5, 2008 Share Posted November 5, 2008 Use the UDF that n3nE linked to. _SoundPanLeft() and _SoundPanRight() is what you are looking for. Link to comment Share on other sites More sharing options...
weaponx Posted November 5, 2008 Share Posted November 5, 2008 (edited) Use the UDF that n3nE linked to. _SoundPanLeft() and _SoundPanRight() is what you are looking for. This won't help here I don't think. Func WMSetBalance($wm_obj, $iBal) $wm_obj.settings.balance = $iBal EndFunc Edited November 5, 2008 by weaponx Link to comment Share on other sites More sharing options...
SuneC Posted November 5, 2008 Share Posted November 5, 2008 This won't help here I don't think. Func WMSetBalance($wm_obj, $iBal) $wm_obj.settings.balance = $iBal EndFuncDepends on how you want to make it in the end. If you wish to stay using the WMPlayer Object then your code is what should be used. I just tried explaining what it was n3nE had linked to, and using the _Sound UDF is also a perfectly viable method. Of course you would need to rewrite the script with those functions instead of the WMPlayer Object ones. Link to comment Share on other sites More sharing options...
BrettF Posted November 5, 2008 Share Posted November 5, 2008 BASS.au3 can do this too. Check my sig... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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