если кто-то решит дописать эту программу, могу прислать часть кода типа:
Private Function detectPitch(bString As Byte, _
bBar As Byte) As String
Dim i As Byte
Dim bOctave As Integer
Dim bPitch As Byte
Dim strNotes(1 To 12) As String
Dim strPitch As String * 5
'detect octave
Select Case bString
Case 1
If bBar < 8 And bBar >= 0 Then
bOctave = 1
ElseIf bBar >= 8 And bBar < 16 Then
bOctave = 2
ElseIf bBar >= 20 And bBar <= 24 Then
bOctave = 3
Else
MsgBox "error"
Exit Function
End If
Case 2
If bBar < 1 And bBar >= 0 Then
bOctave = 0
ElseIf bBar >= 1 And bBar < 13 Then
bOctave = 1
ElseIf bBar >= 13 And bBar <= 24 Then
bOctave = 2
Else
MsgBox "error"
Exit Function
End If
Case 3
If bBar < 5 And bBar >= 0 Then
bOctave = 0
ElseIf bBar >= 5 And bBar < 17 Then
bOctave = 1
ElseIf bBar >= 17 And bBar <= 24 Then
bOctave = 2
Else
MsgBox "error"
Exit Function
End If
Case 4
If bBar < 10 And bBar >= 0 Then
bOctave = 0
ElseIf bBar >= 10 And bBar < 22 Then
bOctave = 1
ElseIf bBar >= 22 And bBar <= 24 Then
bOctave = 2
Else
MsgBox "error"
Exit Function
End If
Case 5
If bBar < 3 And bBar >= 0 Then
bOctave = -1
ElseIf bBar >= 3 And bBar < 15 Then
bOctave = 0
ElseIf bBar >= 15 And bBar <= 24 Then
bOctave = 1
Else
MsgBox "error"
Exit Function
End If
Case 6
If bBar < 8 And bBar >= 0 Then
bOctave = -1
ElseIf bBar >= 8 And bBar < 20 Then
bOctave = 0
ElseIf bBar >= 20 And bBar <= 24 Then
bOctave = 1
Else
MsgBox "error"
Exit Function
End If
End Select
'detect pitch
Select Case bString
Case 1: i = 8
Case 2: i = 3
Case 3: i = 11
Case 4: i = 6
Case 5: i = 1
Case 6: i = 8
Case Else
MsgBox "error": Exit Function
End Select
strNotes(1) = "A": strNotes(2) = "A#Bb": strNotes(3) = "B"
strNotes(4) = "C": strNotes(5) = "C#Db": strNotes(6) = "D"
strNotes(7) = "D#Eb": strNotes(
= "E": strNotes(9) = "F"
strNotes(10) = "F#Gb": strNotes(11) = "G": strNotes(12) = "G#Ab"
bPitch = i + bBar
Do Until bPitch <= 12
bPitch = bPitch - 12
Loop
detectPitch = strNotes(bPitch) & bOctave
End Function