Open-source DIY project, MIT licence

Horn Simulation

A free tool for people who build their own loudspeakers. You say which frequency band a horn must cover and how big it may be. It tries the drivers in its database on many horn shapes and tells you which pairs fit, and why the others do not.

Status: experimental. The numbers it gives are predictions from a computer model. The model agrees with other acoustic software and with one measured horn, but nobody has yet built a horn it designed and measured it with the driver fitted. Treat its answers as a well-informed starting point, not a finished design. Details are under what is and is not checked.

See a worked example New to horns? Start here How to run it

Who it is for

Hobbyists who design and build horn-loaded speakers: a midrange horn for a PA box, a waveguide for a home system, a horn to take over from a bass bin. You should be comfortable with a command line and with Docker. You do not need to know finite element methods.

It covers ordinary single-driver horns that are round in cross-section, with rigid walls, loaded from the front. It does not design cabinets, crossovers, bass reflex boxes or multiple-entry horns.

What it does for you

Choosing a horn and a driver by hand means guessing a throat size, a flare, a length and a mouth, then checking whether a given driver works with it. Each guess takes a simulation, and there are over a thousand drivers. This tool does the guessing and checking for you.

  1. You give the brief. A frequency band, for example 500 to 4000 Hz, and optional limits: maximum length, maximum mouth size, how much ripple you accept, a minimum level, a power to survive.
  2. It screens the drivers. The database holds 1454 driver records with their Thiele-Small parameters. Drivers that cannot work in the band are dropped. Throat sizes are proposed to suit the rest.
  3. It sketches horns. A grid of horns from seven flare profiles: conical, exponential, tractrix, hyperbolic, oblate spheroidal, a scaled tractrix and a cone with an exponential throat.
  4. A fast model narrows the field. A one-dimensional horn model scores every horn with every driver, often several hundred thousand pairs.
  5. A detailed model checks the shortlist. The best few horns are solved with a 3D axisymmetric finite element model (FEM), then coupled to every driver again. A short refinement step tries nearby dimensions.
  6. It reports. Pairs that break one of your limits are rejected, and the report says which limit and by how much. The rest are ranked. You get the dimensions, a STEP file of the air passage, a wall profile you can loft in CAD, and the predicted response, impedance and cone excursion.

Sometimes the honest answer is that nothing fits. The tool says so, and tells you how close the nearest miss came. That is useful too: it tells you which limit to relax.

Examples

Worked example: 800 to 1600 Hz

One run followed step by step, from the command to the files you build from. The answer is an 18Sound 6NMB420 on a 118 mm long horn, with 2.08 dB ripple at 104.13 dB.

Five briefs, five answers

A compact PA midrange, a shallow hi-fi waveguide, a big low-mid horn, a loud vocal horn and the flattest midrange. One found nothing, and one is ranked only because its failures depend on an estimated front chamber. Each is explained in plain words.

What is and is not checked

Every check has a frozen record and a script in the repository. Failures are kept. No tolerance was loosened to get a pass. The full list is in VALIDATION.

Checked

Not checked, or failed

Measured and computed throat resistance and reactance of the Post exponential horn at three mesh sizes
The one measured-horn comparison that passes: throat impedance of the Post horn, measured (black) against the model at three mesh sizes. Write-up.

More: STATUS (what works and what is left) and cross-software comparisons.

Run it yourself

You need Docker with at least 8 GB of memory, just, Python 3.10 or newer, Java 17 to 22 and Nextflow 24.10. The quick start covers installation.

git clone https://github.com/timini/horn-simulation.git
cd horn-simulation
just build

# A band and a driver database; the tool works out the horn sizes
just run-auto --target_f_low 800 --target_f_high 1600 \
  --drivers_db data/drivers-curated

# Find the run folder, then open outputs/auto/report/auto_report.html in it
just latest-run

Add limits such as --max_length 0.25, --max_mouth_radius 0.175, --max_ripple_db 3 or --min_output_db 106. Sizes are in metres and the mouth limit is a radius. USAGE lists every command and parameter. The full-database examples on this site took between about 8 and 100 minutes each on one computer.

How to help

What's next

Next, in order: a finer mesh chosen automatically where frequency bands meet, a search goal of the widest flat band inside a size limit, a maximum SPL figure for each design, and more retailer prices, especially in the US. The driver database with prices is done: about 2,100 drivers, 367 of them with a current price.

After that comes a design database: for every driver, the horns with the best trade-offs between flat bandwidth, level, size and price, on a page where you set your own limits and get the cheapest designs that meet them. Details are in the roadmap.