Iterating...
Cost = ∑(Curvature2) - λ∑log(Mag)
An engineering deep-dive into how Viper Tuner differs from traditional Electronic Tuning Devices (ETDs) through acoustic modeling, spectral analysis, and global optimization.
For decades, the "Electronic Tuning Device" (ETD) has followed a standard paradigm: measure a few sample notes, assume a smooth inharmonicity curve, and apply a target interval style (like "pure 4:2 octaves"). This approach democratized tuning but introduced a critical limitation: Interpolation.
Existing ETDs assume that the inharmonicity between every harmonic is the same. Our software measures each harmonic peak directly. What we found is that usually the inharmonicity of each harmonic is close, but sometimes it is not the same for each harmonic.
We use a mathematical model that fits experimental data and modify that model for the specifics of the piano.
We don't tune to theoretical partials. We measure what is actually audible and ignore the noise.
We solve 88 notes simultaneously to minimize dissonance across the entire instrument.
The best tuning is an aural tuning by an experienced tuner. We attempt to provide tools that help the tuner visualize the fundamental characteristics of the inharmonicity of the piano in a manner that helps the tuner quickly converge on an optimal tuning for this particular piano.
This optimization strategy balances two objectives that mirror validated aural technique:
In any given interval, there are multiple conflicting constraints. An aural tuner finds the optimal compromise between these conflicting forces.
Viper solves this using Weighted Least Squares optimization. This is akin to minimizing the beat rate of all coincident partials in the piano at the same time while also accounting for the perceived volume of the overlapping harmonics.
When tuning a single note, it must align with multiple lower notes simultaneously. Due to inharmonicity, these targets rarely line up. The 2:1 Octave is often flatter than the 4:1 Double Octave. We optimize for the Weighted Center of Gravity between these conflicts.
Ensuring beat-rate progressions are even. Optimization must reproduce "similar pitch fluctuations as in high-quality aural tuning" (the Railsback curve).
Traditional ETDs often force a tuning style (e.g., "6:3 Octaves") regardless of whether the piano actually produces those partials strongly. Viper measures the volume of every partial and dynamically weights intervals based on their actual audibility.
Traditional ETDs often use fixed interval definitions (e.g., "Tune to the 6:3 octave"). Viper uses the actual volume of the partials. Try reducing the "6:3 Volume" to zero below. Note how the Traditional ETD keeps trying to tune to it (tuning to noise), while Viper automatically shifts weight to the audible 4:2 interval.
Fixed "Style" ignores lack of signal.
Dynamically adapts to what exists.
Measuring a piano is not just curve fitting; it is about reconstructing the actual string scaling. This process is best informed by well-known principles of string scaling and physics modeling, which are quite advanced in the modern era.
The deviation of partial n depends on the inharmonicity coefficient B.
Viper implements this parametric model. This ensures the tuning gracefully handles the transition, respecting the distinct physical stiffness of the bass strings versus the treble.
Based on Rigaud et al. (2013), this visualizes the inharmonicity coefficient B(m) as the sum of two exponential trends. The additive model smoothes discontinuities between the Bass and Treble bridges.
Controls the decay rate of the bass bridge influence.
Controls the exponential rise in stiffness for short treble strings.
Disclaimer: This is a simplified parametric visualization based on the model by Rigaud et al. and is provided only for visualization purposes to illustrate the concept of additive bridge inharmonicity.
To find the signal in the noise, you need massive data density. Traditional ETDs sample sparse points. Viper Measure employs a Cluster Grid engine that scans 61 notes (A0-A5) at very high spectral resolution.
It analyzes over 10 million data points per session (61 notes × 32,768 FFT bins × 5 resolution levels) and generates up to 50 competing inharmonicity candidates for every single note.
The best tuning is the best compromise. By considering all possibilities simultaneously, we can make the most optimal decision for the whole instrument. Viper solves for the entire piano at once using either a physics model (Classic workflow) or actual measured data (Measure workflow).
Minimizing curvature (smoothness) while maximizing magnitude (evidence).
Using Weighted Gradient Descent, it navigates a search space of 5088 combinations. The solver minimizes a complex cost function that balances Curvature (smoothness) and Magnitude (loudness).
Standard ETD approaches can be categorized by how much acoustic information they filter out. They range from fixating on single targets to analyzing broad, volume-informed spectrums.
The "Isolation" Approach. Software like TuneLab asks users to select a specific interval match (e.g., 6:3 octaves) for the bass and a different one for the treble.
It ignores all other conflicting information. If you tune a pure 4:2 octave, the 6:3 octave might be beating wildly. The software is blind to this conflict because it only calculates for the single selected partial pair.
The "Manual Compromise" Approach. This allows the user to specify a weighting percentage (e.g., 50% 4:2 / 50% 6:3).
While this considers more than one interval, the "blend" is static. It applies the same math regardless of the piano. It does not know if the 6th partial is actually loud enough to matter. It is a theoretical recipe, not a measured reality.
The "Style" Approach. Reyburn CyberTuner uses "Smart Partials" to automatically switch targets based on piano size.
This is an improvement, but it still relies on discrete selection. It might switch from a 6:3 target to a 4:2 target at a specific note, creating a "break" or discontinuity. It is still calculating targets rather than solving the whole system.
Some academic methods propose tuning by minimizing the global spectral entropy (disorder) of the sound.
The problem with this method is that it indiscriminately minimizes entropy for all coincidences (like the fifth). This pulls intervals towards Just Intonation, creating a quasi-equal temperament that cannot support specific historical temperaments or the precise stretch required for modern performance.
Unlike global entropy minimization which "flattens" everything, Viper uses selectable coincidences. This allows us to apply sophisticated global optimization while strictly preserving the specific color and character of unequal Historic Temperaments, which is impossible with pure entropy minimization.
A master aural tuner does not have a filter. They do not fixate on a single partial. They analyze the sum of all waveforms arriving at their ear.
Viper simulates this by measuring the volume and frequency of every harmonic (not just a select few) and optimizing for the global minimum of dissonance of musically relevant partials.
Unlike "Level 3" which picks a target, Viper considers all targets simultaneously, weighted by their energy. It is not calculating a position; it is balancing the acoustic load.
Even "Level 3" ETDs fail if their underlying map of the piano is wrong. Most rely on measuring 5-10 notes and drawing straight lines between them.
This chart uses parameters derived from Rigaud et al. (2013) to model a concert grand piano.
Viper provides two primary tuning workflows plus a suite of aural tools, recognizing that different contexts demand different trade-offs between speed, precision, and control.
Philosophy: Above C4, piano inharmonicity converges to a near-universal curve. However, below C4, instruments diverge wildly. Viper Classic handles this dichotomy by applying physics-validated universality in the treble while strictly respecting individual instrument characteristics in the bass.
1. Physical Universality: Robert W. Young (1952) and Rigaud et al. (2013) confirmed that inharmonicity above Middle C is roughly the same across all pianos due to standardized string design.
2. Manufacturing Precision: Industry data shows tolerance of 0.0003 inches, minimizing variation. Viper Classic uses this universal model to bypass noisy treble measurements.
We respect the wide variance in the bass. Unlike the treble, bass strings (wound) vary massively between a spinet and a concert grand. Viper Classic does not use a universal model here.
Instead, it tunes to carefully selected audible partials specific to the low end of the instrument. By locking onto the actual harmonic content of the bass strings, the tuning effectively follows the specific inharmonicity of that unique piano, respecting its individual character.
3. Algorithmic Application: While Rauhala et al. (2007) focused on estimation algorithms, their work validates that treble deviations are often measurement noise. Viper Classic eliminates this noise while preserving the true, unique growl of the bass.
Executive Summary: Behind both workflows is a physics engine that can create a comprehensive "Ghost Piano" simulation. It mathematically models the physical properties (inharmonicity) and acoustic properties (harmonic decay) of a specific piano type and then virtually "tunes" this ghost instrument using the same advanced optimization engine used for real measurements. These modeling principles power Classic's treble model and inform Measure's candidate evaluation.
1. Parameterized Inharmonicity: Uses the Two-Bridge Additive Model to simulate stiffness changes.
2. Modeled Harmonic Decay: A generic tuner assumes every harmonic is loud. Viper knows a Spinet has a weak fundamental while a Steinway D has a deep, rich H1.
Viper Custom models 8 distinct archetypes. Drag the slider to observe how harmonic content shifts as string length decreases.
Establishes A3-A4 (4:2 octave) and interpolates the initial scale.
Dynamically switches strategies based on Volume Score.
Minimizes weighted squared beat rates using Gradient Descent.
Shifts optimized curve to lock A4 to 440Hz.
The "Cluster Grid" analysis engine is fully active in the production web environment via WASM. This is not a snapshot; it is a deep scan.
Viper generates up to 50 competing hypotheses per note (gray dots). The gradient descent solver finds the single "path of least resistance" (green line) through this 5088 search space.
With a search space of 5088, brute force is impossible. Viper uses Weighted Gradient Descent with numerical gradients, optimizing each note's position along the cost surface. Early stopping with a patience parameter halts iteration once convergence is reached.
Once the B-value is locked, the system goes back to measure the precise relative volume of every harmonic (H1-H12). This "timbral fingerprint" allows the optimizer to ignore theoretical intervals (like 6:3) if the piano actually has a weak 6th harmonic.
Each note generates up to 40 competing inharmonicity hypotheses from different harmonic peaks. Rather than picking the "best" candidate, Viper uses a consensus algorithm that evaluates how well each hypothesis explains the entire harmonic series. Candidates that are supported by multiple independent peak measurements receive higher confidence scores, filtering out spurious peaks caused by sympathetic resonance or environmental noise.
During normal tuning, Viper measures the inharmonicity coefficient B as a byproduct of each strike. The heterodyne technique compares the measured frequency of upper partials against the fundamental to extract B in real-time, without requiring a separate measurement pass. This provides continuous validation that the piano's inharmonicity matches the model being used for tuning targets.
The Inharmonicity Monitor is a real-time visualization that plots measured B coefficients against the predicted model curve as you tune. Deviations between measured and predicted values are immediately visible, alerting the technician to notes where the piano's actual behavior diverges from the model—common at bridge transitions, duplex scaling boundaries, or on pianos with unusual stringing.
Philosophy: Traditional aural tuning—the way pianos have been tuned for centuries—is available as a suite of tools accessible from the Tools menu during any session. Tune by listening to beats, follow proven sequences (Temperament Octave F3-F4, octave expansion), with visual cues to assist your learning. These tools complement both workflows rather than standing as a separate mode.
In Viper's system, partial volume data isn't just used for weighting—it's foundational. If a partial is below audibility, it's excluded from optimization.
The two-bridge model captures characteristics that linear interpolation misses, such as the bass bridge contribution fading and the treble bridge contribution growing.
Entropy minimization naturally pulls notes toward just intonation. Viper deliberately optimizes for musical structure (equal temperament) rather than mathematical minimization of global dissonance.
Viper Tuner is not just another ETD. It is a physics-based acoustic simulator that automates the decision-making process of a master aural tuner.
Traditional apps guess (interpolate) between 5 sample notes. Viper Tuner scans 61 notes or builds a full physical model.
We don't force a "6:3 Style". We measure partial volumes. If the piano has a weak 6th partial, we ignore it—just like your ear does.
We don't tune bass, then treble, and hope they meet. We solve the entire piano at once using Weighted Least Squares.
The daily driver. Uses universal treble physics (saves time) + real bass measurements (preserves character). Fastest high-quality tuning.
The microscope. Measures 61 notes with high-res DSP, peak hypothesis consensus, and heterodyne B measurement. For concert instruments and scaling analysis.
Temperament sequences, interval checks, and octave expansion guidance—accessible from the Tools menu during any session.