Monday, 11 July 2016

The mobile subwoofer sideshow...

I've been pootling along in my van a lot recently, usually on the way to a beach to indulge in some windsurfing and possibly subsequent fish and chips, and enjoying listening to my iPod on Shuffle - what an amazing collection of music!

However, the stereo is currently limited to two small Infinity "digital ready" speakers mounted in the dash. As usual, "digital ready" means raucously shouty and harsh in the top end, whilst being little and dash-mounted, the bottom end is non-existent. This means I have to have them far too loud for any useful effect. So...

I realised that I have two Rear channels on the stereo not currently in use. So let's put them to use! Rather than an actual subwoofer, how about something that adds a bit to the stereo effect whilst supporting much better bass, albeit not necessarily too thumps? Make sure that the boxes involved are sufficiently small, and they can go under the seats in the van, for simplicity of re-use and effectiveness of bottom end. No need for tweeters, I'm not looking for full-range, just something to fill out the bottom and mid a bit.

A fair bit of research at Falcon Acoustics and Wilmslow Audio websites, lots of runs of ISD Online (since WinISD is necessarily only available for Windows!), and some more searching, usefully including the hifitest.de website with a build using the selected mid/bass unit, and I'm trying out something self-brewed.

The Monacor SPH-5M appears to offer a reasonably priced woofer-ish object that can be used in a sealed box or a ported box to taste, with reasonable power handling and sensible box sizes i.e. sealed 6 litres, ported 10-20 litres, so comfortably sized for stashing behind the seats in the van. There are others available that might do better, but hey... I can always construct a pair of bookshelf speakers with them if I don't like it.

And I even got them cheaper than expected at Audiomate.co.uk, being delivered tomorrow. All I have to do is source some MDF (hifitest used 16mm MDF, but my choices are 12 or 18 - too light or too heavy!), some bass port tubes (probably Wickes finest black plastic drainpipe, 40mm), and some terminals (I suspect whatever I can find cheapest, possibly at the Shop on the Bridge). I already have wire. Hurray. And I can dick about measuring them, maybe even build both sealed and ported versions to see which I prefer!

Thursday, 7 July 2016

Setting up the speakers in active mode

Having (almost) got myself an active speaker setup (need to check out the effectiveness of my DPDT switch for passive/active switching, suspect inductance still across woofer :-( ), now it's time to set the whole thing up.

I'm using the approach suggested by this blog post, which is basically
  • Measure the chassis speakers separately in the box
    • Easy to do this now, since I can easily turn one or the other off
  • For each speaker
    • Adjust response using speaker-specific equalisation, noting carefully the off-axis response and keeping this as smoothly degrading as possible
  • Set up the crossover, and measure both together
    • Some additional effort is required to ensure they are integrated properly
  • Make timing adjustments to ensure the impulse response is the same on both units
Here's my first pass at a setting for the tweeter - I started with this because the tweeter is definitely not affected by any remaining passive crossover components. I shall move the testing outside to reduce reflections, and probably re-do it, but it's illustrative and good practice (as is "I need to practise doing this").
REW plots for tweeter response before/after
You can see that there is a pretty stonking (5dB!) rise from 6k to 10k, which I've EQ'd out. I've also flattened out the bottom end a bit - the blogger mentioned above reckons you need to be pretty flat to 2 octaves above/below crossover frequency, but this tweeter isn't going to do that! Hey, take what you can...

Tweeter on and off-axis response after EQ
Looking at the off-axis response, it looks ok to me. It's quite surprising how the top end holds up.

EQ settings
I've been using AULab to do this, because it's simple (hah!! relatively...) and has graphical interfaces. I tried several EQ tools - High Shelf filter, Parametric, but Graphic EQ provided the most flexibility. I can't believe how easy it is to tweak it and re-test - just imagine how horrible it would be with any kind of passive arrangement! Bleuch.

However, the last measurement I made produced extremely distorted sound, so I saved the AULab document, presumably with all in/out and plug-in settings, and restarted it. However, on reloading the document, I discover that AULab is insisting on Soundflower or Saffire in/out, rather than Soundflower in/Saffire out - to get that I would have to create a new document, which means recreating all the Graphic EQ settings. Sigh. Oh for a text config file and some CLI! The AULab config file is actually XML, but it's pretty impenetrable, and of course, it presumably reflects the same in/out arrangement. Maybe I should raise a bug with Apple?

Right, time to move outside, do some more measurement.


Wednesday, 6 July 2016

Routing Audio on a Mac - :-) or maybe :-( - no, :-) !

