Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezfit:5x:filespec:intricon_pgm [2016/02/08 16:18]
smayr [PGM File Header]
ezfit:5x:filespec:intricon_pgm [2016/02/09 13:09] (current)
ajdavis [Program File Change Summary]
Line 51: Line 51:
 | Audion 8  | "Audion8 Parameters"  | Audion 8  | "Audion8 Parameters" 
 | Audion 16 (Generic Driver only)  | "Audion16 Parameters"  | Audion 16 (Generic Driver only)  | "Audion16 Parameters" 
-| Scenic  N/A. Uses a different file format. | +| Scenic  | N/A. Uses a different file format. | 
  
 (*) There are two parameter styles for Audion 6 PGM files indicated by the parameter ''"Audion6ParameterStyle"''. If Audion6ParameterStyle is 1, then the parameter style is classic If ''Audion6ParameterStyle'' is 2 then the parameter style is high-low. See the Audion 6 driver manual for more details.  (*) There are two parameter styles for Audion 6 PGM files indicated by the parameter ''"Audion6ParameterStyle"''. If Audion6ParameterStyle is 1, then the parameter style is classic If ''Audion6ParameterStyle'' is 2 then the parameter style is high-low. See the Audion 6 driver manual for more details. 
Line 61: Line 61:
   * Add ''“FileFormatVersion”'' parameter.   * Add ''“FileFormatVersion”'' parameter.
   * Add ''“VC_StartupVol”'' parameter.   * Add ''“VC_StartupVol”'' parameter.
