E1M1 Posted December 16, 2010 Posted December 16, 2010 Does anyone know how to play sound directly w/o reading it from file? SoundPlay() requires sound to be stored as file but is it possible to make script that send sound directly to speakers w/o any saving it to file. edited
JohnOne Posted December 16, 2010 Posted December 16, 2010 Beep() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Zedna Posted December 16, 2010 Posted December 16, 2010 Look at my Resources UDF (link in my signature) There is function for playing sounds directly from resources (from inside compiled EXE). But it's limited to WAV type only. Resources UDF ResourcesEx UDF AutoIt Forum Search
UEZ Posted December 16, 2010 Posted December 16, 2010 (edited) Try this to play chip tunes directly from memory using bassmod.dll (also from memory): http://autoit.pastebin.com/VNmkQZWh I don't have enough free space left to upload it here! Br, UEZ Edited December 30, 2010 by UEZ coffeeturtle 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
E1M1 Posted December 16, 2010 Author Posted December 16, 2010 @JohnOne beep is not what i am looking for @UEZ why your code is just a single line when i paste it onto scite? edited
iamtheky Posted December 16, 2010 Posted December 16, 2010 (edited) UEZs post:::::or not, that issue is not limited to just you this time. Edited December 16, 2010 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
UEZ Posted December 16, 2010 Posted December 16, 2010 @UEZ why your code is just a single line when i paste it onto scite?Because forum software doesn't like me anymore Use the link instead!Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
E1M1 Posted December 16, 2010 Author Posted December 16, 2010 (edited) Where you got that music? it sounds like some nitendo music from 8bit bit game. And what file standards you followed? midi or is it just raw data? and what does $Opcode? does it just load dll into memory or anything more? and where did you get that $Opcode? Edited December 16, 2010 by E1M1 edited
UEZ Posted December 16, 2010 Posted December 16, 2010 (edited) Where you got that music? it sounds like some nitendo music from 8bit bit game. from http://www.scenemusic.net/demovibes/songs/ for example And what file standards you followed? midi or is it just raw data? it is a xm file (eXtended Module)! check out http://www.un4seen.com/ for more details about bassmod.dll and what mods are supported! and what does $Opcode? does it just load dll into memory or anything more? the binary strings are the bassmod.dll and the chip sound. it will be loaded to the memory. and where did you get that $Opcode? you can convert any file with this code e.g.: ; ============================================================================================================================ ; File : MemoryDllGen.au3 ; Purpose : Convert DLL files to HEX binary data ; Author : Ward ; modified : UEZ ; ============================================================================================================================ Local $VarName = StringStripWS(InputBox("MemoryDllGen", "Select a name of variable:", "DllBinary"), 3) If $VarName = "" Then Exit Local $DllName = FileOpenDialog("Open dll file", @ScriptDir, "DLL file (*.*)") If $DllName = "" Then Exit Local $Handle = FileOpen($DllName, 16) Local $DllBinary = FileRead($Handle) FileClose($Handle) Local $LineLen = 1024 Local $DllString = String($DllBinary) Local $Script = "Func " & $VarName & "()" & @CRLF & @TAB & "Local _" & @CRLF & @TAB & "$" & $VarName & " = '" & StringLeft($DllString, $LineLen) & "'" & @CRLF $DllString = StringTrimLeft($DllString, $LineLen) While StringLen($DllString) > $LineLen $Script &= " $" & $VarName & " &= '" & StringLeft($DllString, $LineLen) & "'" & @CRLF $DllString = StringTrimLeft($DllString, $LineLen) WEnd If StringLen($DllString) <> 0 Then $Script &= " $" & $VarName & " &= '" & $DllString & "'" & @CRLF $Script &= @TAB & "Return $" & $VarName & @CRLF & "EndFunc" ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Script = ' & $Script & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console ClipPut($Script) MsgBox(64, 'MemoryDll Generator', 'The result is in the clipboard, you can paste it to your script.') Br, UEZ Edited December 16, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
guinness Posted December 16, 2010 Posted December 16, 2010 Very Cool! UEZ you're the user that just keeps giving! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
Timtam Posted December 30, 2010 Posted December 30, 2010 hi, I want to play sounds like wave files in my script. But I want that nobody can play this files. So I have to encrypt the files or to include the files. But i didn't find a way to encrypt and play the files. Now i'm here and the question is: Can I include wave files into my script and play them? If yes, how? Can anybody explain it to me please? I'm a new programmer . thanks. Timtam
UEZ Posted December 30, 2010 Posted December 30, 2010 (edited) Here another method to play wave audio files from memory!Source code here: http://autoit.pastebin.com/0fYwC9tZOriginal code by wolf9228 from this topic: To create a binary string look to post #11.Br,UEZ Edited December 30, 2010 by UEZ microera 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Timtam Posted December 30, 2010 Posted December 30, 2010 Can you tell me what part of post #11 you mean? the dll to hex binary? But this is only for dll's or can I convert other files into binary too?
UEZ Posted December 30, 2010 Posted December 30, 2010 Can you tell me what part of post #11 you mean? the dll to hex binary? But this is only for dll's or can I convert other files into binary too?Yes, with the code from post #11 you can convert any kind of files to a binary string whereas binary files only would make sense!Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
microera Posted June 10, 2012 Posted June 10, 2012 Here another method to play wave audio files from memory!Source code here: http://autoit.pastebin.com/0fYwC9tZOriginal code by wolf9228 from this topic: To create a binary string look to post #11.Br,UEZHow to create WAV files (stereo, with volume and frequentz control for each channel (left,right)) in this form ..... like above example!?Playing in memory!
Zedna Posted July 20, 2012 Posted July 20, 2012 Is there any way to play MP3 files from memory?with bassmod.dllsee post #4 Resources UDF ResourcesEx UDF AutoIt Forum Search
n1maS Posted July 20, 2012 Posted July 20, 2012 tnx Zenda i don't how to use it. i've just replaced my own MP3 with the music in example above and it didn't work:(
UEZ Posted July 22, 2012 Posted July 22, 2012 (edited) Here an example how to play a MP3 music from memory using FMOD.dll (also from memory )Play MP3 from mem using FMODPress ESC to stop sound and exit code.Credits: MemoryDLL call code by Ward.The Germans might know where the sound is from. Br,UEZ Edited July 23, 2012 by UEZ n1maS 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
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