1 (edited by HerbArcher3 2026-05-05 16:59:00)

Topic: Gain Staging as a function of [Genre, Venue, Microphone, Pre, and RME]

I've developed and would welcome your help beta testing a web-based tool to optimize gain staging throughout your signal chain.

The generic recording signal chain modeled in this application includes:

    microphone →
       optional attenuator →
           optional preamplifier →
               optional attenuator → 
                  RME Mic-Pre A/D converter

You'd first use a pulldown menu to select the genre of what you wish to record.  The tool will optionally provide researched typical values for the ranges of SPL levels expected at the microphones, desired headroom, and the THD quality standard.  Once you also enter your venue's noise floor, you're all set to optimize gains to achieve one of three possible goals:


Maximum SNR       Sets gain as high as possible within your headroom target.  Best for quiet sources (choral, chamber,
                           bioacoustics) where the noise floor is the primary concern.

Minimum THD        Sets gain as low as possible while achieving the active THD quality standard and maintaining at least 40 dB of
                            usable SNR. Targets the specific THD level you have selected rather than simply minimizing gain.

Genre balance       Uses your selected recording genre to set a minimum acceptable SNR floor, then finds the lowest gain
                            satisfying that floor. Balances noise and distortion for your specific application.
                            Also grades the result against your selected THD quality standard.

You can access the web tool at my GitHub site, here:
   https://herbarcher3.github.io/gain-stag … r_v21.html

A detailed user manual is available here:
   https://herbarcher3.github.io/gain-stag … er_v21.pdf


This tool is under active development. Specifications are sourced from manufacturer datasheets, published measurements, and topology-based estimates. Results are intended as as a notional check on your own experienced setup plans for the recordings you do.  You would, of course, want to rely on your own ears and meter observations to refine these settings if needed during a performance.

2 (edited by HerbArcher3 2026-03-30 18:39:03)

Re: Gain Staging as a function of [Genre, Venue, Microphone, Pre, and RME]

Just a comment about the motivation for this tool:

This project was motivated by a disastrous recording incident. A friend had been asked to do an on-location recording of a full orchestra and chorus performing The Brahms Requiem — a major work with huge dynamic range and relatively high peak sound pressure levels. He set up a dozen carefully-chosen microphones, placing them in key locations to capture the orchestra, the chorus, the soloists, and the conductor’s comments. He set the gains for what appeared to yield 15 dB of headroom in each channel, and, during the pre-concert run-through, monitored the meters — watching for peaks and meticulously tweaking gain settings as indicated

During the concert, the board’s peak indicator never triggered, and in the loud concert hall where his mixing desk was located, he could not discern distortion in his headphones. Yet when he later started mixing tracks in post-production, he was distressed to discover significant double-digit THD clipping distortion in the chorus tracks. He invited me in to help with triage.

A Claude AI analysis of the distorted tracks pointed to preamplifier saturation. Since gain had attenuated the signal after that saturating pre-amp, those clipped peaks never registered on the board’s metering — not on the VU bars, their peak marks, nor the board’s master peak indicator.  Ouch.

Thus was the motivation for the initial version of this tool. Had he accounted for the 45 dB SPL noise floor of the performance space and understood that the effective dynamic range was more limited than expected, he could have reduced gain at key places in his signal chain, thereby trading off a bit of un-needed Signal-to-Noise ratio in the recording signal path for significantly improved THD.

Version 18 represents a substantial expansion. The tool now includes pull-down menus for all 40 genres from the SPL reference database, an integrated SPL reference panel covering 140 microphone positions and 90 spot instruments, a venue noise floor slider, pre-optimization advisory calculations for the preamplifier section, a gain pin for intentional transformer saturation targeting, and manual entry panels for microphones and preamplifiers not yet in the database. Device counts remain at 103 microphones, 39 preamps, and 21 A/D converter systems.

Re: Gain Staging as a function of [Genre, Venue, Microphone, Pre, and RME]

