You are on page 1of 1

Private Sub Form_Load()

'REM Define Multiplying/Dividing Constant with 12 digits of decimal precision.


'REM This is the "Magic Number" needed to compute ranges of frequencies correctly
Dim FreqBase2Constant As Double
FreqBase2Constant = 1.059463094359
'

Dim Accumulator As Double


Dim MemoryList(13) As Double
Dim Semitonecount As Integer

'Do 1 Octave at a time (12) + 1 semitones).

'''Start with A-440 and calc. UP to A-880 (440*2):


''
''Accumulator = 440
''MemoryList(0) = Accumulator
''
''For Semitonecount = 1 To 12
''
'' Accumulator = Accumulator * FreqBase2Constant
'' MemoryList(Semitonecount) = Accumulator
''
''Next Semitonecount
''
'''TEST: DUMP the 13 values to RT Debug window
''For Semitonecount = 1 To 13
''
'' Debug.Print Str$(MemoryList(Semitonecount - 1))
''
''Next Semitonecount

'''Next do A-880 and calc. UP to A-1760 (880*2):


''
''Accumulator = 880
''MemoryList(0) = Accumulator
''
''For Semitonecount = 1 To 12
''

You might also like