trancexx Posted June 25, 2010 Share Posted June 25, 2010 Trancexx, I have been trying to figure out the following line of code in your _Beep function.Local $iFrequency = 440 * 2 ^ (($iNote + $iToneLocal) / 12 + $iOctave + 1 / 6 - 4) I wish to use frequencies that are not constant. Would this be right? Local $iFrequency = $fMyFrequency*2^($iOctave - 1) Does $iFrequency have to be an integer measure of hertz? Confused. That's one of the three things taken from AZJIO's function, so don't ask me "Honey" ... star fucker ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
czardas Posted June 25, 2010 Share Posted June 25, 2010 That's one of the three things taken from AZJIO's function, so don't ask me "Honey" Okay, thanks! I'll just have to experiment and hopefully I'll figure it out. I'm so glad you added the object thingy.I deleted the video BTW. Maybe I should have left it where it was. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
AZJIO Posted June 25, 2010 Author Share Posted June 25, 2010 (edited) I wish to use frequencies that are not constant. Would this be right?Yes and No.... A=440Does $iFrequency have to be an integer measure of hertz? Confused.No... For example $fMyFrequency=441.57Beep(500.57, 1000) = Beep(500, 1000)google >> 1.059463094 Edited June 25, 2010 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
czardas Posted June 25, 2010 Share Posted June 25, 2010 (edited) Yes and No.... A=440No... For example $fMyFrequency=441.57Beep(500.57, 1000) = Beep(500, 1000)google >> 1.059463094I'm not sure if you understand what I wish to do. I wish to use the overtone series. However I will also create some different variations of pitch. The pitch of a note will not necessarily be constant throughout the music. Edited June 25, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
AZJIO Posted June 25, 2010 Author Share Posted June 25, 2010 (edited) Flageolets? Timbre? Edited June 25, 2010 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
czardas Posted June 25, 2010 Share Posted June 25, 2010 (edited) Flageolets?They are natural frequencies. But I will also alter the frequencies sometimes. I can't find my calculations.Octave = 2 : 15th = 3 : 24th = 4 : 33rd = 5 : 44th + 5th = Octave4/3 * 3/2 = 2/1Tritone = 2 : 2^0.5 => artificialI will look for my calculations but I need to work on them. I will change the frequencies when the music modulates to another key. Edited June 25, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Ascend4nt Posted June 25, 2010 Share Posted June 25, 2010 AZJIO,I'm surprised you haven't linked to your other version of '_Beep' that uses MIDI and the same calling convention. I'm referring to this post in the MIDI UDF thread of course. Also, with my update to the basic MIDI UDF module, it works properly now on AutoIt v3.3.6+ and Win2000->Win7. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
czardas Posted July 1, 2010 Share Posted July 1, 2010 (edited) Five new Irish melodic variations in 6/8 time. Requires DSBeep.au3 (from Trancexx) and AutoItObject.au3. expandcollapse popup#include "DSBeep.au3" Opt("MustDeclareVars", 1) HotKeySet("{ESC}", "_Quit") ; Error monitoring Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc() ConsoleWrite("! COM Error ! Number: 0x" & Hex($oError.number, 8) & " ScriptLine: " & $oError.scriptline & " - " & $oError.windescription & @CRLF) Return EndFunc ;==>_ErrFunc ; Initialize DSBeep _StartDSBeep() ; Number 1 _Beep(3,5,450) _Beep(5,5,150) _Beep(3,5,150) _Beep(5,5,150) _Beep(12,4,450) _Beep(10,4,150) _Beep(10,4,150) _Beep(10,4,150) _Beep(8,4,450) _Beep(10,4,150) _Beep(12,4,150) _Beep(10,4,150) _Beep(8,4,450) _Beep(10,4,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(10,4,450) _Beep(8,4,150) _Beep(10,4,100) _Beep(8,4,100) _Beep(10,4,100) _Beep(12,4,450) _Beep(1,5,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(1,5,450) _Beep(12,4,450) _Beep(10,4,450) _Beep(8,4,450) _Beep(3,5,450) _Beep(5,5,150) _Beep(3,5,150) _Beep(5,5,150) _Beep(12,4,450) _Beep(10,4,150) _Beep(10,4,150) _Beep(10,4,150) _Beep(8,4,450) _Beep(10,4,150) _Beep(12,4,150) _Beep(10,4,150) _Beep(8,4,450) _Beep(10,4,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(10,4,450) _Beep(8,4,150) _Beep(10,4,100) _Beep(8,4,100) _Beep(10,4,100) _Beep(12,4,450) _Beep(1,5,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(1,5,450) _Beep(12,4,450) _Beep(10,4,900) Sleep(3000) ; Number 2 _Beep(5,5,300) _Beep(1,5,150) _Beep(12,4,100) _Beep(1,5,100) _Beep(12,4,100) _Beep(10,4,150) _Beep(10,4,450) _Beep(12,4,100) _Beep(1,5,100) _Beep(12,4,100) _Beep(1,5,150) _Beep(12,4,450) _Beep(8,4,100) _Beep(10,4,100) _Beep(12,4,100) _Beep(8,4,150) _Beep(5,5,300) _Beep(3,5,150) _Beep(1,5,300) _Beep(12,4,150) _Beep(1,5,450) _Beep(3,5,150) _Beep(3,5,150) _Beep(1,5,150) _Beep(10,4,450) _Beep(12,4,150) _Beep(10,4,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(12,4,100) _Beep(12,4,100) _Beep(10,4,100) _Beep(10,4,150) _Beep(10,4,150) _Beep(8,4,150) _Beep(10,4,450) _Beep(5,5,450) _Beep(5,5,300) _Beep(1,5,150) _Beep(12,4,100) _Beep(1,5,100) _Beep(12,4,100) _Beep(10,4,150) _Beep(10,4,450) _Beep(12,4,100) _Beep(1,5,100) _Beep(12,4,100) _Beep(1,5,150) _Beep(12,4,450) _Beep(8,4,100) _Beep(10,4,100) _Beep(12,4,100) _Beep(8,4,150) _Beep(5,5,300) _Beep(3,5,150) _Beep(1,5,300) _Beep(12,4,150) _Beep(1,5,450) _Beep(3,5,150) _Beep(3,5,150) _Beep(1,5,150) _Beep(10,4,450) _Beep(12,4,150) _Beep(10,4,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(12,4,100) _Beep(12,4,100) _Beep(10,4,100) _Beep(10,4,150) _Beep(10,4,150) _Beep(8,4,150) _Beep(10,4,900) Sleep(3000) ; Number 3 _Beep(12,4,300) _Beep(10,4,150) _Beep(12,4,450) _Beep(1,5,150) _Beep(3,5,150) _Beep(5,5,150) _Beep(3,5,450) _Beep(1,5,450) _Beep(5,5,450) _Beep(8,4,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(5,5,450) _Beep(3,5,300) _Beep(12,4,150) _Beep(10,4,450) _Beep(12,4,150) _Beep(1,5,150) _Beep(12,4,150) _Beep(10,4,150) _Beep(8,4,300) _Beep(10,4,150) _Beep(12,4,150) _Beep(10,4,150) _Beep(12,4,300) _Beep(1,5,150) _Beep(10,4,450) _Beep(8,4,450) _Beep(12,4,300) _Beep(10,4,150) _Beep(12,4,450) _Beep(1,5,150) _Beep(3,5,150) _Beep(5,5,150) _Beep(3,5,450) _Beep(1,5,450) _Beep(5,5,450) _Beep(8,4,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(5,5,450) _Beep(3,5,300) _Beep(12,4,150) _Beep(10,4,450) _Beep(12,4,150) _Beep(1,5,150) _Beep(12,4,150) _Beep(10,4,150) _Beep(8,4,300) _Beep(10,4,150) _Beep(12,4,150) _Beep(10,4,150) _Beep(12,4,300) _Beep(1,5,150) _Beep(10,4,900) Sleep(3000) ; Number 4 _Beep(3,5,450) _Beep(5,5,150) _Beep(3,5,150) _Beep(5,5,150) _Beep(8,4,300) _Beep(12,4,150) _Beep(1,5,450) _Beep(3,5,450) _Beep(1,5,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(3,5,300) _Beep(5,5,150) _Beep(3,5,450) _Beep(1,5,450) _Beep(12,4,150) _Beep(10,4,150) _Beep(8,4,150) _Beep(10,4,300) _Beep(12,4,150) _Beep(1,5,450) _Beep(3,5,450) _Beep(5,5,450) _Beep(3,5,450) _Beep(5,5,450) _Beep(3,5,450) _Beep(5,5,150) _Beep(3,5,150) _Beep(5,5,150) _Beep(8,4,300) _Beep(12,4,150) _Beep(1,5,450) _Beep(3,5,450) _Beep(1,5,150) _Beep(12,4,150) _Beep(1,5,150) _Beep(3,5,300) _Beep(5,5,150) _Beep(3,5,450) _Beep(1,5,450) _Beep(12,4,150) _Beep(10,4,150) _Beep(8,4,150) _Beep(10,4,300) _Beep(12,4,150) _Beep(1,5,450) _Beep(3,5,450) _Beep(5,5,450) _Beep(3,5,450) Sleep(3000) ; Number 5 _Beep(10,4,300) _Beep(8,4,150) _Beep(10,4,450) _Beep(12,4,150) _Beep(1,5,300) _Beep(3,5,150) _Beep(1,5,300) _Beep(12,4,150) _Beep(10,4,300) _Beep(10,4,150) _Beep(12,4,300) _Beep(1,5,450) _Beep(12,4,100) _Beep(1,5,100) _Beep(5,5,100) _Beep(3,5,150) _Beep(1,5,450) _Beep(12,4,150) _Beep(1,5,300) _Beep(12,4,450) _Beep(1,5,150) _Beep(3,5,300) _Beep(3,5,150) _Beep(5,5,300) _Beep(5,5,150) _Beep(3,5,300) _Beep(1,5,450) _Beep(8,4,450) _Beep(10,4,300) _Beep(8,4,150) _Beep(10,4,450) _Beep(12,4,150) _Beep(1,5,300) _Beep(3,5,150) _Beep(1,5,300) _Beep(12,4,150) _Beep(10,4,300) _Beep(10,4,150) _Beep(12,4,300) _Beep(1,5,450) _Beep(12,4,100) _Beep(1,5,100) _Beep(5,5,100) _Beep(3,5,150) _Beep(1,5,450) _Beep(12,4,150) _Beep(1,5,300) _Beep(12,4,450) _Beep(1,5,150) _Beep(3,5,300) _Beep(3,5,150) _Beep(5,5,300) _Beep(5,5,150) _Beep(3,5,300) _Beep(1,5,450) ; Stop the engine _StopDSBeep() ; Exit (redundant) _Quit() Func _Quit() Exit EndFunc ;==>_Quit Edited July 1, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
E1M1 Posted July 1, 2010 Share Posted July 1, 2010 (edited) nice. 5 stars here my try to figure out how it works for $i = 1 To 20 _Beep($i,5,500) Next for $i = 1 To 20 _Beep(12,$i,500) Next for $i = 1 To 20 _Beep($i,$i,500) Next Just idea for some more experienced. Make it Beep simpson's intro. Edited July 1, 2010 by E1M1 edited Link to comment Share on other sites More sharing options...
czardas Posted July 1, 2010 Share Posted July 1, 2010 (edited) hehe, there's a lot more where they came from! for $i = 1 To 20 _Beep($i,5,500) Next for $i = 1 To 20 _Beep(12,$i,500) Next for $i = 1 To 20 _Beep($i,$i,500) Next There are only 12 notes in an octave, and the human ear can only hear about 10 octaves, I think. Edited July 1, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted July 1, 2010 Share Posted July 1, 2010 (edited) New Instant Jazz expandcollapse popup#include "DSBeep.au3" Opt("MustDeclareVars", 1) HotKeySet("{ESC}", "_Quit") ; Error monitoring Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc() ConsoleWrite("! COM Error ! Number: 0x" & Hex($oError.number, 8) & " ScriptLine: " & $oError.scriptline & " - " & $oError.windescription & @CRLF) Return EndFunc ;==>_ErrFunc ; Initialize DSBeep _StartDSBeep() ;_Beep(3,4,900) _Beep(5,4,200) _Beep(8,4,100) _Beep(11,4,100) _Beep(10,4,100) _Beep(8,4,100) _Beep(5,4,150) _Beep(8,4,150) _Beep(10,4,150) _Beep(11,4,150) _Beep(12,4,150) _Beep(3,5,150) _Beep(12,4,900) _Beep(11,4,200) _Beep(10,4,100) _Beep(8,4,100) _Beep(10,4,100) _Beep(11,4,100) _Beep(10,3,150) _Beep(8,3,150) _Beep(8,4,900) _Beep(5,4,200) _Beep(3,4,100) _Beep(12,3,100) _Beep(3,4,100) _Beep(5,3,100) _Beep(8,3,150) _Beep(5,4,150) _Beep(8,4,150) _Beep(10,3,150) _Beep(8,3,150) _Beep(5,5,150) _Beep(11,3,100) _Beep(10,3,200) _Beep(8,3,300) _Beep(5,3,100) _Beep(8,3,200) _Beep(8,3,100) _Beep(5,3,100) _Beep(8,3,100) _Beep(10,3,100) _Beep(8,3,200) _Beep(10,3,300) _Beep(8,3,100) _Beep(5,3,200) _Beep(8,3,100) _Beep(5,3,100) _Beep(8,3,100) _Beep(5,4,900) _Beep(8,4,100) _Beep(5,4,200) _Beep(3,4,100) _Beep(12,3,100) _Beep(3,4,100) _Beep(5,4,300) _Beep(3,4,300) _Beep(12,3,200) _Beep(3,4,100) _Beep(11,3,100) _Beep(10,3,200) _Beep(8,3,300) _Beep(5,3,100) _Beep(8,3,200) _Beep(8,3,100) _Beep(5,3,100) _Beep(8,3,100) _Beep(10,3,100) _Beep(8,3,200) _Beep(10,3,300) _Beep(8,3,100) _Beep(5,3,200) _Beep(8,3,100) _Beep(5,3,100) _Beep(8,3,100) _Beep(5,4,900) _Beep(8,4,100) _Beep(5,4,200) _Beep(3,4,100) _Beep(12,3,100) _Beep(3,4,100) _Beep(5,4,300) _Beep(3,4,300) _Beep(12,3,200) _Beep(3,4,100) _Beep(8,3,300) _Beep(5,3,300) _Beep(12,4,150) _Beep(12,4,150) _Beep(11,4,300) _Beep(10,4,300) _Beep(8,4,100) _Beep(5,4,200) _Beep(3,4,300) _Beep(8,3,300) _Beep(8,4,300) _Beep(5,4,100) _Beep(5,3,100) _Beep(8,3,100) _Beep(10,3,600) _Beep(10,3,600) _Beep(11,3,150) _Beep(12,3,150) _Beep(3,4,100) _Beep(8,4,100) _Beep(10,4,100) _Beep(11,3,600) _Beep(10,3,100) _Beep(5,3,100) _Beep(8,3,100) _Beep(10,3,100) _Beep(8,3,200) _Beep(10,3,100) _Beep(8,3,100) _Beep(11,3,100) _Beep(10,3,900) _Beep(11,3,200) _Beep(12,3,100) _Beep(3,4,100) _Beep(8,3,100) _Beep(5,3,200) _Beep(8,3,100) _Beep(10,3,200) _Beep(8,3,200) ; Stop the engine _StopDSBeep() ; Exit (redundant) _Quit() Func _Quit() Exit EndFunc ;==>_Quit Edited July 1, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
niubbone Posted July 3, 2010 Share Posted July 3, 2010 LOL! AWESOME! That is crazy Link to comment Share on other sites More sharing options...
czardas Posted July 3, 2010 Share Posted July 3, 2010 (edited) My computer still needs some scale practice. One or two of those notes are a bit dubious. Edited July 7, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
czardas Posted July 7, 2010 Share Posted July 7, 2010 (edited) This metronome can gradually increase speed in microseconds. The acceleration is capped at 1.5 times the original speed. It is useful for improving musical technique on any instrument. The accelerated rhythm setting should only be used for training exercises, such as scales. A standard setting should be used for practicing repertoire.Requires DSBeep.au3 (see post number 13) and AutoItObject.au3.expandcollapse popup#include<WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include "DSBeep.au3" Opt("MustDeclareVars", 1) HotKeySet("{ESC}", "_stopMetronome") Global $oError = ObjEvent("AutoIt.Error", "_ErrFunc") Func _ErrFunc() MsgBox(0, "Error","µTempo just crashed") Exit EndFunc _StartDSBeep() Local $hGUI = GUICreate(" µTempo", 122, 78, -1, -1, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP)) GUISetBkColor(0xFFFFE0, $hGUI) Local $hBPM = GUICtrlCreateInput("110", 4, 6, 45, 20, $ES_READONLY) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, 300, 30) GUICtrlCreateLabel(" bpm", 52, 8, 40, 16) Local $hCheck = GUICtrlCreateCheckbox(" Accel to 1.5 x @", 8, 29, 104, 20) Local $iMicroSecs= GUICtrlCreateInput("300", 4, 52, 44, 20, $ES_READONLY) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateUpdown(-1) GUICtrlSetLimit(-1, 999, 50) GUICtrlCreateLabel("µs per beat", 54, 54, 60, 16) Local $hGo = GUICtrlCreateButton("Go", 81, 6, 37, 20) GUICtrlSetTip($hGo, "Press Esc to stop") GUISetState() Local $msg While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $hGo Then GUICtrlSetState ($hGo , $GUI_DISABLE) Local $iBpm = GUICtrlRead($hBPM) Local $iDelay = 60000/$iBpm Local $i = 1 If BitAnd(GUICtrlRead($hCheck), $GUI_CHECKED) = $GUI_CHECKED Then Local $iDiff = 0 Local $iDecrement = GUICtrlRead($iMicroSecs)/1000 While $i = 1 _Beep(1, 5, 20, $iDelay - 20 - $iDiff, 1) If $iDiff < $iDelay/3 Then $iDiff += $iDecrement Wend Else While $i = 1 _Beep(1, 5, 20, $iDelay - 20, 1) Wend EndIf EndIf WEnd _StopDSBeep() Func _stopMetronome() $i = 0 GUICtrlSetState ($hGo , $GUI_ENABLE) EndFuncFor some reason (unknown to me) it occasionally crashes when pressing the hotkey 'Esc' to stop the beat.This issue has been fixed and the above code updated. Thanks to ProgAndy and Trancexx for creating the UDFs which I am using. And thanks to AZJIO for starting this thread. Name changed to µTempo.EditOops, I forgot to give credit to the rest of the AutoItObject-Team - Monoceres and Kip. Edited July 26, 2010 by czardas operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
AZJIO Posted July 24, 2010 Author Share Posted July 24, 2010 (edited) The_generator_of_melodies.exe + sources + melodiesThe_generator_of_melodies_MIDI.exe + sources + melodiesUpdate - HotKeyDownloads (En, Ru)screenshot Edited July 26, 2010 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
czardas Posted July 26, 2010 Share Posted July 26, 2010 Thanks for this. I never mentioned it, but the melodies I posted above were written by an autoit script. I need to improve it though. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
AZJIO Posted December 11, 2011 Author Share Posted December 11, 2011 I tried to use an array.MusicBeep.7z My other projects or all 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