I'm not sure why you would need AI analysis of recorded tracks to determine whether the distortion is analog or digital (clipping at digital full scale). If an external "board" (mixer) was involved, that may have been part of the issue. Or the converter went into clipping.

All in all, I'm not sure how this is specifically relevant to RME gear, which is what this forum is about. You could post it on the remote recording subforum on Gearspace.

In practice, you'd also have to actually measure peak SPL right at the tip of each spot microphone to get good results, which seems more cumbersome than setting levels during a rehearsal. Unless the performance was significantly louder than the rehearsal, I'm surprised that the distortion wasn't detected after or during the rehearsal.

Oh, and it would help to be able to just manually enter your own microphones' sensitivity, which is something that can usually be found on the interwebs easily...

Regards
Daniel Fuchs
RME

4 (edited by HerbArcher3 2026-03-30 18:41:13)

Re: Gain Staging as a function of [Genre, Venue, Microphone, Pre, and RME]

Daniel,

Appreciate the feedback.

To address the points you raised:
 
1)  "Not sure why you would need AI analysis."   I have an Izotope suite of RX 11 tools that struggled with doing anything useful for Nick's track.  This may have been because the recorded track file still evidenced lots of headroom -vs- banging the rails. I tried Claude AI an experiment, and was impressed at what Claude attempted to do, albeit not perfectly. It's first assessment was a THD approaching 100%.  I pushed back on that and it realized that it was actually measuring the higher-frequency notes in a chord as "distortion" when it was actually distorted program material. The useful piece of Claude's feedback was the insight that distortion was happening well before the A/D in the signal chain - a prior analog gain stage and buffer which was subsequently being attenuated and digitized as something that looked to RX 11 like lots of headroom.

2)  "In practice, you'd need to actually measure SPL at the mic tip" -- Yes and no.  "Yes" - it would be best to have a measurement.  But "No" -  typical SPL levels for spot and over head mics are well established for many genres.  In v18 of the tool, I've adding a much more rigorous pre-processor that develops high quality SPL estimates based on user input of genre (or instrument for spot mics), and mic placement.  This estimate draws from:
      "Katz, B. — Mastering Audio: The Art and the Science (Focal Press, 2002/2015)",
      "Skritek, P. — Handbuch der Tonstudiotechnik (1989)",
      "Dickreiter, M. — Handbuch der Tonstudiotechnik, 7th ed. (De Gruyter, 2008)",
      "Streicher, R. & Everest, F.A. — The New Stereo Soundbook, 3rd ed. (Audio Engineering Associates, 2006)",
      "Woszczyk, W. — Microphone techniques for orchestral recording (AES preprint collection)",
      "Bech, S. & Zacharov, N. — Perceptual Audio Evaluation (Wiley, 2006)",
      "Wittek, H. — Perceptual differences between wavefield synthesis and stereophony (PhD thesis, University of Surrey, 2007)",
      "Rossing, T.D. & Moore, F.R. — The Science of Sound, 3rd ed. (Addison Wesley, 2001): per-instrument SPL reference data",
      "Neumann GmbH application notes — microphone placement and expected SPL for orchestral and ensemble recording",
      "Schoeps GmbH application notes — ORTF, MS, Jecklin disk placement and SPL expectations",

3)  V18 also has a button for manual parameter entry if the microphone, the preamp, or the A/D system has not yet been modeled.  This system uses quite a few parameters to make the math accurate, so manual entry is not trivial in any of these cases.  When that option is used, I'll get a notification so that I can carefully research the provenance of specs for the new item and add a record to its respective JSON data base.

