Jump to content

andyc56

Members
  • Posts

    11
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by andyc56

  1. On 3/9/2020 at 12:28 PM, andy497 said:

    Ages more, and my newborn turned into a semi-autonomous mini-human, and I can turn some attention back to audio.  I swapped an aging laptop for a proper desktop HTPC, and many of my measurement problems (particularly with time-alignment not being repeatable) seem to have fallen away.  Repeatability is very good, and predicted sweep summations using dozens of biquads across different channels match reality almost exactly.

    Quick q:  Is there a way to export out of MSO into a minidsp compatible import format (i.e. xml)?  If not, I may write it.  It looks like it still will take a couple steps to export everything (I can only see a way to export biquads from MSO one channel at a time), but that would save a ton of time inputting when I'm trying out various configurations.

    p.s.  I can't tell you how much I appreciate this incredible application.  It's a huge contribution to DIY audio.

    Sorry, there isn't any way to export miniDSP XML configuration files.  I've tried to avoid the situation of writing code that's specific to the make and model of the DSP device, as I didn't want to get stuck writing new code every time a new model is released.  That's why the interface is somewhat generic in nature (sample rate, biquad count etc).  To be honest, my enthusiasm for the project isn't what it was when I first started it a few years back, so I've kept it mostly in maintenance mode, except in cases where I can learn something interesting or generally useful by implementing a new feature (multi-threading, global constraints etc.)  I don't actually use a miniDSP myself, as I'm two-channel only.  I just use Equalizer APO to roll my own bass management, "stealing" the surround channels for use with the subs.

    Thanks for the kind words about the software.

  2.  

    On 10/21/2016 at 9:01 AM, andy497 said:

    Quick q if you have a sec:

    Is there a way to define global eq constraints? e.g. min/max cummulative boost. I'm limiting individual peqs, but it keeps stacking things and occasionally wants to push one channel up 25 db. For the same config I've gotten nearly as flat with no channel pushed more than 6 db, but i don't have a way to make it prefer smaller effective boosts/cuts.

     

    It's been ages, but I've finally gotten a fix for the "stacking" problem in the latest MSO version.  An article (PDF) that I recently found detailed how to impose global constraints in the Differential Evolution algorithm without causing convergence problems.  I implemented it and it seems to be working well so far.

    • Like 3
    • Thanks 1
  3. Now you make me want to check to see if PEQs with opposite gains that are otherwise identical cancel each other in my implementation.

     

    I recently got into a discussion with REW author John Mulcahy about this, and it turned out to be very fruitful. There are several different conventions for "Q" for PEQ filters of different hardware vendors, and some question of how this parameter relates to bandwidth, and even how bandwidth should be defined in the first place.  I wrote an article about it to hopefully clear up some of the mystery about different conventions for different DSP vendors.

    • Like 1
  4. Wow!  You sure did your homework on the biquad calculations.  I just skipped all the messy math and went straight to the answers published in one of the cookbooks online.  I confirmed that they matched what my MiniDSP 2x4 did.  The match was close enough for me not to notice, except for error that could be attributed to the 56-bit fixed point arithmetic on the 2x4 vs. 32-bit floating point in my simulations.  Differences became apparent below 30 Hz and worsened substantially below 20 Hz.  Anything below there was basically a crap shoot on the 2x4.  These same filters were fine on the OpenDRC-AN, which uses 32-bit float.

     

    I haven't tried to do any simulation of finite word length effects on the coefficients.  If they were 32-bit floating-point, I guess I could use Matlab's single-precision floating-point arithmetic to get an idea of the error.  But with oddball-sized integer coefficients, it seems that would be a PITA to figure out.  I'm not a digital filters guy anyway, so I had to read a book on them by Antoniou (the op-amp gyrator guy) to understand what was going on.  I had to shake out some mental cobwebs going back to the 1970s. :)

     

    I seem to recall that someone on AVS, it might have been notnyt, had some problems at low frequencies due to word length effects with one of the 8-channel miniDSP boxes when he used a 96 kHz plugin.  I believe it was for a high-pass filter for a vented-box sub with a pretty low tune.  He had to go with a 48 kHz plugin, which improved things, but the errors were still pretty easy to see as I recall.  It would be nice to find that thread again.

     

    Bristow-Johnson has some amazingly compact formulas for the conversion of the analog filters to z-domain form for different filter types, but it is a different set of formulas for each filter type.  I wanted to have as much code shared between the filter types as possible for debugging reasons, so I ended up with formulas that are a lot messier than Bristow-Johnson's, but it's the same formula each time.  Only the center frequency pre-distortion technique varies from filter to filter.  I've attached the derivation below.

    post-4518-0-99540700-1477674696_thumb.jpg

    • Like 1
  5. I'm having trouble splitting up quotes, so I'll just paste them into regular quote blocks.

     

    In contrast, when I sweep an individual channel, apply a simple eq and sweep again, the results are close but not quite right.  Lots of eq points and lots of channels compounds the errors significantly.  Obviously you can't do things like boost away a null, but I'm not trying to do that.  I would expect simple eqs of a single channel in "minimum phase" regions to behave predictably, just as changing the master volume on the avr produces a nearly identical sweep at a different level.

     

    That's really weird.  So just applying a single EQ to a single channel doesn't give the expected measured response?  I don't know what could be causing that.

     

    Edit: Can you try this with just a PEQ and no all-pass filter in the path?  I'll go back and re-check the biquad coefficients for the all-pass filters using Matlab.

     

    Internally, MSO computes the filter responses as analog filters.  When it computes the biquad coefficients, it uses the bilinear transformation to get the z-domain transfer function.  There is a nonlinear scale factor that "predistorts" e.g. the center frequency of the PEQ such that after the bilinear transformation the z-domain transfer function has the exact same center frequency as the analog one.  There is some "bandwidth warping" going on due to the nonlinearity of the frequency transformation, but when the critical frequencies of the filter are so much less than the Nyquist frequency of the DSP, there is negligible error, on the order of a couple hundredths of a dB.  In order to ensure the integrity of the calculated biquad coefficients, I compared my results with the spreadsheet by Charlie Laub at the miniDSP site.

     

    When I was checking out the biquad coefficient code, the results agreed with Charlie's spreadsheet down to 14 digits for all filter types except the PEQ.  To chase the difference down further, I wrote a Matlab script and a set of functions to compute the response of the analog PEQ, the coefficients of the digital PEQ, and the response of the digital PEQ.  Center frequency and boost/cut at the center frequency were dead on, as expected by the "pre-distortion" of the analog filter center frequency.  Maximum error between the analog filter response and the computed digital filter response was a couple hundredths of a dB over the frequency band to 200 Hz.  (Edit: I just went back and reinstalled Matlab and ran that script again. Maximum error between analog and digital filter is 1.4 * 10^(-4) dB.)

     

    I'm not saying Charlie's spreadsheet for the PEQ is wrong though.  There is potential ambiguity in the definition of "Q" for the analog PEQ.  I use the one that Bruno Putzeys uses in his Hypex sub amps.  For those, the "Q" is assigned to the analog filter "pole Q" when there is a boost, and to the analog filter "zero Q" when there is a cut.  This gives the result that two PEQs with the same Q and center frequency, one with a boost of X dB and the other with a cut of X dB will exactly cancel each other out when combined.  My guess, although I have not proven it, is that the discrepancy between my results and Charlie's for the PEQ may be due to a possibly different definition of "Q" being used for the analog PEQ filter.  At any rate, I got excellent agreement between the analog and digital filter responses, so I am satisfied the calculations are good for the PEQ.

     

    Finding no. 1:

    I discovered last night that THX "Boundary Gain Compensation" was enabled on my receiver.  It's hidden in its own menu folder far away from things like audyssey and bass management.  Grr.  I thought this was a simple shelving filter, but before and after sweeps reveal some really strange effects on different sub channels.  I turned that off and took yet more before sweeps, so I'm hopeful I'll see improvements when I'm able to next take some measurements.  This means I'll probably want to remeasure and adjust the whole signal chain again as well.

     

    Let's hope that was the cause of the problem.  Is there any dynamic EQ sneaking into the AVR?

     

    I'm growing skeptical of the "import REW biquads" function in my minidsp with 2x4 advanced plugin.  First, it will accept 6 biquads for both the input and output channels, but there are only 5 peq slots.  I'm guessing the 5th is dropped, but it's very hard to tell from the interface.

     

    That should give an error message.  I think the 4-way advanced plugin can have 6 PEQs, but the 2x4 advanced is limited to 5.  When you tell MSO how many biquads your DSP has per channel, and you use more than that, it will still give you all the coefficients in order to not lose information.  I believe it prints out a warning in the filter report when that happens.  I'll check that, and if it doesn't, I'll fix it so it does.  I should probably display a warning message when this happens when exporting biquad text as a file too.  The purpose of specifying the maximum number of biquads is that if you use less, it will pad them with "through connection" biquads up to the maximum number in the exported text and the filter report.

     

    Secondly, while biquad computations seem to match fairly well from the minidsp display graph to the MSO software, they aren't fully one to one.  The frequencies of adjustments seem to line up, but the magnitude may be slightly different, especially on large adjustments, e.g. a deep cut that equates to -15 dB in MSO might register as roughly -12 dB in the minidsp graph.  I'm thinking the minidsp plugin graph is pretty small and might have some display/rounding issues, but it has me wondering.

     

    It could be that they're using a small number of frequencies and lots of smoothing so that the peak or dip is missed and smoothed over.  That's just a guess on my part.  With regard to MSO PEQ biquad computations, the center frequency and gain/attenuation of a single PEQ digital filter at the center frequency ought to be dead nuts on.

     

    Besides the disappointing and confusing results so far with before/after sweeps, I think the software is fantastic.  If I give it a few peqs and shelf/LT/all-pass filters to work with, it's amazing what it can do.  With a first-order all-pass to play with on each sub channel, it's able to align them such that the low-end extends down to a 8-9 hz -3dB point with almost no boost on any channel, and there is more headroom across the entire bandwidth.  Setting things the old-fashioned way, my -3 point has been in the tweens with a 12 dB LT.

     

    I'm glad to hear that at least, but sorry to hear that you're having these other problems.

    • Like 1
  6. Is there a way to define global eq constraints? e.g. min/max cummulative boost. I'm limiting individual peqs, but it keeps stacking things and occasionally wants to push one channel up 25 db. For the same config I've gotten nearly as flat with no channel pushed more than 6 db, but i don't have a way to make it prefer smaller effective boosts/cuts.

     

    At the moment, there's no way to constrain the maximum allowable total PEQ boost in a given channel, just individual boost.  I've always used MSO with all PEQs set to a maximum individual boost of 0 dB per the default.  In this way, if there are any notches in a combined response, it must try to fill them in by minimizing cancellation.  I'd suggest giving that a try.  You can often fill in response notches by a surprising amount without any boost in any PEQ at all.

  7. I can also apply some pre-EQ to kill the out of band stuff without too much trouble. I am still working on figuring out how to smooth the response as much as possible through cabinet design, anything I can do to minimize the amount of EQ that I need to apply is a good thing. 

     

    Have you had any experience applying the MSO solutions to a FreeDSP? I've just started messing with SigmaStudio, but haven't found a way to directly enter biquads yet.

     

    Looks like I found it! Nevermind! There is a 2nd order IIR Coefficient filter buried in the menus of the General 2nd order filter.

     

    This is the first I've heard of FreeDSP, so I'll have to spend some time going through the web site.  I can export biquad coefficients in the same format that REW does for miniDSP.  These have the miniDSP oddity that the a1 and a2 coefficients in the file are actually the negatives of the coefficients in the transfer function.  I haven't used SigmaStudio, so i don't know if it expects the inverted a1 and a2 the way the miniDSP software does.

    • Like 1
  8. Hi Andy, thanks for stopping by. 

     

    Huge thanks for your efforts with MSO. I have a bit more theater to build before I can put it to work, but I am a lot closer than I was.

     

    You're welcome!

     

    A while back, you were talking about raising the max allowable center freq of PEQ filters for horn sub EQ.  I can look at how to do that while discouraging the high max center frequency usage for more typical applications.  Maybe have a special PEQ type that allows it.

    • Like 1
  9. Getting a proper timing reference in REW has been a major pain in the past, but I'll keep at it.  I was very excited about that recent feature since I do hdmi out with a usb mic.  However, I've had nothing but problems with the asio half on the two laptops I have.  Both are modern windows 10 machines but share the same behavior: I can get 3 or 4 measurements tops, at which point the next sweep has an awful crackling sound.  I haven't been able to fix that with adjustments to the latency/buffer settings; the only way to correct it seems to be to reboot, and then I have to do another dance to get the hdmi device and minidsp usb mic detected correctly.  I'll typically get no sound from the mic, or it will appear to work normally but the signal recorded by REW will sometimes be 18 db too high.  :huh:  

     

    Hi,

     

    I've had some strange problems when trying to do a loopback measurement of the frequency response of my UMC-200 pre-pro at line level with ASIO4ALL on a Windows 7 machine with AMD processor using HDMI.  I was able to get a good sweep again (but only temporarily) by changing the REW output channel to a different one, then changing back to the desired channel again.  I don't know if this is the same problem you were having, and I don't know what the sweep would have sounded like, since it was a line-level measurement without a mic.  All I know is that it gave me a really crazy looking frequency response when it happened, which for a line-level device is clearly wrong.

     

    I'm the MSO author, so feel free to ask about it here or in the main MSO thread at AVS.

    • Like 1
×
×
  • Create New...