Advertisement
3_2004-2005 Sound/MP3 #133162

Annie's Song by John Denver

No interface, just the song using Beep API... XP Only, sorry. I didn't write this but thought it might be enjoyed after seeing a single beep get 5 globes :p.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
'    "Annie's Song"
'    by John Denver
Option Explicit
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
Dim Note As Long
Dim Frequencies As String, Durations As String
Dim Frequency As Long, Duration As Long
Frequencies = "iiihfihfffhidadddfhihfffhihiiihfihffihfdadddfhihffhiki"
 Durations = "aabbbfjaabbbbnaabbbfjaabcapaabbbfjaabbbbnaabbbfjaabcap"
Const E4 = 329.6276
For Note = 1 To Len(Frequencies)
  Frequency = E4 * 2 ^ ((Asc(Mid$(Frequencies, Note, 1)) - 96) / 12)
  Duration = (Asc(Mid$(Durations, Note, 1)) - 96) * 200 - 10
  Beep Frequency, Duration
  Sleep 10
  DoEvents
Next
Unload Me
End Sub
Original Comments (3)
Recovered from Wayback Machine