-   +
-  +
 Ethos FileFormatVersion = 2 Ethos FileFormatVersion = 2
   * Add ''“AutoSave”'' parameter.   * Add ''“AutoSave”'' parameter.
   * Add ''“EnableHPmode”'' parameter.   * Add ''“EnableHPmode”'' parameter.
 +
 +== Source Code: PGMReading.bas ==
 +<code vb>
 +Private Const MAXPGMFILELINES = 500
 +Private g_FieldLabel(MAXPGMFILELINES) As String
 +Private g_FieldValue(MAXPGMFILELINES) As String
 +Private PgmLastLine As Integer
 +
 +'Note: uncomment the "found" lines to have error message pop up when 'ValueString' not found in file.
 +Public Function GetValue(ValueString As String) As Integer
 +    Dim k As Integer
 +    Dim tStr As String
 +      dim found as boolean
 +    
 +    If PgmLastLine > MAXPGMFILELINES Then
 +        MsgBox "ERROR: PgmLastLine is greater than possible. This means the contents of the PGM file is greater than this software is designed to handle. Contact software vendor about this error!"
 +        Exit Function
 +    End If
 +      found = False
 +    tStr = ValueString + " = "
 +    GetValue = 0
 +    For k = 0 To PgmLastLine
 +        If UCase(g_FieldLabel(k)) = UCase(tStr) Then
 +            GetValue = CInt(g_FieldValue(k))
 +            k = PgmLastLine + 1
 +                      found = True
 +        End If
 +    Next k
 +    
 +      If not found then msgBox "Parameter not found in program file: " & ValueString
 +
 +End Function
 +
 +'Returns a -1 if parameter not found. Useful for a few special cases.
 +Public Function GetValueWithTest(ValueString As String) As Integer
 +    Dim k As Integer
 +    Dim tStr As String
 +    Dim found As Boolean
 +    
 +    If PgmLastLine > MAXPGMFILELINES Then
 +        MsgBox "ERROR: PgmLastLine is greater than possible. This means the contents of the PGM file is greater than this software is designed to handle. Contact software vendor about this error!"
 +        Exit Function
 +    End If
 +    
 +    found = False
 +    tStr = ValueString + " = "
 +    GetValueWithTest = 0
 +    For k = 0 To PgmLastLine
 +        If UCase(g_FieldLabel(k)) = UCase(tStr) Then
 +            GetValueWithTest = CInt(g_FieldValue(k))
 +            found = True
 +            k = PgmLastLine + 1
 +        End If
 +    Next k
 +
 +    If found = False Then GetValueWithTest = -1
 +
 +End Function
 +
 +
 +'Note: uncomment the "found" lines to have error message pop up when 'ValueString' not found in file.
 +Public Function GetParamsValue(ValueString As String, tPgm As Integer) As Integer
 +    Dim k As Integer
 +    Dim CurrentPgm As Integer
 +    Dim tStr As String
 +      dim found as boolean
 +    
 +    If PgmLastLine > MAXPGMFILELINES Then
 +        MsgBox "ERROR: PgmLastLine is greater than possible. This means the contents of the PGM file is greater than this software is designed to handle. Contact software vendor about this error!"
 +        Exit Function
 +    End If
 +    
 +    tStr = ValueString & " = "
 +   
 +    GetParamsValue = 0
 +    CurrentPgm = 0
 + '      found = False
 +        For k = 0 To PgmLastLine
 +        If UCase(g_FieldLabel(k)) = UCase(tStr) Then
 +            If tPgm = CurrentPgm Then
 +                GetParamsValue = CInt(g_FieldValue(k))
 +                              found = True
 +                k = PgmLastLine + 1
 +            Else
 +                CurrentPgm = CurrentPgm + 1
 +            End If
 +        End If
 +    Next k
 +
 +      If not found then msgBox "Parameter not found in program file: " & ValueString
 +
 +End Function
 +
 +
 +Public Sub Go_save_Ethos_program(save_file_name As String)
 +    If g_OrigPgmFormat Then
 +        SaveEthosV0 save_file_name
 +    Else
 +        SaveEthosV1 save_file_name
 +    End If
 +End Sub
 +
 +
 +
 +Private Sub SaveEthosV0(save_file_name As String)
 +    Dim i As Integer
 +
 +    On Error GoTo SaveEthosV0
 +    'error_code = nzdriver.get_NZ2_config(DLLVersion, NZ2Config(Active_Channel))
 +
 +    Open save_file_name For Output As #1
 +    
 +    Write #1, "Ethos Parameters"
 +    Write #1, "VC_MAP = ", EthosConfig(Active_Channel).VC_MAP
 +    Write #1, "VC_pos = ", EthosConfig(Active_Channel).VC_pos
 +    Write #1, "VC_Range = ", EthosConfig(Active_Channel).VC_Range
 +    Write #1, "ATC = ", EthosConfig(Active_Channel).ATC
 +    Write #1, "AD_Sens = ", EthosConfig(Active_Channel).AD_Sens
 +    Write #1, "Cal_Input = ", EthosConfig(Active_Channel).Cal_Input
 +    Write #1, "Mic_Cal = ", EthosConfig(Active_Channel).Mic_Cal
 +    Write #1, "Switch_Tone = ", EthosConfig(Active_Channel).Switch_Tone
 +    Write #1, "Switch_Mode = ", EthosConfig(Active_Channel).Switch_Mode
 +    Write #1, "Low_Batt_Warning = ", EthosConfig(Active_Channel).Low_Batt_Warning
 +    Write #1, "Tone_Level = ", EthosConfig(Active_Channel).Tone_Level
 +    Write #1, "Tone_Frequency = ", EthosConfig(Active_Channel).Tone_Frequency
 +    Write #1, "Tone_Reference = ", EthosConfig(Active_Channel).Tone_Reference
 +    Write #1, "number_of_programs = ", EthosConfig(Active_Channel).number_of_programs
 +    Write #1, "Noise_Level = ", EthosConfig(Active_Channel).Noise_Level
 +    Write #1, "POD = ", EthosConfig(Active_Channel).POD
 +    Write #1, "POL = ", EthosConfig(Active_Channel).POL
 +    Write #1, "AlgVer_Major = ", EthosConfig(Active_Channel).AlgVer_Major            ' Save Only
 +    Write #1, "AlgVer_Minor = ", EthosConfig(Active_Channel).AlgVer_Minor            ' Save Only
 +
 +    For i = 0 To 4
 +        Write #1,                                                         'blank line
 +        Write #1, "Program_" & i + 1
 +        Write #1, "BEQ1 = ", EthosParams(Active_Channel).BEQ1_gain(i)
 +        Write #1, "BEQ2 = ", EthosParams(Active_Channel).BEQ2_gain(i)
 +        Write #1, "BEQ3 = ", EthosParams(Active_Channel).BEQ3_gain(i)
 +        Write #1, "BEQ4 = ", EthosParams(Active_Channel).BEQ4_gain(i)
 +        Write #1, "BEQ5 = ", EthosParams(Active_Channel).BEQ5_gain(i)
 +        Write #1, "BEQ6 = ", EthosParams(Active_Channel).BEQ6_gain(i)
 +        Write #1, "BEQ7 = ", EthosParams(Active_Channel).BEQ7_gain(i)
 +        Write #1, "BEQ8 = ", EthosParams(Active_Channel).BEQ8_gain(i)
 +        Write #1, "BEQ9 = ", EthosParams(Active_Channel).BEQ9_gain(i)
 +        Write #1, "BEQ10 = ", EthosParams(Active_Channel).BEQ10_gain(i)
 +        Write #1, "BEQ11 = ", EthosParams(Active_Channel).BEQ11_gain(i)
 +        Write #1, "BEQ12 = ", EthosParams(Active_Channel).BEQ12_gain(i)
 +        Write #1, "C1_MPO = ", EthosParams(Active_Channel).C1_MPO(i)
 +        Write #1, "C2_MPO = ", EthosParams(Active_Channel).C2_MPO(i)
 +        Write #1, "C3_MPO = ", EthosParams(Active_Channel).C3_MPO(i)
 +        Write #1, "C4_MPO = ", EthosParams(Active_Channel).C4_MPO(i)
 +        Write #1, "C5_MPO = ", EthosParams(Active_Channel).C5_MPO(i)
 +        Write #1, "C6_MPO = ", EthosParams(Active_Channel).C6_MPO(i)
 +        Write #1, "C7_MPO = ", EthosParams(Active_Channel).C7_MPO(i)
 +        Write #1, "C8_MPO = ", EthosParams(Active_Channel).C8_MPO(i)
 +        Write #1, "C1_Ratio = ", EthosParams(Active_Channel).C1_Ratio(i)
 +        Write #1, "C2_Ratio = ", EthosParams(Active_Channel).C2_Ratio(i)
 +        Write #1, "C3_Ratio = ", EthosParams(Active_Channel).C3_Ratio(i)
 +        Write #1, "C4_Ratio = ", EthosParams(Active_Channel).C4_Ratio(i)
 +        Write #1, "C5_Ratio = ", EthosParams(Active_Channel).C5_Ratio(i)
 +        Write #1, "C6_Ratio = ", EthosParams(Active_Channel).C6_Ratio(i)
 +        Write #1, "C7_Ratio = ", EthosParams(Active_Channel).C7_Ratio(i)
 +        Write #1, "C8_Ratio = ", EthosParams(Active_Channel).C8_Ratio(i)
 +        Write #1, "C1_TK = ", EthosParams(Active_Channel).C1_TK(i)
 +        Write #1, "C2_TK = ", EthosParams(Active_Channel).C2_TK(i)
 +        Write #1, "C3_TK = ", EthosParams(Active_Channel).C3_TK(i)
 +        Write #1, "C4_TK = ", EthosParams(Active_Channel).C4_TK(i)
 +        Write #1, "C5_TK = ", EthosParams(Active_Channel).C5_TK(i)
 +        Write #1, "C6_TK = ", EthosParams(Active_Channel).C6_TK(i)
 +        Write #1, "C7_TK = ", EthosParams(Active_Channel).C7_TK(i)
 +        Write #1, "C8_TK = ", EthosParams(Active_Channel).C8_TK(i)
 +        Write #1, "FBC_Enable = ", EthosParams(Active_Channel).FBC_Enable(i)
 +        Write #1, "input_mux = ", EthosParams(Active_Channel).input_mux(i)
 +        Write #1, "matrix_gain = ", EthosParams(Active_Channel).matrix_gain(i)
 +        Write #1, "Noise_Reduction = ", EthosParams(Active_Channel).Noise_Reduction(i)
 +        Write #1, "preamp_gain0 = ", EthosParams(Active_Channel).preamp_gain0(i)
 +        Write #1, "preamp_gain1 = ", EthosParams(Active_Channel).preamp_gain1(i)
 +        Write #1, "TimeConstants = ", EthosParams(Active_Channel).TimeConstants(i)
 +    Next i
 +
 +    Close #1
 +        
 +Exit Sub
 +SaveEthosV0:
 +    MsgBox "Error saving program file. Error #" & CStr(Err.Number) & " : " & Err.Description
 +    Close #1
 +End Sub
 +
 +'Version 1: adds VC_StartupVol.
 +'
 +'
 +Private Sub SaveEthosV1(save_file_name As String)
 +    Dim i As Integer
 +
 +    On Error GoTo ErrorSaveEthosV1
 +    'error_code = nzdriver.get_NZ2_config(DLLVersion, NZ2Config(Active_Channel))
 +
 +    Open save_file_name For Output As #1
 +    
 +    Write #1, "Ethos Parameters"
 +    Write #1, "FileFormatVersion = ", 1
 +    Write #1, "VC_MAP = ", EthosConfig(Active_Channel).VC_MAP
 +    Write #1, "VC_pos = ", EthosConfig(Active_Channel).VC_pos
 +    Write #1, "VC_Range = ", EthosConfig(Active_Channel).VC_Range
 +    Write #1, "VC_StartupVol = ", EthosVC_PowerUp(Active_Channel)
 +    Write #1, "ATC = ", EthosConfig(Active_Channel).ATC
 +    Write #1, "AD_Sens = ", EthosConfig(Active_Channel).AD_Sens
 +    Write #1, "Cal_Input = ", EthosConfig(Active_Channel).Cal_Input
 +    Write #1, "Mic_Cal = ", EthosConfig(Active_Channel).Mic_Cal
 +    Write #1, "Switch_Tone = ", EthosConfig(Active_Channel).Switch_Tone
 +    Write #1, "Switch_Mode = ", EthosConfig(Active_Channel).Switch_Mode
 +    Write #1, "Low_Batt_Warning = ", EthosConfig(Active_Channel).Low_Batt_Warning
 +    Write #1, "Tone_Level = ", EthosConfig(Active_Channel).Tone_Level
 +    Write #1, "Tone_Frequency = ", EthosConfig(Active_Channel).Tone_Frequency
 +    Write #1, "Tone_Reference = ", EthosConfig(Active_Channel).Tone_Reference
 +    Write #1, "number_of_programs = ", EthosConfig(Active_Channel).number_of_programs
 +    Write #1, "Noise_Level = ", EthosConfig(Active_Channel).Noise_Level
 +    Write #1, "POD = ", EthosConfig(Active_Channel).POD
 +    Write #1, "POL = ", EthosConfig(Active_Channel).POL
 +    Write #1, "AlgVer_Major = ", EthosConfig(Active_Channel).AlgVer_Major            ' Save Only
 +    Write #1, "AlgVer_Minor = ", EthosConfig(Active_Channel).AlgVer_Minor            ' Save Only
 +
 +    For i = 0 To 4
 +        Write #1,                                                         'blank line
 +        Write #1, "Program_" & i + 1
 +        Write #1, "BEQ1 = ", EthosParams(Active_Channel).BEQ1_gain(i)
 +        Write #1, "BEQ2 = ", EthosParams(Active_Channel).BEQ2_gain(i)
 +        Write #1, "BEQ3 = ", EthosParams(Active_Channel).BEQ3_gain(i)
 +        Write #1, "BEQ4 = ", EthosParams(Active_Channel).BEQ4_gain(i)
 +        Write #1, "BEQ5 = ", EthosParams(Active_Channel).BEQ5_gain(i)
 +        Write #1, "BEQ6 = ", EthosParams(Active_Channel).BEQ6_gain(i)
 +        Write #1, "BEQ7 = ", EthosParams(Active_Channel).BEQ7_gain(i)
 +        Write #1, "BEQ8 = ", EthosParams(Active_Channel).BEQ8_gain(i)
 +        Write #1, "BEQ9 = ", EthosParams(Active_Channel).BEQ9_gain(i)
 +        Write #1, "BEQ10 = ", EthosParams(Active_Channel).BEQ10_gain(i)
 +        Write #1, "BEQ11 = ", EthosParams(Active_Channel).BEQ11_gain(i)
 +        Write #1, "BEQ12 = ", EthosParams(Active_Channel).BEQ12_gain(i)
 +        Write #1, "C1_MPO = ", EthosParams(Active_Channel).C1_MPO(i)
 +        Write #1, "C2_MPO = ", EthosParams(Active_Channel).C2_MPO(i)
 +        Write #1, "C3_MPO = ", EthosParams(Active_Channel).C3_MPO(i)
 +        Write #1, "C4_MPO = ", EthosParams(Active_Channel).C4_MPO(i)
 +        Write #1, "C5_MPO = ", EthosParams(Active_Channel).C5_MPO(i)
 +        Write #1, "C6_MPO = ", EthosParams(Active_Channel).C6_MPO(i)
 +        Write #1, "C7_MPO = ", EthosParams(Active_Channel).C7_MPO(i)
 +        Write #1, "C8_MPO = ", EthosParams(Active_Channel).C8_MPO(i)
 +        Write #1, "C1_Ratio = ", EthosParams(Active_Channel).C1_Ratio(i)
 +        Write #1, "C2_Ratio = ", EthosParams(Active_Channel).C2_Ratio(i)
 +        Write #1, "C3_Ratio = ", EthosParams(Active_Channel).C3_Ratio(i)
 +        Write #1, "C4_Ratio = ", EthosParams(Active_Channel).C4_Ratio(i)
 +        Write #1, "C5_Ratio = ", EthosParams(Active_Channel).C5_Ratio(i)
 +        Write #1, "C6_Ratio = ", EthosParams(Active_Channel).C6_Ratio(i)
 +        Write #1, "C7_Ratio = ", EthosParams(Active_Channel).C7_Ratio(i)
 +        Write #1, "C8_Ratio = ", EthosParams(Active_Channel).C8_Ratio(i)
 +        Write #1, "C1_TK = ", EthosParams(Active_Channel).C1_TK(i)
 +        Write #1, "C2_TK = ", EthosParams(Active_Channel).C2_TK(i)
 +        Write #1, "C3_TK = ", EthosParams(Active_Channel).C3_TK(i)
 +        Write #1, "C4_TK = ", EthosParams(Active_Channel).C4_TK(i)
 +        Write #1, "C5_TK = ", EthosParams(Active_Channel).C5_TK(i)
 +        Write #1, "C6_TK = ", EthosParams(Active_Channel).C6_TK(i)
 +        Write #1, "C7_TK = ", EthosParams(Active_Channel).C7_TK(i)
 +        Write #1, "C8_TK = ", EthosParams(Active_Channel).C8_TK(i)
 +        Write #1, "FBC_Enable = ", EthosParams(Active_Channel).FBC_Enable(i)
 +        Write #1, "input_mux = ", EthosParams(Active_Channel).input_mux(i)
 +        Write #1, "matrix_gain = ", EthosParams(Active_Channel).matrix_gain(i)
 +        Write #1, "Noise_Reduction = ", EthosParams(Active_Channel).Noise_Reduction(i)
 +        Write #1, "preamp_gain0 = ", EthosParams(Active_Channel).preamp_gain0(i)
 +        Write #1, "preamp_gain1 = ", EthosParams(Active_Channel).preamp_gain1(i)
 +        Write #1, "TimeConstants = ", EthosParams(Active_Channel).TimeConstants(i)
 +    Next i
 +
 +    Close #1
 +        
 +Exit Sub
 +ErrorSaveEthosV1:
 +    MsgBox "Error saving program file. Error #" & CStr(Err.Number) & " : " & Err.Description
 +    Close #1
 +End Sub
 +
 +
 +
 +Public Sub Go_open_Ethos_program(open_file_name As String)
 +    Dim tShort As Integer
 +    Dim k As Integer
 +    Dim temp_input As Integer
 +    Dim tStr As String
 +    
 +    On Error GoTo Ethos_pgm_file_error
 +    
 +    Open open_file_name For Input As #1
 +    Input #1, tStr
 +    If tStr <> "Ethos Parameters" Then
 +        MsgBox "The Parameter File selected does not appear to be for Ethos or Overtus: " & Chr(13) & Chr(13) & open_file_name, vbOKOnly, "Error"
 +        Close #1
 +        Exit Sub
 +    End If
 +    
 +    k = 0
 +    Do While Not EOF(1) And k < MAXPGMFILELINES   ' Loop until end of file.
 +        Input #1, g_FieldLabel(k), temp_input
 +        g_FieldValue(k) = temp_input
 +        k = k + 1
 +    Loop
 +    PgmLastLine = k - 1
 +    Close #1   ' Close file
 +    
 +    EthosConfig(Active_Channel).VC_MAP = GetValue("VC_MAP")
 +    EthosConfig(Active_Channel).VC_pos = GetValue("VC_pos")
 +    EthosConfig(Active_Channel).VC_Range = GetValue("VC_Range")
 +    EthosConfig(Active_Channel).ATC = GetValue("ATC")
 +    EthosConfig(Active_Channel).AD_Sens = GetValue("AD_Sens")
 +    EthosConfig(Active_Channel).Cal_Input = GetValue("Cal_Input")
 +    EthosConfig(Active_Channel).Mic_Cal = GetValue("Mic_Cal")
 +    EthosConfig(Active_Channel).Switch_Tone = GetValue("Switch_Tone")
 +    EthosConfig(Active_Channel).Low_Batt_Warning = GetValue("Low_Batt_Warning")
 +    EthosConfig(Active_Channel).Tone_Level = GetValue("Tone_Level")
 +    EthosConfig(Active_Channel).Tone_Frequency = GetValue("Tone_Frequency")
 +    EthosConfig(Active_Channel).number_of_programs = GetValue("number_of_programs")
 +    EthosConfig(Active_Channel).Noise_Level = GetValue("Noise_Level")
 +    EthosConfig(Active_Channel).POD = GetValue("POD")
 +    EthosConfig(Active_Channel).POL = GetValue("POL")
 +    EthosConfig(Active_Channel).Switch_Mode = GetValue("Switch_Mode")
 +    EthosConfig(Active_Channel).Tone_Reference = GetValue("Tone_Reference")
 +    EthosVC_PowerUp(Active_Channel) = GetValue("VC_StartupVol")
 +
 +    For Active_Program = 0 To 4
 +        EthosParams(Active_Channel).BEQ1_gain(Active_Program) = GetParamsValue("BEQ1", Active_Program)
 +        EthosParams(Active_Channel).BEQ2_gain(Active_Program) = GetParamsValue("BEQ2", Active_Program)
 +        EthosParams(Active_Channel).BEQ3_gain(Active_Program) = GetParamsValue("BEQ3", Active_Program)
 +        EthosParams(Active_Channel).BEQ4_gain(Active_Program) = GetParamsValue("BEQ4", Active_Program)
 +        EthosParams(Active_Channel).BEQ5_gain(Active_Program) = GetParamsValue("BEQ5", Active_Program)
 +        EthosParams(Active_Channel).BEQ6_gain(Active_Program) = GetParamsValue("BEQ6", Active_Program)
 +        EthosParams(Active_Channel).BEQ7_gain(Active_Program) = GetParamsValue("BEQ7", Active_Program)
 +        EthosParams(Active_Channel).BEQ8_gain(Active_Program) = GetParamsValue("BEQ8", Active_Program)
 +        EthosParams(Active_Channel).BEQ9_gain(Active_Program) = GetParamsValue("BEQ9", Active_Program)
 +        EthosParams(Active_Channel).BEQ10_gain(Active_Program) = GetParamsValue("BEQ10", Active_Program)
 +        EthosParams(Active_Channel).BEQ11_gain(Active_Program) = GetParamsValue("BEQ11", Active_Program)
 +        EthosParams(Active_Channel).BEQ12_gain(Active_Program) = GetParamsValue("BEQ12", Active_Program)
 +        EthosParams(Active_Channel).C1_MPO(Active_Program) = GetParamsValue("C1_MPO", Active_Program)
 +        EthosParams(Active_Channel).C1_Ratio(Active_Program) = GetParamsValue("C1_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C1_TK(Active_Program) = GetParamsValue("C1_TK", Active_Program)
 +        EthosParams(Active_Channel).C2_MPO(Active_Program) = GetParamsValue("C2_MPO", Active_Program)
 +        EthosParams(Active_Channel).C2_Ratio(Active_Program) = GetParamsValue("C2_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C2_TK(Active_Program) = GetParamsValue("C2_TK", Active_Program)
 +        EthosParams(Active_Channel).C3_MPO(Active_Program) = GetParamsValue("C3_MPO", Active_Program)
 +        EthosParams(Active_Channel).C3_Ratio(Active_Program) = GetParamsValue("C3_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C3_TK(Active_Program) = GetParamsValue("C3_TK", Active_Program)
 +        EthosParams(Active_Channel).C4_MPO(Active_Program) = GetParamsValue("C4_MPO", Active_Program)
 +        EthosParams(Active_Channel).C4_Ratio(Active_Program) = GetParamsValue("C4_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C4_TK(Active_Program) = GetParamsValue("C4_TK", Active_Program)
 +        EthosParams(Active_Channel).C5_MPO(Active_Program) = GetParamsValue("C5_MPO", Active_Program)
 +        EthosParams(Active_Channel).C5_Ratio(Active_Program) = GetParamsValue("C5_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C5_TK(Active_Program) = GetParamsValue("C5_TK", Active_Program)
 +        EthosParams(Active_Channel).C6_MPO(Active_Program) = GetParamsValue("C6_MPO", Active_Program)
 +        EthosParams(Active_Channel).C6_Ratio(Active_Program) = GetParamsValue("C6_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C6_TK(Active_Program) = GetParamsValue("C6_TK", Active_Program)
 +        EthosParams(Active_Channel).C7_MPO(Active_Program) = GetParamsValue("C7_MPO", Active_Program)
 +        EthosParams(Active_Channel).C7_Ratio(Active_Program) = GetParamsValue("C7_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C7_TK(Active_Program) = GetParamsValue("C7_TK", Active_Program)
 +        EthosParams(Active_Channel).C8_MPO(Active_Program) = GetParamsValue("C8_MPO", Active_Program)
 +        EthosParams(Active_Channel).C8_Ratio(Active_Program) = GetParamsValue("C8_Ratio", Active_Program)
 +        EthosParams(Active_Channel).C8_TK(Active_Program) = GetParamsValue("C8_TK", Active_Program)
 +        EthosParams(Active_Channel).FBC_Enable(Active_Program) = GetParamsValue("FBC_Enable", Active_Program)
 +        EthosParams(Active_Channel).matrix_gain(Active_Program) = GetParamsValue("matrix_gain", Active_Program)
 +        EthosParams(Active_Channel).Noise_Reduction(Active_Program) = GetParamsValue("Noise_Reduction", Active_Program)
 +        EthosParams(Active_Channel).preamp_gain0(Active_Program) = GetParamsValue("preamp_gain0", Active_Program)
 +        EthosParams(Active_Channel).preamp_gain1(Active_Program) = GetParamsValue("preamp_gain1", Active_Program)
 +        EthosParams(Active_Channel).TimeConstants(Active_Program) = GetParamsValue("TimeConstants", Active_Program)
 +        EthosParams(Active_Channel).input_mux(Active_Program) = GetParamsValue("input_mux", Active_Program)
 +    Next Active_Program
  
  
 +Exit Sub
 +Ethos_pgm_file_error:
 +    MsgBox "Error opening Ethos program file. Error #" & CStr(Err.Number) & " : " & Err.Description
 +    Close #1
 +End Sub
 +</code>