I am using Apple's AULab to implement my first pass at crossovers for the A100s:
  • Define an AULab document with one stereo input, two stereo outputs each 
    • Input so far has been AUGenerator, which plays sound files; great as a first pass
    • Outputs are set to my Focusrite Safire, channels 1-2 (woofer) and 3-4 (tweeter)
  • Configure an AUCrossover on each of the outputs
    • HiPass for the tweeter
    • LoPass for the woofer
  • Wire Safire
    • Channel 1 to amp LH channel (woofer)
    • Channel 3 to amp RH channel (tweeter)
  • Play audio file to check configuration
AULab Document for 2-Way Crossover, Soundflower or MP3 input
AU Crossovers (currently Butterworth!)
This seems to work ok, as far as I can tell there are different signals coming out of the appropriate inputs.

However, on closer listening, ALL inputs are coming out of ALL outputs - not good if I'm looking for two separate sets of signals, especially for the tweeter!

How to fix this??

<<<<<<<< Long pause (many days!!) whilst I calm down, amongst other things >>>>>>>>

OK. I've located the Saffire Control application, and looked at that. I have to click on the "soundcard" button, which makes the Saffire behave just like a simple 8-way soundcard. Hurray! The button is down on the right hand side of the panel below.
Setting Soundcard mode in the Saffire Control panel
Now to get the REW software to route its testing signals to the AULab.

Lots of struggling with this... Hours, in fact! Until I notice that there is a choice in the AULab software for configuring the input, which has as its last two channels Soundflower 1&2... Sorted. Set REW output to Soundflower 1, job done. The other channels are from the Saffire inputs.
Selecting Soundflower as input in AULab
Next problem - got a great setup, lots of good equalised curves for tweeter, but some distortion on last couple of runs. Saved AULab document, exited AULab, restarted, reloaded doc -  and now it's lost the Saffire output!! Everything is via Soundflower - suboptimal. If I make the default Saffire, then I can't set the input to Soundflower. Bah!!

Thursday, 30 June 2016

Active Loudspeaker!

A bit of an anti-climax, perhaps, but I've now got an active Boston A100 :-o.

I removed the original back terminal plate, hot glued onto the inside of a hole in the back of the speaker. I then removed the fuse and terminals from the board, so I could reglue it back inside the box to support the original crossover components. I then wired up a DPDT switch and the new "biwire" terminal block, so that the speaker can be used active of passive at the throw of a switch. The hole in the back of the speaker was too wide for the new block, so I filled it with a piece of 18mm chipboard (actually from some old G-Plan furniture shelves we scrapped a few months ago! Very decorative...).

Taking out the old terminal panel

Refitting the old panel with the original crossover components

The original hole filled to fit the new terminal block

New terminal block, with separate woofer/tweeter wires, also shows active/passive switch

Setup with Safire DAC, Myst stereo amp and speaker
The original crossover is shown below diagrammatically - I used an online tool which is a bit pants but hey...
Original Speaker wiring

And this is the revised version, which allows the woofer and tweeter to be completely separate.

Active/Passive switching circuit
Except that now I look at that, I see a massive inductor wired permanently across the woofer terminals... Albeit through a few caps and a resistor. Damn... Will this have an effect? Arguably, I should disconnect the entire old crossover network. That requires another or different switch. Later - I have other difficulties!











Monday, 27 June 2016

Audio Programming discoveries

