Attribute VB_Name = "Module6"

Public LowCutFreqFilt As Boolean

Public Sub SetDefaultGain()
On Error Resume Next

    GQ_BandWidthOctave = 1
    
    GQ_Frequncy19hz = 0
    GQ_Frequncy20hz = 0
    GQ_Frequncy25hz = 0
    GQ_Frequncy315hz = 0
    GQ_Frequncy33hz = 0
    GQ_Frequncy40hz = 0
    GQ_Frequncy50hz = 0
    GQ_Frequncy63hz = 0
    GQ_Frequncy75hz = 0
    GQ_Frequncy80hz = 0
    GQ_Frequncy125hz = 0
    GQ_Frequncy160hz = 0
    GQ_Frequncy250hz = 0
    GQ_Frequncy313hz = 0
    GQ_Frequncy400hz = 0
    GQ_Frequncy450hz = 0
    GQ_Frequncy500hz = 0
    GQ_Frequncy630hz = 0
    GQ_Frequncy1000hz = 0
    GQ_Frequncy1250hz = 0
    GQ_Frequncy1600hz = 0
    GQ_Frequncy2000hz = 0
    GQ_Frequncy2500hz = 0
    GQ_Frequncy3150hz = 0
    GQ_Frequncy4000hz = 0
    GQ_Frequncy5000hz = 0
    GQ_Frequncy6300hz = 0
    GQ_Frequncy8000hz = 0
    GQ_Frequncy10000hz = 0
    GQ_Frequncy12500hz = 0
    GQ_Frequncy16000hz = 0
    GQ_Frequncy20000hz = 0

End Sub

Public Sub FrequencySliderChanged(Index As Integer)
On Error Resume Next

With Form1

If .Command1(8).Caption = "Data On Clipboard" Then
    
    .Command1(8).Caption = "EQ String > Clipboard"

End If

Select Case Index

Case 0

    GQ_Frequncy19hz = .Slider1(Index).Value
   
If Not Left((GQ_Frequncy19hz), 1) = "-" Then

    GQ_Frequncy19hz = "-" & GQ_Frequncy19hz

ElseIf Left((GQ_Frequncy19hz), 1) = "-" Then
    
   GQ_Frequncy19hz = Replace((GQ_Frequncy19hz), "-", vbNullString)

End If

Case 1
    
    GQ_Frequncy20hz = .Slider1(Index).Value
    
If Not Left((GQ_Frequncy20hz), 1) = "-" Then

    GQ_Frequncy20hz = "-" & GQ_Frequncy20hz

ElseIf Left((GQ_Frequncy20hz), 1) = "-" Then
    
   GQ_Frequncy20hz = Replace((GQ_Frequncy20hz), "-", vbNullString)

End If

Case 2

    GQ_Frequncy25hz = .Slider1(Index).Value
    
If Not Left((GQ_Frequncy25hz), 1) = "-" Then

    GQ_Frequncy25hz = "-" & GQ_Frequncy25hz

ElseIf Left((GQ_Frequncy25hz), 1) = "-" Then
    
   GQ_Frequncy25hz = Replace((GQ_Frequncy25hz), "-", vbNullString)

End If
    
Case 3

    GQ_Frequncy315hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy315hz), 1) = "-" Then

    GQ_Frequncy315hz = "-" & GQ_Frequncy315hz

ElseIf Left((GQ_Frequncy315hz), 1) = "-" Then
    
    GQ_Frequncy315hz = Replace((GQ_Frequncy315hz), "-", vbNullString)

End If

Case 4

    GQ_Frequncy33hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy33hz), 1) = "-" Then

    GQ_Frequncy33hz = "-" & GQ_Frequncy33hz

ElseIf Left((GQ_Frequncy33hz), 1) = "-" Then
    
    GQ_Frequncy33hz = Replace((GQ_Frequncy33hz), "-", vbNullString)

End If

Case 5

    GQ_Frequncy40hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy40hz), 1) = "-" Then

    GQ_Frequncy40hz = "-" & GQ_Frequncy40hz

ElseIf Left((GQ_Frequncy40hz), 1) = "-" Then
    
    GQ_Frequncy40hz = Replace((GQ_Frequncy40hz), "-", vbNullString)

