Bug in the FBQ2496 MIDI loader

LucaB

Registered
Thread Starter
Joined
Oct 13, 2018
Messages
3
After some days spend wondering why, after loading the filters in my FBQ2496, the room seems to answer even worst, I think I found a bug in the REW MIDI Loader.

These are the filters I was trying to upload:
Filter 1: ON PEQ Fc 41.3 Hz Gain -10.5 dB BW Oct 0.167
Filter 2: ON PEQ Fc 44.3 Hz Gain 12.5 dB BW Oct 0.250
Filter 3: ON PEQ Fc 53.2 Hz Gain -8.0 dB BW Oct 0.250
Filter 4: ON PEQ Fc 63.2 Hz Gain -5.0 dB BW Oct 0.143
Filter 5: ON PEQ Fc 76.0 Hz Gain -7.0 dB BW Oct 0.167
Filter 6: ON PEQ Fc 85.3 Hz Gain -10.5 dB BW Oct 0.143
Filter 7: ON PEQ Fc 91.4 Hz Gain 15.0 dB BW Oct 0.333
Filter 8: ON PEQ Fc 112 Hz Gain -19.0 dB BW Oct 0.333
Filter 9: ON PEQ Fc 153 Hz Gain 13.0 dB BW Oct 0.167
Filter 10: ON PEQ Fc 166 Hz Gain -8.0 dB BW Oct 0.143
Filter 11: ON PEQ Fc 230 Hz Gain 4.5 dB BW Oct 0.200
Filter 12: ON PEQ Fc 261 Hz Gain -5.0 dB BW Oct 0.143
Filter 13: ON PEQ Fc 324 Hz Gain -5.5 dB BW Oct 0.250
Filter 14: ON PEQ Fc 438 Hz Gain -4.5 dB BW Oct 0.250
Filter 15: ON PEQ Fc 935 Hz Gain -5.5 dB BW Oct 0.200
Filter 16: ON PEQ Fc 957 Hz Gain 2.5 dB BW Oct 0.167
Filter 17: ON PEQ Fc 1449 Hz Gain 8.5 dB BW Oct 0.500
Filter 18: ON PEQ Fc 2404 Hz Gain -2.5 dB BW Oct 0.333
Filter 19: ON PEQ Fc 3206 Hz Gain 3.0 dB BW Oct 0.167
Filter 20: ON PEQ Fc 6935 Hz Gain -1.5 dB BW Oct 1.500

And that is what is actually load (as verified interrogating manually the FBQ2496 interface).
Filter 1: ON PEQ Fc 39.4 Hz Gain -10.5 dB BW Oct 0.167
Filter 2: ON PEQ Fc 42.7 Hz Gain 12.5 dB BW Oct 0.250
Filter 3: ON PEQ Fc 51.4 Hz Gain -8.0 dB BW Oct 0.250
Filter 4: ON PEQ Fc 61.8 Hz Gain -5.0 dB BW Oct 0.143
Filter 5: ON PEQ Fc 74.3 Hz Gain -7.0 dB BW Oct 0.167
Filter 6: ON PEQ Fc 82.4 Hz Gain -10.5 dB BW Oct 0.143
Filter 7: ON PEQ Fc 89.3 Hz Gain 15.0 dB BW Oct 0.333
Filter 8: ON PEQ Fc 108 Hz Gain -19.0 dB BW Oct 0.333
Filter 9: ON PEQ Fc 151 Hz Gain 13.0 dB BW Oct 0.167
Filter 10: ON PEQ Fc 166 Hz Gain -8.0 dB BW Oct 0.143
Filter 11: ON PEQ Fc 224 Hz Gain 4.5 dB BW Oct 0.200
Filter 12: ON PEQ Fc 248 Hz Gain -5.0 dB BW Oct 0.143
Filter 13: ON PEQ Fc 320 Hz Gain -5.5 dB BW Oct 0.250
Filter 14: ON PEQ Fc 427 Hz Gain -4.5 dB BW Oct 0.250
Filter 15: ON PEQ Fc 903 Hz Gain -5.5 dB BW Oct 0.200
Filter 16: ON PEQ Fc 957 Hz Gain 2.5 dB BW Oct 0.167
Filter 17: ON PEQ Fc 1410 Hz Gain 8.5 dB BW Oct 0.500
Filter 18: ON PEQ Fc 2404 Hz Gain -2.5 dB BW Oct 0.333
Filter 19: ON PEQ Fc 3160 Hz Gain 3.0 dB BW Oct 0.167
Filter 20: ON PEQ Fc 6770 Hz Gain -1.5 dB BW Oct 1.500