As part of looking for digital audio solutions, I've come across a number of people who've implemented their own multi-way system, using their own code to construct the filtering, EQ and crossover features. Cool. So I lashed out on a few books, in an attempt to understand the principles of digital audio a bit better, not least, to see if there's any chance that I could emulate the heroes who have already "rolled their own"!

  • Understanding Digital Signal Processing 3/e
    • Heavyweight! Came from an Indian bookseller, really quickly, so certain impressed with the service
  • Signals & Systems For Dummies
    • More useful, because reasonably well-structured and intended to be slightly more practical
    • However, the maths is very daunting, because I'm not sufficiently practised with series manipulation etc.
  • The Audio Programming Book
    • Now this is interesting! 
    • It's entirely practical, intended to support a course on digital music making, so it's based on using C and Csound to create and manipulate digital audio, which allows one to look at exactly what implementing a lot of this otherwise theoretical stuff involves
    • Of course it covers the maths to some extent, but it's kept to simple stuff that allows one to address using digital techniques to create and process audio, which along with the concrete implementations available to look at, really brings home the concepts
    • Example: I've had many explanations of FIR vs. IIR filter principles, but this book says, very simply, 
      • FIR is based on feed forward i.e. input delay so that future signals can be used to transform the current signal; this explains why a filter with a large number of poles (pole = number of future signals used) will require a significant delay in the eel-time audio signal
      • IIR is based on feed back i.e. output delay so that past signals are used to transform the current signal
      • And a filter can in principle use both techniques as required. Marv!
So now I'm bashing away at some simple C programs that might form the basis of my own digital processing capability.

Meanwhile, I've also been playing around with the Apple AudioUnit based mechanisms, in order to implement a simple 2-way crossover for the Boston A100. The plugins available include 
  • Graphic Equalizer - nice, but no info on its phase relationship
  • Parametric Equalizer - likewise
  • Sample Delay - now this is interesting! It allows a 1 - N sample delay to be dialled in, allowing granularity of ~ 1/50000 sec... i.e. the sample rate of the digital audio. Nice.

Tuesday, 21 June 2016

Testing speaker response

Obviously (is that patronising? I hope not...) the secret of success here is measuring things so the we have some idea of how well we're doing. Note the use of the plural first person pronoun here, much like the usual racing driver/rider who likes to blur the effect of his (usually his!) massive ego on the listener.

How to do that? I have
  • Measurement software - REW, Java-Based, runs on the MacBook Pro
  • Measurement mic - UMK-1 from the miniDSP chaps - a USB mic that plugs into the MacBook Pro
  • A DAC (Safire) that will allow the MacBook to drive the amp/speaker under test
There are huge drawbacks to performing speaker measurement in a room, largely because of the effect of the room on the measurement (resonant frequencies, reflections from surfaces) which all distort the response, usually but emphasising or reducing certain (ranges of) frequencies, and introducing phase distortion. So how do we get around all this?
  1. Do it in an anechoic chamber - which I don't have
  2. Do it outside; requires speaker to be well off the ground, or ground reflections distort the measurement; this is possible, but apparently Altec engineers used to put their speakers 30ft off the ground; er, no
  3. Do it inside but in the near-field i.e. stick the mic sufficiently close to the speakers that the room effects are minimised; also do several measurements at different places and integrate them all
This forum entry has lots of info on the 3rd approach, but doesn't use REW for measurements in the first instance, largely because the old version referenced doesn't do integration and dynamic gating (allowing for events within a certain time period, thus reducing room effects). 