End If

Case 6

    GQ_Frequncy50hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy50hz), 1) = "-" Then

    GQ_Frequncy50hz = "-" & GQ_Frequncy50hz

ElseIf Left((GQ_Frequncy50hz), 1) = "-" Then
    
    GQ_Frequncy50hz = Replace((GQ_Frequncy50hz), "-", vbNullString)

End If

Case 7

    GQ_Frequncy63hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy63hz), 1) = "-" Then

    GQ_Frequncy63hz = "-" & GQ_Frequncy63hz

ElseIf Left((GQ_Frequncy63hz), 1) = "-" Then
    
    GQ_Frequncy63hz = Replace((GQ_Frequncy63hz), "-", vbNullString)

End If

Case 8

    GQ_Frequncy75hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy75hz), 1) = "-" Then

    GQ_Frequncy75hz = "-" & GQ_Frequncy75hz

ElseIf Left((GQ_Frequncy75hz), 1) = "-" Then
    
    GQ_Frequncy75hz = Replace((GQ_Frequncy75hz), "-", vbNullString)

End If

Case 9

    GQ_Frequncy80hz = .Slider1(Index).Value
    
If Not Left((GQ_Frequncy80hz), 1) = "-" Then

    GQ_Frequncy80hz = "-" & GQ_Frequncy80hz

ElseIf Left((GQ_Frequncy80hz), 1) = "-" Then
    
    GQ_Frequncy80hz = Replace((GQ_Frequncy80hz), "-", vbNullString)

End If

Case 10

     GQ_Frequncy125hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy125hz), 1) = "-" Then

    GQ_Frequncy125hz = "-" & GQ_Frequncy125hz

ElseIf Left((GQ_Frequncy125hz), 1) = "-" Then
    
   GQ_Frequncy125hz = Replace((GQ_Frequncy125hz), "-", vbNullString)

End If

Case 11

     GQ_Frequncy160hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy160hz), 1) = "-" Then

    GQ_Frequncy160hz = "-" & GQ_Frequncy160hz

ElseIf Left((GQ_Frequncy160hz), 1) = "-" Then
    
   GQ_Frequncy160hz = Replace((GQ_Frequncy160hz), "-", vbNullString)

End If

Case 12

     GQ_Frequncy250hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy250hz), 1) = "-" Then

    GQ_Frequncy250hz = "-" & GQ_Frequncy250hz

ElseIf Left((GQ_Frequncy250hz), 1) = "-" Then
    
   GQ_Frequncy250hz = Replace((GQ_Frequncy250hz), "-", vbNullString)

End If

Case 13

     GQ_Frequncy313hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy313hz), 1) = "-" Then

    GQ_Frequncy313hz = "-" & GQ_Frequncy313hz

ElseIf Left((GQ_Frequncy313hz), 1) = "-" Then
    
   GQ_Frequncy313hz = Replace((GQ_Frequncy313hz), "-", vbNullString)

End If

Case 14

     GQ_Frequncy400hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy400hz), 1) = "-" Then

    GQ_Frequncy400hz = "-" & GQ_Frequncy400hz

ElseIf Left((GQ_Frequncy400hz), 1) = "-" Then
    
   GQ_Frequncy400hz = Replace((GQ_Frequncy400hz), "-", vbNullString)

End If

Case 15

     GQ_Frequncy450hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy450hz), 1) = "-" Then

    GQ_Frequncy450hz = "-" & GQ_Frequncy500hz

ElseIf Left((GQ_Frequncy450hz), 1) = "-" Then
    
   GQ_Frequncy450hz = Replace((GQ_Frequncy450hz), "-", vbNullString)

End If

Case 16

     GQ_Frequncy500hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy500hz), 1) = "-" Then

    GQ_Frequncy500hz = "-" & GQ_Frequncy500hz

ElseIf Left((GQ_Frequncy500hz), 1) = "-" Then
    
   GQ_Frequncy500hz = Replace((GQ_Frequncy500hz), "-", vbNullString)

End If

Case 17

     GQ_Frequncy630hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy630hz), 1) = "-" Then

   GQ_Frequncy630hz = "-" & GQ_Frequncy630hz