Apparently, the uploaded MIDI codes of frequencies are wrong and very often reduced by 2-3 codes.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
The FBQ midi interface seems prone to misreading the data sent to it, that is why there is an "FBQ filter delay" setting in the Comms preferences. Try changing (increasing, most likely) that to see if it gives more reliable transfers.
 

LucaB

Registered
Thread Starter
Joined
Oct 13, 2018
Messages
3
Thank you for the suggestion!
I tried with 1000, 1200, 1500 and 2000 ms. (REW does not allow values out of range 1000-2000) but the uploaded frequencies are always the same...
 
Last edited:

LucaB

Registered
Thread Starter
Joined
Oct 13, 2018
Messages
3
I looked at the FBQ2496 manual and the conversion from frequency to MIDI code is quite obscure. Maybe there's a problem of implementation on REW, due to lack of information?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
Worked correctly on my unit, but it has been a few years since I used that. I'll see if I can get it running again to check.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
I got a Midi interface running (very painful on Windows 10) and tested with your filter settings on my FBQ2496. I had fewer problems than you, just 1 frequency wrong on each of several transfers to the left bank (a different filter each time) and all the frequencies correct on a transfer to the right bank, but there were often one or more filters with gain of zero instead of the correct figure. Midi transfers to the BFD1124P (now called FBQ1000) are very reliable, though that unit needed a firmware upgrade (v1.4) for Midi to work at all. I think the problem is with the FBQ2496, I have added a warning to the setup message.

warning.jpg

You do have some pretty extreme EQ values by the way, likely to do more harm than good. This thread has some relevant discussion.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
Hi, I understand this is an old thread, but the problems with the MIDI implementation remain.
I put together a simple python script to generate a lookup table between all available frequency steps and MIDI CC messages.

Please see attached text files.
I hope that they can help you to fix the support for FBQ2596, which I think is a cost-effective and well-functioning solution in my home studio where low latency and balanced connections are important.
 

Attachments

  • fbq2496-freq-to-midi-cc-table.txt
    7.2 KB · Views: 10
  • fbq2496-bw-to-midi-cc-table.txt
    192 bytes · Views: 8

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
Hi, I understand this is an old thread, but the problems with the MIDI implementation remain.
I put together a simple python script to generate a lookup table between all available frequency steps and MIDI CC messages.

Please see attached text files.
I hope that they can help you to fix the support for FBQ2596, which I think is a cost-effective and well-functioning solution in my home studio where low latency and balanced connections are important.
And I forgot, MIDI Monitor confirms that REW is sending all required MIDI CC values.
But the mapping between available frequency steps and values for FREQ_COARSE (CC 14) and FREQ_FINE (CC 46) seams to not to be correct.

Regards,
/Michael
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
And I forgot, MIDI Monitor confirms that REW is sending all required MIDI CC values.
But the mapping between available frequency steps and values for FREQ_COARSE (CC 14) and FREQ_FINE (CC 46) seams to not to be correct.

Regards,
/Michael
And, sorry, the same goes for available bandwidth steps (CC 15).
Regards,
/Michael
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
Are there some specific value mappings you believe to be incorrect? It is worth noting that the FBQ appears to internally use frequencies that have 5-digit precision rather than the 3 digits it displays, the frequencies themselves being spaced at 200 steps per decade.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
OK I understand.
But It looks like there are bigger differences then the precision between what the display shows and and what REW says the center frequency should be.
Maybe I'm wrong but, you can't assign any other frequencies via MIDI then the steps that are available as selectable CC values in the FBQ2496 MIDI specification in the manual, correct?

And I don't really understand how Behringer has distributed frequency values on the available MIDI CC values.
My table based on all available MIDI CC values and what the display shows looks a bit strange to me.

But I will come back with better information.
I think the filters exported in from REW in text format, along with a log of what REW sends via MIDI, and manually measured center frequency and bandwidth for each filter in the FBQ2496 should answer your question.

