CyberSlug Posted February 2, 2005 Share Posted February 2, 2005 Based on QBasic syntax, but any differences were hacked out instead of being thought out Download the attachment if the example interests you: ; CyberSlug - 1 Feb 2005 ;----------------------- ;Put a space between each note and rest ;Use uppercase letters to denote the pitches ;Use "r" to denote rest ;Follow pitch with "#" or "+" to denote sharp; use "b" or "-" to denote flat ;Precede the pitch with a number to denote duration 1=whole, 2=half, 4=quarter(DEFAULT), 8=eight, 16=sixteenth ;Specify octave in the format "o7"; default octave is "o4" ;Specify tempo in the format "t100"; that means 100 quarter notes per minute; range 32 - 255 Play("t240 E D C D E E E r D D D r E G G r") Play("t240 E D C D E E E E D D E D C") Play("2r") Play("o5 E E 2E E E 2E E G C D 2E") Play("2r") Play("C D E F G A B o5 C o4 B A G F E D C") Play("2r") Play("t255 C C# D D# E F F# G G# A A# B B# < C") Play("2r") Play("t255 o4 C > Cb B Bb A Ab G Gb F E Eb D Db C")music_wrapper.au3 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
MaestroDW Posted February 2, 2005 Share Posted February 2, 2005 Well done CyberSlug.I'll grab this now and make use of it.Used sparingly, sound is a great way to add character, humour and personality to a script.Many thanks,DWBased on QBasic syntax, but any differences were hacked out instead of being thought out Download the attachment if the example interests you:; CyberSlug - 1 Feb 2005 ;----------------------- ;Put a space between each note and rest ;Use uppercase letters to denote the pitches ;Use "r" to denote rest ;Follow pitch with "#" or "+" to denote sharp; use "b" or "-" to denote flat ;Precede the pitch with a number to denote duration 1=whole, 2=half, 4=quarter(DEFAULT), 8=eight, 16=sixteenth ;Specify octave in the format "o7"; default octave is "o4" ;Specify tempo in the format "t100"; that means 100 quarter notes per minute; range 32 - 255 Play("t240 E D C D E E E r D D D r E G G r") Play("t240 E D C D E E E E D D E D C") Play("2r") Play("o5 E E 2E E E 2E E G C D 2E") Play("2r") Play("C D E F G A B o5 C o4 B A G F E D C") Play("2r") Play("t255 C C# D D# E F F# G G# A A# B B# < C") Play("2r") Play("t255 o4 C > Cb B Bb A Ab G Gb F E Eb D Db C")<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
MaestroDW Posted February 2, 2005 Share Posted February 2, 2005 BTW When will the polyphonic version be ready? Link to comment Share on other sites More sharing options...
CyberSlug Posted February 2, 2005 Author Share Posted February 2, 2005 BTW When will the polyphonic version be ready? <{POST_SNAPBACK}>I don't know; I don't have any plans to work any more on this. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
b14ck Posted February 2, 2005 Share Posted February 2, 2005 I'm kind of curious. How would one go about creating anything polymorphic with au3? I am very used to the interface form of polymorphism in oOp but not exactly sure how one could pull off true polymorphism over au3. If you know please share your methods. -I am the giver of life and the bringer of death. Link to comment Share on other sites More sharing options...
CyberSlug Posted February 2, 2005 Author Share Posted February 2, 2005 I'm kind of curious. How would one go about creating anything polymorphic with au3? I am very used to the interface form of polymorphism in oOp but not exactly sure how one could pull off true polymorphism over au3. If you know please share your methods.<{POST_SNAPBACK}>polyphonic, as in more than one note playing at the same time. I don't think the PC speaker supports it anyway. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
b14ck Posted February 2, 2005 Share Posted February 2, 2005 Oops, a slight error. Thanks for the correction. -I am the giver of life and the bringer of death. Link to comment Share on other sites More sharing options...
trids Posted February 2, 2005 Share Posted February 2, 2005 Very cute, sluggie .. does anyone know if it's possible to programmatically set the volume of the pc-speaker? (And if so .. how?) TIA Link to comment Share on other sites More sharing options...
Qslig Posted February 2, 2005 Share Posted February 2, 2005 CyberSlug really cool! Link to comment Share on other sites More sharing options...
Josbe Posted February 2, 2005 Share Posted February 2, 2005 Very well, Cyber. This kind of sounds (using the speaker), reminds me old times. • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
layer Posted February 2, 2005 Share Posted February 2, 2005 trids, do you mean SoundSetWaveVolume? i like this, very neat CS! FootbaG Link to comment Share on other sites More sharing options...
trids Posted February 3, 2005 Share Posted February 3, 2005 trids, do you mean SoundSetWaveVolume? <{POST_SNAPBACK}>Like SoundSetWaveVolume, perhaps. But this function doesn't affect the pc speaker. Which is why I'm asking if it's even possible. Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 3, 2005 Share Posted February 3, 2005 Like SoundSetWaveVolume, perhaps. But this function doesn't affect the pc speaker. Which is why I'm asking if it's even possible. <{POST_SNAPBACK}>Well, it's a bit dusty, but if memory serves me right, the PC speaker DOES have a volume control within the windows GUI. 3 or 4 settings, I believe... Off, Low, Medium and High. So ... Theroetically speaking..... Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
BlankMind Posted February 9, 2005 Share Posted February 9, 2005 Why it doesn't work under Windows 98? It worked fine on XP but didn't on 98, although I found the "kernel32.dll"... Link to comment Share on other sites More sharing options...
CyberSlug Posted February 9, 2005 Author Share Posted February 9, 2005 Why it doesn't work under Windows 98? It worked fine on XP but didn't on 98, although I found the "kernel32.dll"...<{POST_SNAPBACK}>Hmm, it might be a Windows 9x feature: http://support.microsoft.com/kb/199030/ Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Markus Posted July 24, 2006 Share Posted July 24, 2006 Very nice thing so far, good job. But i wonder, if it would be possible to play a sound as long as you press a button. Something like that. If _isPressed(%%) Then StartBeep($freq) EndIf While _isPressed(%%) Wend StopBeep So that you don't have to put duration before you start playing the note. "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
nfwu Posted July 24, 2006 Share Posted July 24, 2006 Oooo.... an old thread...But i wonder, if it would be possible to play a sound as long as you press a button.Yes you can.Next time you have a support question, post it in the v3 Support fourms.#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
daslick Posted October 10, 2006 Share Posted October 10, 2006 Cyberslug... could you please take a look at my topic?http://www.autoitscript.com/forum/index.ph...c=34271&hl= I am trying to make a very simple musical keyboard that does not beep repeatedly when you hold down a button. I want it to hold the pitch rather than make the sound over and over. Do you think this is possible? 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