ElseIf Left((GQ_Frequncy630hz), 1) = "-" Then
    
   GQ_Frequncy630hz = Replace((GQ_Frequncy630hz), "-", vbNullString)

End If

Case 18

     GQ_Frequncy1000hz = .Slider1(Index).Value

If Not Left((GQ_Frequncy1000hz), 1) = "-" Then

   GQ_Frequncy1000hz = "-" & GQ_Frequncy1000hz

ElseIf Left((GQ_Frequncy1000hz), 1) = "-" Then
    
   GQ_Frequncy1000hz = Replace((GQ_Frequncy1000hz), "-", vbNullString)

End If

Case 19

     GQ_Frequncy1250hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy1250hz), 1) = "-" Then

   GQ_Frequncy1250hz = "-" & GQ_Frequncy1250hz

ElseIf Left((GQ_Frequncy1250hz), 1) = "-" Then
    
   GQ_Frequncy1250hz = Replace((GQ_Frequncy1250hz), "-", vbNullString)

End If

Case 20

     GQ_Frequncy1600hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy1600hz), 1) = "-" Then

   GQ_Frequncy1600hz = "-" & GQ_Frequncy1600hz

ElseIf Left((GQ_Frequncy1600hz), 1) = "-" Then
    
   GQ_Frequncy1600hz = Replace((GQ_Frequncy1600hz), "-", vbNullString)

End If

Case 21

     GQ_Frequncy2000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy2000hz), 1) = "-" Then

   GQ_Frequncy2000hz = "-" & GQ_Frequncy2000hz

ElseIf Left((GQ_Frequncy2000hz), 1) = "-" Then
    
   GQ_Frequncy2000hz = Replace((GQ_Frequncy2000hz), "-", vbNullString)

End If

Case 22

     GQ_Frequncy2500hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy2500hz), 1) = "-" Then

   GQ_Frequncy2500hz = "-" & GQ_Frequncy2500hz

ElseIf Left((GQ_Frequncy2500hz), 1) = "-" Then
    
   GQ_Frequncy2500hz = Replace((GQ_Frequncy2500hz), "-", vbNullString)

End If

Case 23

     GQ_Frequncy3150hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy3150hz), 1) = "-" Then

   GQ_Frequncy3150hz = "-" & GQ_Frequncy3150hz

ElseIf Left((GQ_Frequncy3150hz), 1) = "-" Then
    
   GQ_Frequncy3150hz = Replace((GQ_Frequncy3150hz), "-", vbNullString)

End If

Case 24

     GQ_Frequncy4000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy4000hz), 1) = "-" Then

   GQ_Frequncy4000hz = "-" & GQ_Frequncy4000hz

ElseIf Left((GQ_Frequncy4000hz), 1) = "-" Then
    
   GQ_Frequncy4000hz = Replace((GQ_Frequncy4000hz), "-", vbNullString)

End If

Case 25

     GQ_Frequncy5000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy5000hz), 1) = "-" Then

   GQ_Frequncy5000hz = "-" & GQ_Frequncy5000hz

ElseIf Left((GQ_Frequncy5000hz), 1) = "-" Then
    
   GQ_Frequncy5000hz = Replace((GQ_Frequncy5000hz), "-", vbNullString)

End If

Case 26

     GQ_Frequncy6300hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy6300hz), 1) = "-" Then

   GQ_Frequncy6300hz = "-" & GQ_Frequncy6300hz

ElseIf Left((GQ_Frequncy6300hz), 1) = "-" Then
    
   GQ_Frequncy6300hz = Replace((GQ_Frequncy6300hz), "-", vbNullString)

End If

Case 27

     GQ_Frequncy8000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy8000hz), 1) = "-" Then

   GQ_Frequncy8000hz = "-" & GQ_Frequncy8000hz

ElseIf Left((GQ_Frequncy8000hz), 1) = "-" Then
    
   GQ_Frequncy8000hz = Replace((GQ_Frequncy8000hz), "-", vbNullString)

End If

Case 28

     GQ_Frequncy10000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy10000hz), 1) = "-" Then

   GQ_Frequncy10000hz = "-" & GQ_Frequncy10000hz

ElseIf Left((GQ_Frequncy10000hz), 1) = "-" Then
    
   GQ_Frequncy10000hz = Replace((GQ_Frequncy10000hz), "-", vbNullString)

