Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ezfit:5x:filespec:intricon_pgm [2016/02/08 16:15] smayr created |
ezfit:5x:filespec:intricon_pgm [2016/02/09 13:09] (current) ajdavis [Program File Change Summary] |
||
---|---|---|---|
Line 37: | Line 37: | ||
Here is a list of header for each nanoDSPs: | Here is a list of header for each nanoDSPs: | ||
- | | nanoDSP Amplifier | + | ^ nanoDSP Amplifier |
- | ^ DigitalOne 2CH (NZ1) ^ " | + | | DigitalOne 2CH (NZ1) | " |
- | ^ DigitalOne 4CH (NZ2) ^ "NZ2 Parameters" | + | | DigitalOne 4CH (NZ2) | "NZ2 Parameters" |
- | ^ DigitalOne 4CH NR+ (NZ3) | + | | DigitalOne 4CH NR+ (NZ3) |
- | ^ InTune | + | | InTune |
- | ^ Spin | + | | Spin |
- | ^ Ethos | + | | Ethos |
- | ^ Overtus | + | | Overtus |
- | ^ SpinNR | + | | SpinNR |
- | ^ Essential 150 | + | | Essential 150 |
- | ^ *Audion 6 | + | | Audion 6(*) | " |
- | ^ Audion 4 | + | | Audion 4 |
- | ^ Audion 8 | + | | Audion 8 |
- | ^ Audion 16 (Generic Driver only) | + | | Audion 16 (Generic Driver only) |
- | ^ Scenic | + | | Scenic |
- | * There are two parameter styles for Audion 6 PGM files indicated by the parameter ''" | + | (*) There are two parameter styles for Audion 6 PGM files indicated by the parameter ''" |
Line 61: | Line 61: | ||
* Add '' | * Add '' | ||
* Add '' | * Add '' | ||
- | + | ||
- | | + | |
Ethos FileFormatVersion = 2 | Ethos FileFormatVersion = 2 | ||
* Add '' | * Add '' | ||
* Add '' | * Add '' | ||
+ | |||
+ | == 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 " | ||
+ | Public Function GetValue(ValueString As String) As Integer | ||
+ | Dim k As Integer | ||
+ | Dim tStr As String | ||
+ | ' | ||
+ | | ||
+ | If PgmLastLine > MAXPGMFILELINES Then | ||
+ | MsgBox " | ||
+ | Exit Function | ||
+ | End If | ||
+ | ' | ||
+ | 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 | ||
+ | ' | ||
+ | End If | ||
+ | Next k | ||
+ | | ||
+ | ' | ||
+ | |||
+ | End Function | ||
+ | |||
+ | ' | ||
+ | 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 " | ||
+ | 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 " | ||
+ | Public Function GetParamsValue(ValueString As String, tPgm As Integer) As Integer | ||
+ | Dim k As Integer | ||
+ | Dim CurrentPgm As Integer | ||
+ | Dim tStr As String | ||
+ | ' | ||
+ | | ||
+ | If PgmLastLine > MAXPGMFILELINES Then | ||
+ | MsgBox " | ||
+ | Exit Function | ||
+ | End If | ||
+ | | ||
+ | tStr = ValueString & " = " | ||
+ | |||
+ | GetParamsValue = 0 | ||
+ | CurrentPgm = 0 | ||
+ | ' | ||
+ | For k = 0 To PgmLastLine | ||
+ | If UCase(g_FieldLabel(k)) = UCase(tStr) Then | ||
+ | If tPgm = CurrentPgm Then | ||
+ | GetParamsValue = CInt(g_FieldValue(k)) | ||
+ | ' | ||
+ | k = PgmLastLine + 1 | ||
+ | Else | ||
+ | CurrentPgm = CurrentPgm + 1 | ||
+ | End If | ||
+ | End If | ||
+ | Next k | ||
+ | |||
+ | ' | ||
+ | |||
+ | 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 | ||
+ | ' | ||
+ | |||
+ | Open save_file_name For Output As #1 | ||
+ | | ||
+ | Write #1, "Ethos Parameters" | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, "ATC = ", EthosConfig(Active_Channel).ATC | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, "POD = ", EthosConfig(Active_Channel).POD | ||
+ | Write #1, "POL = ", EthosConfig(Active_Channel).POL | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | |||
+ | For i = 0 To 4 | ||
+ | Write #1, ' | ||
+ | Write #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, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | 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, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Next i | ||
+ | |||
+ | Close #1 | ||
+ | | ||
+ | Exit Sub | ||
+ | SaveEthosV0: | ||
+ | MsgBox "Error saving program file. Error #" & CStr(Err.Number) & " : " & Err.Description | ||
+ | Close #1 | ||
+ | End Sub | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | Private Sub SaveEthosV1(save_file_name As String) | ||
+ | Dim i As Integer | ||
+ | |||
+ | On Error GoTo ErrorSaveEthosV1 | ||
+ | ' | ||
+ | |||
+ | Open save_file_name For Output As #1 | ||
+ | | ||
+ | Write #1, "Ethos Parameters" | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, "ATC = ", EthosConfig(Active_Channel).ATC | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, "POD = ", EthosConfig(Active_Channel).POD | ||
+ | Write #1, "POL = ", EthosConfig(Active_Channel).POL | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | |||
+ | For i = 0 To 4 | ||
+ | Write #1, ' | ||
+ | Write #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, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | 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, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | Write #1, " | ||
+ | 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" | ||
+ | MsgBox "The Parameter File selected does not appear to be for Ethos or Overtus: " & Chr(13) & Chr(13) & open_file_name, | ||
+ | Close #1 | ||
+ | Exit Sub | ||
+ | End If | ||
+ | | ||
+ | k = 0 | ||
+ | Do While Not EOF(1) And k < MAXPGMFILELINES | ||
+ | Input #1, g_FieldLabel(k), | ||
+ | g_FieldValue(k) = temp_input | ||
+ | k = k + 1 | ||
+ | Loop | ||
+ | PgmLastLine = k - 1 | ||
+ | Close #1 ' | ||
+ | | ||
+ | EthosConfig(Active_Channel).VC_MAP = GetValue(" | ||
+ | EthosConfig(Active_Channel).VC_pos = GetValue(" | ||
+ | EthosConfig(Active_Channel).VC_Range = GetValue(" | ||
+ | EthosConfig(Active_Channel).ATC = GetValue(" | ||
+ | EthosConfig(Active_Channel).AD_Sens = GetValue(" | ||
+ | EthosConfig(Active_Channel).Cal_Input = GetValue(" | ||
+ | EthosConfig(Active_Channel).Mic_Cal = GetValue(" | ||
+ | EthosConfig(Active_Channel).Switch_Tone = GetValue(" | ||
+ | EthosConfig(Active_Channel).Low_Batt_Warning = GetValue(" | ||
+ | EthosConfig(Active_Channel).Tone_Level = GetValue(" | ||
+ | EthosConfig(Active_Channel).Tone_Frequency = GetValue(" | ||
+ | EthosConfig(Active_Channel).number_of_programs = GetValue(" | ||
+ | EthosConfig(Active_Channel).Noise_Level = GetValue(" | ||
+ | EthosConfig(Active_Channel).POD = GetValue(" | ||
+ | EthosConfig(Active_Channel).POL = GetValue(" | ||
+ | EthosConfig(Active_Channel).Switch_Mode = GetValue(" | ||
+ | EthosConfig(Active_Channel).Tone_Reference = GetValue(" | ||
+ | EthosVC_PowerUp(Active_Channel) = GetValue(" | ||
+ | |||
+ | For Active_Program = 0 To 4 | ||
+ | EthosParams(Active_Channel).BEQ1_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ2_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ3_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ4_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ5_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ6_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ7_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ8_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ9_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ10_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ11_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).BEQ12_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C1_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C1_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C1_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C2_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C2_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C2_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C3_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C3_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C3_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C4_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C4_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C4_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C5_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C5_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C5_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C6_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C6_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C6_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C7_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C7_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C7_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C8_MPO(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C8_Ratio(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).C8_TK(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).FBC_Enable(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).matrix_gain(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).Noise_Reduction(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).preamp_gain0(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).preamp_gain1(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).TimeConstants(Active_Program) = GetParamsValue(" | ||
+ | EthosParams(Active_Channel).input_mux(Active_Program) = GetParamsValue(" | ||
+ | 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 | ||
+ | </ |