It could be that I'm completely wrong here and I realize that it would be a better approach to measure the center frequency of the filter in the FBQ2496 than to interpret the display.
Now I step through all available values for FREQ_COARSE (CC 14, value 0-75) and the lower bound values of the FREQ_FINE (CC 46, value 0,16,32,48,64,80,96,112).

I know that it is possible to generate frequency sweeps () with and analyze with Python's nympy, but my DSP knowledge is very limited.
So if anyone can help me with that part of the Python code to send a sweep thru the FBQ2496 and get the real center frequency I'd appreciate it.
Then I could deliver a complete test result with measured frequency and bandwidth, for each FREQ_COARSE, FREQ_FINE, and BW step.

Regards,
/Michael
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
How do you think I decided what the true centres were? :) You can use REW to make sweep measurements, there's an API but to make sweep measurements through the API needs the Pro upgrade.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
OK, interesting :)
Will be interesting to see if what REW sends via MIDI for a given center frequency is completely consistent with how my newly purchased FBQ2496 measures.
I should have time to measure it before next weekend.
If so, it would be good to clarify that somewhere. That the FBQ2496 is not capable of displaying the correct center frequency.
But we'll see how it ends.

Regards,
/Michael
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
The FBQ truncates the figures to 3 digits for display. The problem is more that the messages sent to it are not reliably received.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
How do you think I decided what the true centres were? :) You can use REW to make sweep measurements, there's an API but to make sweep measurements through the API needs the Pro upgrade.
The FBQ truncates the figures to 3 digits for display. The problem is more that the messages sent to it are not reliably received.
OK, I didn't notice any problems with the MIDI transmission. It was completely repeatable every time.
The same MIDI values resulting in the same values at the display.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
But what about the algorithms for choosing the nearest selectable frequency step via MIDI?
Do you use your own lookup table (MEASURED_FREQ,FREQ_COARSE.FREQ_FINE)?
I can't really understand how my FBQ2496 ends up several steps wrong.
But if Behringer has made a really crazy mistake with how they give data to the display from their filter coefficients, then it might be possible.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
But if someone can look at my previously attached file fbq2496-freq-to-midi-cc-table.txt and explain the selectable steps via MIDI mathematically, that would be more than welcome.
The manual says it's a logarithmic allocation of frequencies but it doesn't look quite consistent in my findings.

Regards,
/Michael
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
Just looking at the MIDI values passed in from REW for MIDI CC 46 and it makes me suspicious.
Center frequency in rev 41.8, CC 46 sent value 7 (about in the middle for step 1), fine.
Center frequency in rev 46.3, CC 46 value 15 (on the higher bound for step 1).
It doesn't look consistent.

If I have a stepped frequency scale to deal with, I would choose lower bound, in the middle or higher bound.
Not sending deferent values for the same frequency step. It doesn't look right.

The steps stated in the manual for CC 46 are:
step 1: CC 46 value 0-15
step 2: CC 46 value 16-31
step 3: CC 46 value 32-47
step 4: CC 46 value 48-63
step 5: CC 46 value 64-79
step 6: CC 46 value 80-95
step 7: CC 46 value 96-111
step 8: CC 46 value 112-127

Regards,
/Michael
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
Hi!
I started doing the time consuming manual testing procedure.
And with four filters tested and 50% failed tests, I'm pretty sure already that REW is sending the wrong MIDI CC values and possibly not handling the set frequency scale of the FBQ2496.

And in terms of my experiences so far with the MIDI stability of the FBQ2496, it seems to work great. The values sent give the expected result.
The same goes for the display on the FBQ2496 which seems to show the correct center frequency with its available resolution

I will continue the tests to try to confirm that my mapping table between all selectable frequency steps and FREQ_COARSE and FREQ_FINE (fbq2496-freq-to-midi-cc-table.txt ) is correct.
I'm not sure if I can do the same tests for the bandwidth steps.
But I will try to automate this test procedure using the Python library scipy.signal.

And I would be so very grateful if the midi export could be fixed.
I love REW and think it's an absolutely amazing tool.

Best regards,
/Michael

---
Test procedure:
1) Export calculated filter settings from REW for reference
2) Send MIDI from REW to FBQ2496 using the "Send filter settings to equaliser" and log all transferred MIDI events with "Midi Monitor" (in spy mode)
3) Read the gain for each filter on the FBQ2496 display and write the display values down
4) Set the gain to zero for all filters
5) Select one filter at a time, restore previous gain value and measure the filter with manual REW, write down measured center frequency
---
Test results:

MIDI data sent from REW to FBQ2496:
(only FREQ_COARSE and FREQ_FINE CC numbers are displayed here)

filter_1:
FREQ_COARSE: 8
FREQ_FINE: 7
# REW exported center frequency: 41.79
# frequency on the FBQ2496 display: 41.7
# manually measured center frequency with REW aprox 41.53
# PASSED!

filter_2:
FREQ_COARSE: 9
FREQ_FINE: 7
# REW exported center frequency: 45.82
# frequency on the FBQ2496 display: 45.8
# manually measured center frequency with REW aprox 45.73
# PASSED!

filter_3:
FREQ_COARSE: 13
FREQ_FINE: 47
# REW exported center frequency: 70.15
# frequency on the FBQ2496 display: 67.7
# manually measured center frequency with REW aprox 67.5
# FAILED!
# Comment: REW sends wrong CC values for FREQ_FINE (value 32-47 equals step3 and results in 67.7 Hz)
# Correct CC values for 70.15 Hz are: FREQ_COARSE: 13 and FREQ_FINE: 80-95 step_6 and results in the nearest available frequency step 70.1

filter_4:
FREQ_COARSE: 21
FREQ_FINE: 31
# REW exported center frequency: 143.2
# frequency on the FBQ2496 display: 139
# manually measured center frequency with REW aprox 139.5
# FAILED!
# Comment: REW sends wrong CC values for FREQ_FINE (value 16-31 equals step2 and results in 139 Hz)
# Correct CC values for 143.2 Hz are: FREQ_COARSE: 21 and FREQ_FINE: 48-63 step_4 and results in the nearest available frequency step 143

Reference data:
---
REW calculated and exported filter settings for FBQ2496:
1 True Auto PEQ 41.79 -8.00 0.333 9.85
2 True Auto PEQ 45.82 4.50 0.200 6.48
3 True Auto PEQ 70.15 -6.50 0.333 16.53
4 True Auto PEQ 143.2 -15.00 0.333 33.76
5 True Auto PEQ 211.8 6.00 0.333 49.93
6 True Auto PEQ 232.3 -9.50 0.250 41.06
7 True Auto PEQ 260.6 5.50 0.200 36.86
8 True Auto PEQ 299.2 -7.00 0.500 105.8
9 True Auto PEQ 351.6 6.00 0.500 124.3
10 True Auto PEQ 413.1 -6.00 0.333 97.36
11 True Auto PEQ 479.8 5.00 0.750 254.4
12 True Auto PEQ 550.8 -8.50 0.250 97.38
13 True Auto PEQ 647.2 6.00 0.750 343.2
14 True Auto PEQ 873.0 -4.50 0.250 154.3
15 True Auto PEQ 1449 2.50 0.200 204.9
16 True Auto PEQ 2891 -2.00 0.250 511.0
17 True Auto PEQ 6623 -3.50 1.0 4683
18 True Auto PEQ 9037 -2.50 0.250 1598
---
Gain values on the FBQ2496 display:
filter_1: -8.5
filter_2: 4.5
filter_3: -6.5
filter_4: -15
filter_5: 6.0
filter_6: -9.5
filter_7: 5.5
filter_8: -7.0
filter_9: 6.0
filter_10: -6.0
filter_11: 5.0
filter_12: -8.5
filter_13: 6.0
filter_14: -4.5
filter_15: 2.5
filter_16: -2.0
filter_17: -3.5
filter_18: -2.5
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
The FBQ2496 has 601 frequency steps from 20 Hz to 20 kHz. Three decades are spanned at 200 points per decade, the frequencies are 20*10^(n/200) where n ranges from 0 to 600. The coarse and fine values are simply an index into that frequency table, where the index is 8*coarse + fine, with fine ranging from 0 to 7 (ignoring the factor of 8 and addition of 7 in the MIDI fine values). I believe the REW-generated coarse and fine values are correct, but that what is sent to the FBQ is not necessarily what the FBQ receives and then uses. Perhaps that is an issue for the FBQ when it receives multiple filter settings in sequence.

For your two "Failures":