End If

Case 29

     GQ_Frequncy12500hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy12500hz), 1) = "-" Then

   GQ_Frequncy12500hz = "-" & GQ_Frequncy12500hz

ElseIf Left((GQ_Frequncy12500hz), 1) = "-" Then
    
   GQ_Frequncy12500hz = Replace((GQ_Frequncy12500hz), "-", vbNullString)

End If

Case 30

     GQ_Frequncy16000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy16000hz), 1) = "-" Then

   GQ_Frequncy16000hz = "-" & GQ_Frequncy16000hz

ElseIf Left((GQ_Frequncy16000hz), 1) = "-" Then
    
   GQ_Frequncy16000hz = Replace((GQ_Frequncy16000hz), "-", vbNullString)

End If

Case 31

     GQ_Frequncy20000hz = .Slider1(Index).Value
     
If Not Left((GQ_Frequncy20000hz), 1) = "-" Then

   GQ_Frequncy20000hz = "-" & GQ_Frequncy20000hz

ElseIf Left((GQ_Frequncy20000hz), 1) = "-" Then
    
   GQ_Frequncy20000hz = Replace((GQ_Frequncy20000hz), "-", vbNullString)

End If

Case Else: Exit Sub

End Select

    EQ_FFmpegStrData = vbNullString
    
    Form3.Text1.Text = ""
    
If LowCutFreqFilt = True Then

    EQ_FFmpegStrData = _
          EQ1Hz & ":g=-5" & GQ_Frequncy1hz & "," & EQ315Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy315hz & "," _
        & EQ33Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy33hz & "," & EQ40Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy40hz & "," _
        & EQ50Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy50hz & "," & EQ63Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy63hz & "," _
        & EQ75Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy75hz & "," & EQ80Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy80hz & "," _
        & EQ125Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy125hz & "," & EQ160Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy160hz & "," _
        & EQ250Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy250hz & "," & EQ313Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy313hz & "," _
        & EQ400Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy400hz & "," & EQ450Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy450hz & "," _
        & EQ500Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy500hz & "," & EQ630Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy630hz & "," _
        & EQ1000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy1000hz & "," & EQ1250Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy1250hz & "," _
        & EQ1600Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy1600hz & "," & EQ2000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy2000hz & "," _
        & EQ2500Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy2500hz & "," & EQ3150Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy3150hz & "," _
        & EQ4000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy4000hz & "," & EQ5000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy5000hz & "," _
        & EQ6300Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy6300hz & "," & EQ8000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy8000hz & "," _
        & EQ10000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy10000hz & "," & EQ12500Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy12500hz & "," _
        & EQ16000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy16000hz & "," & EQ20000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy20000hz

ElseIf LowCutFreqFilt = False Then

    EQ_FFmpegStrData = _
          EQ19Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy19hz & "," & EQ20Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy20hz & "," _
        & EQ25Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy25hz & "," & EQ315Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy315hz & "," _
        & EQ33Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy33hz & "," & EQ40Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy40hz & "," _
        & EQ50Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy50hz & "," & EQ63Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy63hz & "," _
        & EQ75Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy75hz & "," & EQ80Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy80hz & "," _
        & EQ125Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy125hz & "," & EQ160Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy160hz & "," _
        & EQ250Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy250hz & "," & EQ313Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy313hz & "," _
        & EQ400Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy400hz & "," & EQ450Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy450hz & "," _
        & EQ500Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy500hz & "," & EQ630Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy630hz & "," _
        & EQ1000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy1000hz & "," & EQ1250Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy1250hz & "," _
        & EQ1600Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy1600hz & "," & EQ2000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy2000hz & "," _
        & EQ2500Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy2500hz & "," & EQ3150Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy3150hz & "," _
        & EQ4000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy4000hz & "," & EQ5000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy5000hz & "," _
        & EQ6300Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy6300hz & "," & EQ8000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy8000hz & "," _
        & EQ10000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy10000hz & "," & EQ12500Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy12500hz & "," _
        & EQ16000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy16000hz & "," & EQ20000Hz & GQ_BandWidthOctave & ":" & "g=" & GQ_Frequncy20000hz
    
End If
 
End With

    Form3.Text1.Text = EQ_FFmpegStrData
    
End Sub
