Cut to Chase:
This is kind of a black box situation. I’m trying to decipher the filter commands going to a dsp from a computer based interface. I want to be able to emulate the computer and send my own commands to the box.
The Long of It:
Here’s what I know. The DSP chip is a Sharc ADSP21161.
I’m 98% sure that the sampling rate is 48Khz and the bit depth 24bit.
Each filter command to the unit is comprised of 200 hex characters (100bytes).
Each command applies to 3 of what I’m calling “banks”.
Each bank can hold an EQ filter.
The filter options include:
Parametric -> Bandwidth, Frequency and Boost/Cut
Low Shelving -> 6db or 12db per octave, Frequency and Boost/Cut
High Shelving -> 6db or 12db per octave, Frequency and Boost/Cut
Low pass -> 6db or 12db per octave, response: Butterworth or Bessel
High pass -> 6db or 12db per octave, response: Butterworth or Bessel
Bandpass -> Bandwidth and Frequency
Frequencies are counted in 5hz increments. Boost and Cut are in 1db increments.
Example command for High shelf 5Khz 12db/oct +1db written to the 2nd bank:
9659E23D0000803F32D6533EFD5D643FBCBB11BF2EE54B3F8CCC1A3FE4B9A43EEFFC0B3E073D8EBFFB61B53D77F
E7E3F9EC4B83EFB8370BF2B051DBFEB7F57BF19300A3F00000000000000000000030201008813F304353F000000000
000000000000000
Mystery 1:
The last 32 bytes are apparently intended to be written to the DSP for the purpose of being read back at a later time by the computer so it knows what filters are loaded. The first 10 bytes (of these last 32 bytes) are for bank 1. The next 10 bytes for bank 2 etc. The last 2 bytes appear to be padding as they don’t change always sitting at 0000. What I’ve been able to decode of this is shown in this graphic. The first byte indicates which filter type (parametric, high pass etc). The first mystery is how to decode the frequency. I haven’t been able to decipher if it’s simply a number conversion thing or if the frequencies are actually written into a table and this simply represents the index of that table. 5Khz = 008813, 100Hz = 006400, 500Hz = 00F401, 1Khz = 00E803
Mystery 2:
The 4 bytes immediately following the frequency indicate the response shape of the filter. Any filters that don’t have a response shape show F304353F for this data which appears to correspond with Butterworth shape. A Bessel response (for a High pass) is 0000003F. And Bandwidth of 3.99 for a parametric filter is 8988883E. Not sure what these numbers equate to.
Mystery 3: The big one!
I assume that the first 68 bytes (leading up to the 3 banks at the end) are comprised of filter coefficients. But instead of a set of coefficients for each bank it looks like all the values* change no matter if it’s changing one bank or all of them. If I put a particular filter into the first bank it will produce the same 68 bytes that it does if putting the same filter into bank 2 or 3. But only if that is the only filter (the other banks are empty). If I populate 2 banks with filters then the 68 bytes don’t match. The 68 bytes define a combined response for all 3 banks together. If I put a high pass in bank 1 and a low pass in bank 2 and then swap the 2 filters such that the high pass is in bank 2 and the low pass in bank 1, the 68 bytes for the 2 different configurations are identical.
*[The first 3 bytes are different for each different set of filters but the 3 bytes following appear to change only subtly depending on if a filter has a corner frequency below a certain frequency. 3A0000 if the frequency is below 35Hz. 3B0000 between 35Hz and 125Hz. 3C0000 between 130Hz and 585Hz. 3D0000 above 590Hz till around 7Khz. Everything after that is different for each different filter or set of filters.]
I recognize that there are a lot of different filter implementations and this might be a needle in a haystack but I’m hoping that “textbook” filters are at play here and once a few things a figured out the rest will fall into place. Being a beginner with DSP coefficients I’m hoping to at least learn from this process. So, anyone “recognize” any faces here? Perhaps there is a Sharc filter tool that was used to develop this and it’s clear where the scheme came from?
More examples:
bank 1 = High shelf 12db/oct 5Khz +1db
bank 2 = High shelf 12db/oct 5Khz +3db
126BBC3D0000803FB4621D3E39388E3F221382BE6E755D3FDC6B003F39EF8E3E1114683F9D229EBF4ED4D43EA4D5
683FA844F33E62F88ABF68BE93BF8ABB37BFCA43323F030201008813F304353F030203008813F304353F0000000000
00000000000000
bank 1 = High pass filter 100hz, 6db/oct butterworth:
755DCE3B000000001F03A83E12A95F3F54CAF8BE7BAB5C3FADC5013FC44BAA3EB9A98E3BFBFD7FBF96AA0EBBD8F
F7F3FA777AA3E738D5DBF354200BFF7C65DBFB6BDFF3E050100006400F304353F0000000000000000000000000000
0000000000000000
This is kind of a black box situation. I’m trying to decipher the filter commands going to a dsp from a computer based interface. I want to be able to emulate the computer and send my own commands to the box.
The Long of It:
Here’s what I know. The DSP chip is a Sharc ADSP21161.
I’m 98% sure that the sampling rate is 48Khz and the bit depth 24bit.
Each filter command to the unit is comprised of 200 hex characters (100bytes).
Each command applies to 3 of what I’m calling “banks”.
Each bank can hold an EQ filter.
The filter options include:
Parametric -> Bandwidth, Frequency and Boost/Cut
Low Shelving -> 6db or 12db per octave, Frequency and Boost/Cut
High Shelving -> 6db or 12db per octave, Frequency and Boost/Cut
Low pass -> 6db or 12db per octave, response: Butterworth or Bessel
High pass -> 6db or 12db per octave, response: Butterworth or Bessel
Bandpass -> Bandwidth and Frequency
Frequencies are counted in 5hz increments. Boost and Cut are in 1db increments.
Example command for High shelf 5Khz 12db/oct +1db written to the 2nd bank:
9659E23D0000803F32D6533EFD5D643FBCBB11BF2EE54B3F8CCC1A3FE4B9A43EEFFC0B3E073D8EBFFB61B53D77F
E7E3F9EC4B83EFB8370BF2B051DBFEB7F57BF19300A3F00000000000000000000030201008813F304353F000000000
000000000000000
Mystery 1:
The last 32 bytes are apparently intended to be written to the DSP for the purpose of being read back at a later time by the computer so it knows what filters are loaded. The first 10 bytes (of these last 32 bytes) are for bank 1. The next 10 bytes for bank 2 etc. The last 2 bytes appear to be padding as they don’t change always sitting at 0000. What I’ve been able to decode of this is shown in this graphic. The first byte indicates which filter type (parametric, high pass etc). The first mystery is how to decode the frequency. I haven’t been able to decipher if it’s simply a number conversion thing or if the frequencies are actually written into a table and this simply represents the index of that table. 5Khz = 008813, 100Hz = 006400, 500Hz = 00F401, 1Khz = 00E803
Mystery 2:
The 4 bytes immediately following the frequency indicate the response shape of the filter. Any filters that don’t have a response shape show F304353F for this data which appears to correspond with Butterworth shape. A Bessel response (for a High pass) is 0000003F. And Bandwidth of 3.99 for a parametric filter is 8988883E. Not sure what these numbers equate to.
Mystery 3: The big one!
I assume that the first 68 bytes (leading up to the 3 banks at the end) are comprised of filter coefficients. But instead of a set of coefficients for each bank it looks like all the values* change no matter if it’s changing one bank or all of them. If I put a particular filter into the first bank it will produce the same 68 bytes that it does if putting the same filter into bank 2 or 3. But only if that is the only filter (the other banks are empty). If I populate 2 banks with filters then the 68 bytes don’t match. The 68 bytes define a combined response for all 3 banks together. If I put a high pass in bank 1 and a low pass in bank 2 and then swap the 2 filters such that the high pass is in bank 2 and the low pass in bank 1, the 68 bytes for the 2 different configurations are identical.
*[The first 3 bytes are different for each different set of filters but the 3 bytes following appear to change only subtly depending on if a filter has a corner frequency below a certain frequency. 3A0000 if the frequency is below 35Hz. 3B0000 between 35Hz and 125Hz. 3C0000 between 130Hz and 585Hz. 3D0000 above 590Hz till around 7Khz. Everything after that is different for each different filter or set of filters.]
I recognize that there are a lot of different filter implementations and this might be a needle in a haystack but I’m hoping that “textbook” filters are at play here and once a few things a figured out the rest will fall into place. Being a beginner with DSP coefficients I’m hoping to at least learn from this process. So, anyone “recognize” any faces here? Perhaps there is a Sharc filter tool that was used to develop this and it’s clear where the scheme came from?
More examples:
bank 1 = High shelf 12db/oct 5Khz +1db
bank 2 = High shelf 12db/oct 5Khz +3db
126BBC3D0000803FB4621D3E39388E3F221382BE6E755D3FDC6B003F39EF8E3E1114683F9D229EBF4ED4D43EA4D5
683FA844F33E62F88ABF68BE93BF8ABB37BFCA43323F030201008813F304353F030203008813F304353F0000000000
00000000000000
bank 1 = High pass filter 100hz, 6db/oct butterworth:
755DCE3B000000001F03A83E12A95F3F54CAF8BE7BAB5C3FADC5013FC44BAA3EB9A98E3BFBFD7FBF96AA0EBBD8F
F7F3FA777AA3E738D5DBF354200BFF7C65DBFB6BDFF3E050100006400F304353F0000000000000000000000000000
0000000000000000