SoundClips.psm1
function Get-SoundClipMissionImpossible { [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(932,150) Start-Sleep -m 150 [console]::beep(1047,150) Start-Sleep -m 150 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(699,150) Start-Sleep -m 150 [console]::beep(740,150) Start-Sleep -m 150 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(932,150) Start-Sleep -m 150 [console]::beep(1047,150) Start-Sleep -m 150 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(784,150) Start-Sleep -m 300 [console]::beep(699,150) Start-Sleep -m 150 [console]::beep(740,150) Start-Sleep -m 150 [console]::beep(932,150) [console]::beep(784,150) [console]::beep(587,1200) Start-Sleep -m 75 [console]::beep(932,150) [console]::beep(784,150) [console]::beep(554,1200) Start-Sleep -m 75 [console]::beep(932,150) [console]::beep(784,150) [console]::beep(523,1200) Start-Sleep -m 150 [console]::beep(466,150) [console]::beep(523,150) } function Get-SoundClipCloseEncounter { [console]::beep(900,400) [console]::beep(1000,400) [console]::beep(800,400) [console]::beep(400,400) [console]::beep(600,1600) } Function Get-SoundClipImperialMarch { [console]::beep(440,500) [console]::beep(440,500) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,1000) [console]::beep(659,500) [console]::beep(659,500) [console]::beep(659,500) [console]::beep(698,350) [console]::beep(523,150) [console]::beep(415,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,1000) } #https://gist.github.com/HelgeSverre/33361e8a283624dfbbd6 function Get-SoundClipTetris { [Console]::Beep(658, 125) [Console]::Beep(1320, 500) [Console]::Beep(990, 250); [Console]::Beep(1056, 250); [Console]::Beep(1188, 250); [Console]::Beep(1320, 125); [Console]::Beep(1188, 125); [Console]::Beep(1056, 250); [Console]::Beep(990, 250); [Console]::Beep(880, 500); [Console]::Beep(880, 250); [Console]::Beep(1056, 250); [Console]::Beep(1320, 500); [Console]::Beep(1188, 250); [Console]::Beep(1056, 250); [Console]::Beep(990, 750); [Console]::Beep(1056, 250); [Console]::Beep(1188, 500); [Console]::Beep(1320, 500); [Console]::Beep(1056, 500); [Console]::Beep(880, 500); [Console]::Beep(880, 500); sleep -m 250; [Console]::Beep(1188, 500); [Console]::Beep(1408, 250); [Console]::Beep(1760, 500); [Console]::Beep(1584, 250); [Console]::Beep(1408, 250); [Console]::Beep(1320, 750); [Console]::Beep(1056, 250); [Console]::Beep(1320, 500); [Console]::Beep(1188, 250); [Console]::Beep(1056, 250); [Console]::Beep(990, 500); [Console]::Beep(990, 250); [Console]::Beep(1056, 250); [Console]::Beep(1188, 500); [Console]::Beep(1320, 500); [Console]::Beep(1056, 500); [Console]::Beep(880, 500); [Console]::Beep(880, 500); sleep -m 500; [Console]::Beep(1320, 500); [Console]::Beep(990, 250); [Console]::Beep(1056, 250); [Console]::Beep(1188, 250); [Console]::Beep(1320, 125); [Console]::Beep(1188, 125); [Console]::Beep(1056, 250); [Console]::Beep(990, 250); [Console]::Beep(880, 500); [Console]::Beep(880, 250); [Console]::Beep(1056, 250); [Console]::Beep(1320, 500); [Console]::Beep(1188, 250); [Console]::Beep(1056, 250); [Console]::Beep(990, 750); [Console]::Beep(1056, 250); [Console]::Beep(1188, 500); [Console]::Beep(1320, 500); [Console]::Beep(1056, 500); [Console]::Beep(880, 500); [Console]::Beep(880, 500); sleep -m 250; [Console]::Beep(1188, 500); [Console]::Beep(1408, 250); [Console]::Beep(1760, 500); [Console]::Beep(1584, 250); [Console]::Beep(1408, 250); [Console]::Beep(1320, 750); [Console]::Beep(1056, 250); [Console]::Beep(1320, 500); [Console]::Beep(1188, 250); [Console]::Beep(1056, 250); [Console]::Beep(990, 500); [Console]::Beep(990, 250); [Console]::Beep(1056, 250); [Console]::Beep(1188, 500); [Console]::Beep(1320, 500); [Console]::Beep(1056, 500); [Console]::Beep(880, 500); [Console]::Beep(880, 500); sleep -m 500; [Console]::Beep(660, 1000); [Console]::Beep(528, 1000); [Console]::Beep(594, 1000); [Console]::Beep(495, 1000); [Console]::Beep(528, 1000); [Console]::Beep(440, 1000); [Console]::Beep(419, 1000); [Console]::Beep(495, 1000); [Console]::Beep(660, 1000); [Console]::Beep(528, 1000); [Console]::Beep(594, 1000); [Console]::Beep(495, 1000); [Console]::Beep(528, 500); [Console]::Beep(660, 500); [Console]::Beep(880, 1000); [Console]::Beep(838, 2000); [Console]::Beep(660, 1000); [Console]::Beep(528, 1000); [Console]::Beep(594, 1000); [Console]::Beep(495, 1000); [Console]::Beep(528, 1000); [Console]::Beep(440, 1000); [Console]::Beep(419, 1000); [Console]::Beep(495, 1000); [Console]::Beep(660, 1000); [Console]::Beep(528, 1000); [Console]::Beep(594, 1000); [Console]::Beep(495, 1000); [Console]::Beep(528, 500); [Console]::Beep(660, 500); [Console]::Beep(880, 1000); [Console]::Beep(838, 2000); } #https://gist.github.com/davewilson/5612674 Function Get-SoundClipMario { [System.Console]::Beep(659, 125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(523, 125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(784, 125); [System.Threading.Thread]::Sleep(375); [System.Console]::Beep(392, 125); [System.Threading.Thread]::Sleep(375); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(392, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(330, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(440, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(494, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(466, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(440, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(392, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(784, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(880, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(698, 125); [System.Console]::Beep(784, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(587, 125); [System.Console]::Beep(494, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(392, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(330, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(440, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(494, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(466, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(440, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(392, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(784, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(880, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(698, 125); [System.Console]::Beep(784, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(587, 125); [System.Console]::Beep(494, 125); [System.Threading.Thread]::Sleep(375); [System.Console]::Beep(784, 125); [System.Console]::Beep(740, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(415, 125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Console]::Beep(587, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(784, 125); [System.Console]::Beep(740, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(698, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(625); [System.Console]::Beep(784, 125); [System.Console]::Beep(740, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(415, 125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Console]::Beep(587, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(587, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(1125); [System.Console]::Beep(784, 125); [System.Console]::Beep(740, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(415, 125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Console]::Beep(587, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(784, 125); [System.Console]::Beep(740, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(698, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(625); [System.Console]::Beep(784, 125); [System.Console]::Beep(740, 125); [System.Console]::Beep(698, 125); [System.Threading.Thread]::Sleep(42); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(659, 125); [System.Threading.Thread]::Sleep(167); [System.Console]::Beep(415, 125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(125); [System.Console]::Beep(440, 125); [System.Console]::Beep(523, 125); [System.Console]::Beep(587, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(622, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(587, 125); [System.Threading.Thread]::Sleep(250); [System.Console]::Beep(523, 125); [System.Threading.Thread]::Sleep(625); } Function Get-SoundClipHappyBirthday { [System.Console]::Beep(262,200) [System.Console]::Beep(262,200) [System.Console]::Beep(294,200) [System.Console]::Beep(262,200) [System.Console]::Beep(349,200) [System.Console]::Beep(330,200) [System.Console]::Beep(262,200) [System.Console]::Beep(262,200) [System.Console]::Beep(294,200) [System.Console]::Beep(262,200) [System.Console]::Beep(392,200) [System.Console]::Beep(349,200) [System.Console]::Beep(262,200) [System.Console]::Beep(262,200) [System.Console]::Beep(482,200) [System.Console]::Beep(440,200) [System.Console]::Beep(349,200) [System.Console]::Beep(330,200) [System.Console]::Beep(294,200) [System.Console]::Beep(482,200) [System.Console]::Beep(482,200) [System.Console]::Beep(440,200) [System.Console]::Beep(349,200) [System.Console]::Beep(392,200) [System.Console]::Beep(349,200) } #http://imjustanengineer.blogspot.ca/2014/03/fun-with-powershell-make-it-speak.html function Get-SpeakInstalledVoices { Add-Type -AssemblyName System.Speech $synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer $installedVoices = (($synthesizer.GetInstalledVoices() | select voiceinfo).voiceinfo | select Name).name return $installedVoices } function Get-SpeakArray { param ( [array]$WhatToSay, $VoiceName ) if ($VoiceName -eq $null){$VoiceName = Get-SpeakInstalledVoices | select -First 1} Add-Type -AssemblyName System.Speech $synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer foreach ($thing in $WhatToSay) { $synthesizer.SelectVoice($VoiceName) $synthesizer.Speak($thing) | Out-Null } } function Get-SpeakWhatAreYouDoing { Get-SpeakArray -WhatToSay "What are you doing $(($env:USERNAME).replace('.',' '))" } Invoke-RestMethod -Method Get -Uri 'https://quotes.rest/api/quote/random' Export-ModuleMember Get-SoundClipImperialMarch,Get-SoundClipCloseEncounter,Get-SoundClipMissionImpossible,Get-SoundClipMario,Get-SoundClipTetris ,Get-SoundClipHappyBirthday,Get-SpeakArray,Get-SpeakWhatAreYouDoing,Get-SpeakInstalledVoices |