4)  The path analysis associated with the different option buttons (maximize SPL, minimize THD, Balanced) is VERY useful to those of us who use RME equipment with external gear.  In my own case, I've enjoyed using the RME UFX, UCX, and Babyface Pros, not only with their own excellent mic amps, but also with their line inputs to digitize other preamps -[Focusrite ISA , a professional FET amp, and home-grown Seventh Circle Audio J99's, C84's, N72's, and A12b's.]  With several of these, its not  unusual to push gain in the preamp to get a bit more transformer saturation in selected recording situations (female or male vocalists but others as well).  One would, of course, attempt to compensate for the high pre gain and consequent signal output with a lowered gain on the RME gear, or use an external attenuator. 

Here's the crux of the matter:  Users doing such manipulations to "get that desired sound" usually have no clear idea what effect such gain staging has on overall chain SNR, Headroom, THD or Dynamic Range.  They might blame RME for audible distortion when, in fact, to achieve the desired effect, they should have used an attenuator between the pre and their RME.  This application provides that needed clarity, even to the point of recommending a specific level of external attenuation when the optimizer cannot meet the desired path goals.

Herb

5 (edited by HerbArcher3 2026-03-30 21:53:28)

Re: Gain Staging as a function of [Genre, Venue, Microphone, Pre, and RME]

Version 18 — 29 March 2026

What's new

1) SPL Reference panel. A collapsible panel immediately below the genre selector provides data-driven SPL estimates before you touch any other field. Two tabs: Ensemble / Main Array covers 40 genres and 140 microphone positions (Decca Tree, ORTF, AB omni, mid-hall audience, spot/accent, organ gallery, etc.); Spot / Close Mic covers 90 instruments and vocal techniques across 9 families, including all classical voice types with passaggio ceiling data and DI sources. Select a genre and position, adjust horizontal distance and height sliders, and the panel returns estimated Loudest (fff), Quietest (ppp), dynamic range, and recommended headroom. Click Send to populate all four optimizer fields at once; the panel collapses automatically. A feet/metres toggle converts all displays without affecting the underlying values.

2) Manual entry panels for all three device types. If your microphone, preamplifier, or A/D converter is not in the database, a button below each dropdown opens a manual entry panel. All three panels follow the same paradigm: the dropdown blanks on open, a live preview updates as you type, clicking Add to optimizer for this session injects the device into the dropdown, and the entry is logged to localStorage as a device request — downloadable as device_requests.json for submission.
Pre-optimization preamplifier advisory. Once a microphone, preamplifier, and A/D converter are all selected, a pale blue card between the spec badge and the character box shows five live estimates computed from the same formulas the optimizer uses: estimated gain, pre output level, chain headroom (colour-coded), estimated SNR, and estimated THD. Updates immediately on any relevant field change.

3) Gain pin. A Pinned gain field to the right of the preamplifier dropdown constrains the optimizer's gain choice. Leave it blank (showing "Auto") for normal operation. Enter a value to pin: in Maximize SNR mode the pin is a ceiling; in Minimize THD and Genre-balanced modes it is a sweep floor. The intended use case is intentional transformer saturation targeting — set the gain where the transformer works in its desired coloration zone and let the optimizer plan the rest of the chain around it, including automatic A15AS attenuation if headroom cannot otherwise be met. The result card labels the setting "Gain setting (pinned)" when active.

4) Optimizer UI sync. When the optimizer auto-applies the A15AS attenuator (Stage 3 recovery), it now checks the checkbox, opens the controls panel, highlights the correct pad button, and sets the position buttons to Pre → A/D — keeping the UI consistent with the chain diagram and result card.

Data files
Device JSON files renamed to reflect the version:

FileContents
  microphones_V18.json
   103 microphones, 28 manufacturers

  preamps_V18.json
    39 preamplifiers, 24 manufacturers

  ad_converters_V18.json
     21 A/D converters, 8 manufacturers

  performance_spl_reference_v3_2.json
     40 genres, 140 positions, 90 spot instruments (schema-versioned)

All four files are embedded in the HTML as offline fallback constants (FALLBACK_MICS, FALLBACK_PREAMPS, FALLBACK_ADS, FALLBACK_SPL). The tool is fully functional when opened directly from a local drive.