Approach:
  1. Take on-axis frequency sweep measurements 
    1. 3" from woofer
    2. 3" from tweeter
    3. 1' from woofer
    4. 1' from tweeter
    5. 3' from tweeter
  2. Integrate these measurements to get 3 (3", 1', 3') (how do I do that in REW? Apparently it's the "Average the responses" button!) Note: This destroys the impulse response calculation - you need a single measurement to preserve this
I'm inclined to do both at once - near field and outdoors; how can it hurt?
Here's the test setup in all its glory:
  • Speaker raised off ground
  • Mic positioned on axis 3" from tweeter
  • Laptop running REW
  • Safire plugged into Mac and Myst TMA-5 amp, which is wired to speaker
Problems
  • Ambient noise - a neighbour has started to mix cement...
  • Rain?
  • REW's interface allows one to mis-save files with confusing/repeated names
  • I'm not very thorough!!
Results
1m response, mic between W/T, on axis
The above graph shows a bit of a droop 2.5-7kHz, interesting. The 2kHz XOver region is not bad. Phase looks a bit biffo. There are some effects from the reflections from the ground, especially around 110Hz - this is probably due to the height from the ground and distance to mic (110Hz 180deg phase is 1.5m approximately, which would be about right).

30 cm on-axis, centred on woofer
This shows a much smoother bass response, with little/no interference effect from the ground. Interesting 2kHz dive - is this interference between woofer/tweeter? The tweeter/woofer are about 25cm apart, and the mic 30cm from the front of the cabinet, which gives a tweeter-mic distance of 39cm, so a difference between W-M and T-M of 9cm, for a wavelength of 18cm which is about 1800Hz. Close enough. It's also in the crossover region which is pretty scary.
30cm on-axis, centred on tweeter
There's a similar thing happening with the on-axis tweeter response, although the frequency is lower - about 1.8kHz interestingly. Did I mess up my calculations above?

30cm on-axis, averaged W/T response
This is the averaged W/T response from 30 cm - note the inter-driver interference dip abut 1800Hz! There's a big suck-out 2-10kHz, or it could be seen as top-end brightness, since it's often good to roll off the top end a bit.


7.5cm on-axis, averaged W/T response
This doesn't look too bad - we aren't getting so much of the W/T interference at this point.

Conclusions

Not sure what to conclude here, apart from
  • Overall response not too bad, with reasonable integration between W/T
  • Bit of a dip 2-7kHz, with rising 10kHz
  • Bass drops off from 80Hz - this speaker is supposed to be used against a wall, which would reinforce that
I'd like to test the drivers separately - oh, I will :-). Hurray.



Monday, 20 June 2016

Back on the Crossover Trail

While the glue is setting, I'm busy trying to set up the crossovers and a suitable DAC unit. It won't be the first item tested, I'm going to measure the speakers with the original passive crossover before I do that!
AU Lab in action!
In order to check out the overall approach, I'm using my MacBook Pro to implement a first pass at a digital active crossover. I'm doing this using the highly amusing AU Lab application, an Apple tool that allows one to configure an input and output set in a "document", and apply Audio Unit plug-ins as effects in the various positions. Basically, my document has 1 stereo input, and two stereo outputs, to which I've applied HP and LP Linkwitz-Riley crossover filters with an initial -24dB/octave slope, at the 2000Hz that these speakers are apparently constructed with.

You can see the document template (Studio window above), which has the input set to built-in mic (I override that) and two output channels, assigned to channels 1-4 of the Saffire DAC. 

I've configured an additional input, using the AUAudioFilePlayer plug-in, that sources digital audio from a list of specified files. This is routed to output groups 1 and 2, so both woofers and tweeters get full-range signal. The setup for that is in the Generator 1 window.

The channels labelled Woofer and Tweeter have the crossovers set up in their effects link, using the AU Crossover plug-in I found in the interweb. The settings can be seen in the respective windows.

Listening to the Saffire outputs with headphones (yes, they're that high a level!), the crossovers are clearly working. I'm surprised how high the woofer signal goes, but then, I am deaf from 10kHz up, and this does cut off at 2kHz! The tweeter signal clearly has no bass or mid, again it's surprising how little seems to have gone until you compare it with the woofer signal. Marv. Now back to the speaker mines...

I've also implemented a simple Stereo In/Stereo Out setup so I can test the speaker(s) with the existing passive crossovers.