Target 70.15: coarse 13, fine 47(5) table entry: 70.15
Target 143.2: coarse 21, fine 31(3) table entry: 143.22
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
The FBQ2496 has 601 frequency steps from 20 Hz to 20 kHz. Three decades are spanned at 200 points per decade, the frequencies are 20*10^(n/200) where n ranges from 0 to 600. The coarse and fine values are simply an index into that frequency table, where the index is 8*coarse + fine, with fine ranging from 0 to 7 (ignoring the factor of 8 and addition of 7 in the MIDI fine values). I believe the REW-generated coarse and fine values are correct, but that what is sent to the FBQ is not necessarily what the FBQ receives and then uses. Perhaps that is an issue for the FBQ when it receives multiple filter settings in sequence.

For your two "Failures":

Target 70.15: coarse 13, fine 47(5) table entry: 70.15
Target 143.2: coarse 21, fine 31(3) table entry: 143.22
Thanks for your reply.
I interpret it as the status is WONTFIX regardless of whether the FBQ2496 gets the correct settings or not.

But it is not a serious problem.
As a workaround, I have written a python script that automatically parses the exported filter settings text file from REW and sends MIDI CC values that measure correctly to the FBQ2496.

Best regards,
/Michael
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,297
I interpret it as the status is WONTFIX regardless of whether the FBQ2496 gets the correct settings or not.
That is the wrong interpretation. If you have a reproducible bug I will happily fix it, but If you read through the earlier posts you will see that the problem of incorrect frequencies (and sometimes gains) is not consistent. Sending the same MIDI data to the FBQ does not produce the same result each time. Since the BFD has no such issues with its MIDI comms from REW it does not appear that the problem lies within the Java MIDI implementation.
 

Michael Nilsson

Registered
Joined
Dec 21, 2017
Messages
16
That is the wrong interpretation. If you have a reproducible bug I will happily fix it, but If you read through the earlier posts you will see that the problem of incorrect frequencies (and sometimes gains) is not consistent. Sending the same MIDI data to the FBQ does not produce the same result each time. Since the BFD has no such issues with its MIDI comms from REW it does not appear that the problem lies within the Java MIDI implementation.
OK, I'll try to help as best I can here.

But because neither English nor maths are my first languages, I find it difficult to make myself understood here.

The reason I started looking into this was because I found that when I send MIDI with REW,
the center frequencies often end up a couple of steps away from the nearest selectable center frequency in the FBQ2496.

I have also confirmed the results by measuring the filters manually with REW -> [line in FBQ2496 line out] -> REW.

I have a brand new FBQ2496 and I'm starting to wonder if Behringer might have changed the MIDI specification?

I would be grateful if you look at the MIDI specification in the manual on page 11.


I could not manage to create any formula to calculate the values for "Mid frequency Coarse adjustment, logarithmic allocation" and Mid frequency (Fine adjustment))".
So I attacked the problem by stepping through all the center frequencies selectable via MIDI and logging them.

Then I verify the written down center frequencies by control measuring with REW,
REW -> [line in FBQ2496 line out] -> REW.

And when I use my lookup table to find MIDI CC values for the nearest selectable frequency,
I get the closest selectable every time on my

I previously posted this example, but it seems you and I are getting different results. Which makes me wonder if the FBQ2496 has changed over the years?

Here is the example and my result again:
--
Target in REW EQ settings 70.2

REW sends MIDI:
CC 14 (FREQ_COARSE) value = 13
CC 46 (FREQ_FINE) value = 47

On my new FBQ2496, I get the following center frequency:
Manually measured center frequency
with REW -> [line in | FBQ2496 | line out] -> REW
67.7 Hz and it's 3 steps lower than the nearest selectable target frequency.

I send MIDI with Python rtmidi and use my lookup table to select the nearest selectable target frequency:
CC 14 (FREQ_COARSE) value = 13
CC 46 (FREQ_FINE) value = 80
On my new FBQ2496, I get the following center frequency:
Manually measured center frequency
with REW -> [line in | FBQ2496 | line out] -> REW
70.1

I get exactly the same results on repeated tests.

And this also applies to several other target frequencies.
--

But as I said, there is no rush to get this working on my FBQ2496.

I have written a small program that monitors a folder for filter settings exported as text in from REW.
When it detects a changed file, the program parses it and looks up MIDI CC values for the nearest selectable frequency.
And sends MIDI to my FBQ2496 automatically.

So it's practically as smooth as letting REW send MIDI.

Regards,
/Michael
 
Top Bottom