2026-10-25 · From vibration to evidence↓§
I started with a simple question: did my inexpensive red violin produce a cleaner sound than my trainer? That experiment became The Red Violin. I compared phone recordings, swapped bows, corrected the bridge, and found several ways to confuse the recording conditions with the instrument itself.
This chapter collects the theory I needed to make sense of the results. It starts with the recorded signal, works through Fourier analysis and common audio measurements, and ends with experimental design. Terms such as FFT, spectral centroid, and HNR are useful only after we know what went into them and what can throw them off.
1. The measurement chain↑↓§
A recording does not contain the unaltered “sound of the violin.” It contains the output of a chain:
Player → bow and string → bridge and violin body → air and room → microphone → phone processing → AAC encoder → DSP analysis
Every stage leaves something in the signal.
- The player changes bow speed, pressure, contact point, intonation, and dynamics.
- The string and bow create the vibration.
- The bridge and wooden body reshape that vibration through their resonances.
- The room adds reflections and frequency-dependent reinforcement.
- The microphone has its own directionality and frequency response.
- A phone may apply automatic gain control, noise suppression, or compression.
- AAC encoding discards information according to a perceptual model.
- The analysis chooses time ranges, window lengths, frequency bands, and normalization rules.
The first rule I use is therefore:
A spectrum describes the complete recording chain under particular conditions. It does not isolate the instrument unless the experiment controls everything else.
DSP can find repeatable differences between recordings. The experiment determines whether I can reasonably blame those differences on the violin, the bow, the bridge, or my playing.
2. Sound as a signal↑↓§
Sound in air is a change in pressure over time. A microphone converts that pressure variation into an electrical signal, and a digital recorder converts the electrical signal into numbers. Let the continuous signal be .
The simplest repeating signal is a sinusoid:
The three parameters have separate jobs:
- is the amplitude, which relates to signal level.
- is the frequency in hertz, or cycles per second.
- is the phase, which says where the cycle begins.
A violin note is not one sinusoid. A bowed A4 may have a fundamental near 440 Hz, along with energy near 880 Hz, 1320 Hz, 1760 Hz, and other multiples of the fundamental. These multiples are harmonics. Their relative strengths contribute to timbre, which is part of why two instruments can play the same pitch and remain easy to tell apart.
Playing also produces non-periodic components. Bow friction, attacks, finger motion, room noise, and electronic noise do not fit neatly into one harmonic series. I use noise as a technical category here, not as a synonym for “bad.” Some irregularity belongs to the sound of a bowed string.
RMS: a practical measure of level↑↓§
Positive and negative waveform samples cancel if we simply average them. Root mean square, or RMS, measures their typical magnitude instead:
To calculate it, square the samples, take their mean, and then take the square root. RMS is useful for comparing levels, detecting silence, and tracking variation. It is not the same as perceived loudness; hearing depends on frequency and on how the signal changes over time.
3. From continuous sound to samples↑↓§
A digital recording stores measurements at evenly spaced moments. If the sampling rate is , the continuous signal becomes
For these violin recordings, Hz: the phone stored 48,000 samples per second.
The Nyquist limit↑↓§
A sampled system can only represent frequencies below half its sampling rate:
At 48 kHz, the Nyquist frequency is 24 kHz. Frequencies above that limit must be removed before sampling. Otherwise they fold into lower, false frequencies through aliasing. Real recorders therefore use an anti-aliasing filter before or during conversion.
The Nyquist rule gives a theoretical boundary, not a promise that two samples per cycle will produce a good measurement. Accuracy near the boundary still depends on the filters, converter, and signal quality.
Quantization and encoding↑↓§
Sampling divides time into discrete points. Quantization divides amplitude into discrete levels. With sufficiently fine resolution, quantization error behaves approximately like low-level noise.
AAC introduces a different kind of error. The codec keeps what its perceptual model considers important and discards some of the rest. That is efficient for a phone recording but awkward for measurement: the encoder may change high-frequency content, quiet components near loud ones, and short transients.
| Property | What it controls | Relevant value here |
|---|---|---|
| Sampling rate | Highest representable frequency | 48 kHz |
| Nyquist frequency | Theoretical upper frequency limit | 24 kHz |
| Codec | How samples are stored or compressed | AAC-LC |
| Channels | Independent microphone signals | Mono |
I would use uncompressed WAV for the next controlled experiment. The AAC files are still usable because the recorder and settings remained the same, but they place another limit on the conclusions.
4. Decibels: comparing ratios logarithmically↑↓§
Audio measurements span large ranges, so engineers usually express their ratios in decibels. For power quantities,
Because power is proportional to amplitude squared, an amplitude ratio uses
Some useful reference points are:
| Change | Power ratio | Amplitude ratio |
|---|---|---|
| +3 dB | about 2× | about 1.41× |
| +6 dB | about 4× | about 2× |
| +10 dB | 10× | about 3.16× |
| −20 dB | 1/100 | 1/10 |
The word decibel does not identify the reference by itself. A calibrated sound-level meter might report dB SPL relative to 20 micropascals. The interactive graphs instead set the largest spectral value to 0 dB and show everything else relative to that peak.
This normalization makes spectral shapes easier to compare, but it removes absolute level information. Two traces can look similar after normalization even when one recording was much quieter.
5. Looking at sound in time and frequency↑↓§
An ordinary waveform is a time-domain view: time on the horizontal axis and amplitude on the vertical. It shows attacks, silences, durations, and large level changes well. It is much less helpful when I want to know which frequencies produced that shape.
The frequency domain asks how much of the signal behaves like a sinusoid at each frequency.
The discrete Fourier transform, or DFT, is
The exponential represents a sine and cosine together. At each frequency index , the DFT compares the samples with a rotating sinusoid. Components that line up reinforce one another, while those that do not tend to cancel. The complex result contains magnitude and phase.
The fast Fourier transform, or FFT, is an efficient way to calculate the DFT rather than a separate transform. Direct evaluation requires work proportional to ; a typical FFT reduces it to approximately .
Frequency bins↑↓§
An -sample FFT divides frequency into bins separated by
For a 2,048-sample window at 48 kHz:
That window spans about 42.7 milliseconds. A longer window separates nearby frequencies more precisely but blurs their timing. A shorter window locates attacks more precisely but separates frequencies less well. This time–frequency tradeoff is built into the analysis.
6. Why windowing matters↑↓§
The FFT treats its input block as though the block repeats forever. If the first and last samples do not meet smoothly, the repetition creates an artificial jump. Energy then spreads into neighboring bins. This is spectral leakage.
A window function tapers the block toward zero at both ends. The comparison tool uses a Hann window:
Before the FFT, each sample becomes . The taper reduces leakage, although it also broadens spectral peaks and changes their amplitude. Common windows make different compromises:
| Window | Main advantage | Main cost |
|---|---|---|
| Rectangular | Narrow peaks when a sinusoid fits the block exactly | Severe leakage otherwise |
| Hann | Good general-purpose leakage reduction | Wider peaks |
| Hamming | Suppresses the nearest sidelobe strongly | Different distant-leakage behavior |
| Blackman | Very low sidelobes | Broad main lobe and reduced frequency separation |
For these musical recordings, applying the same Hann window everywhere matters more than searching for a perfect window.
7. The short-time Fourier transform↑↓§
One FFT turns one block of time into one spectrum. Because music keeps changing, the short-time Fourier transform (STFT) repeats that calculation across short, usually overlapping frames.
A spectrogram or waterfall displays the STFT as an image:
- Horizontal position represents time.
- Vertical position represents frequency.
- Color or brightness represents magnitude or power.
Horizontal bands usually mark sustained harmonics. A vertical burst marks a brief event spread across many frequencies, such as an attack or handling noise. Diffuse high-frequency energy may come from the bow, the room, the microphone, or the codec. The image shows where and when it occurred, not which source caused it.
The explorer below uses the same passages as the red-violin article. The average spectrum collapses the passage into one trace; the waterfall keeps the timing visible.
Explore the recordings
Compare normalized spectra, inspect frequency over time, or listen to the exact analyzed passages.
The same A-major scale material from Record-001, recorded in one session.
Loading the recording…
The frequency axis is logarithmic because both hearing and musical pitch are approximately logarithmic. The difference between 100 and 200 Hz is one octave; so is the difference between 1,000 and 2,000 Hz. A linear axis would devote ten times as much space to the latter octave.
8. Extracting useful features↑↓§
A spectrum may contain thousands of values. A feature reduces part of it to a smaller description that is easier to compare. Some context is always lost in the reduction.
Fundamental frequency and harmonics↑↓§
The perceived pitch usually corresponds to the fundamental frequency . Harmonics occur near integer multiples , , and so on. Their levels need not decrease smoothly, because the violin body reinforces some frequency regions more than others.
A note can still have a clear pitch even when its fundamental is weak. The auditory system can infer the missing fundamental from the spacing among upper harmonics. This is one reason “find the largest spectral peak” is not a dependable pitch detector.
Spectral centroid↑↓§
The spectral centroid is a power-weighted average frequency:
The centroid usually rises when more energy moves toward high frequencies, so it is often used as a rough measure of brightness. It is not a complete model of what a listener hears.
Centroid values only compare cleanly when the analysis uses the same frequency limits, windowing, channel treatment, trimming, and power definition. Silence, handling noise, a different melody, and phone processing can all move the result.
Band energy↑↓§
Instead of averaging the entire spectrum, we can sum power within a chosen range:
For violin, I look at the low fundamentals, the 1–2 kHz region that can sound nasal, the broad 2–3.5 kHz bridge-hill region associated with projection, and higher bands that may contain brilliance or bow noise. These are useful regions, not fixed perceptual borders. Their meaning depends on the notes, player, instrument, room, and listener.
Band energies are usually more meaningful as ratios or normalized values. Raw energy will mostly report which take was louder.
Harmonic-to-noise ratio↑↓§
Harmonic-to-noise ratio, or HNR, compares energy assigned to periodic harmonic structure with the remaining non-periodic energy:
A larger value means that the estimator found a more periodic signal. The hard part is deciding which energy counts as harmonic. Autocorrelation, cepstral analysis, fitted harmonic sinusoids, and spectral noise-floor estimates make that decision differently, so they can return different HNR values for the same recording.
For violin, HNR can be influenced by:
- stable versus unstable bow motion;
- attacks and string crossings;
- vibrato and pitch drift;
- room reverberation;
- microphone and codec noise;
- the selected note range;
- the algorithm's definition of “harmonic.”
I treat HNR as a periodicity or cleanliness indicator, not a quality score. A clean periodic signal is not automatically a beautiful performance.
Dynamic range and crest factor↑↓§
Dynamic range describes the separation between quieter and louder portions, but its exact definition must be stated. It might mean peak minus noise floor, a percentile range of frame levels, or the range of note RMS values.
Crest factor is the ratio between peak amplitude and RMS amplitude:
A wide range may come from expressive control, inconsistent bowing, automatic phone gain, or a different passage. The number needs musical and experimental context before it says anything useful.
| Measurement | Often helps describe | Cannot establish by itself |
|---|---|---|
| RMS | Average signal level | Perceived loudness or tone quality |
| Spectral centroid | Distribution toward high frequencies | “Better” or “worse” tone |
| Band energy | Concentration in a selected region | The physical source of that energy |
| HNR | Periodicity relative to residual noise | Instrument value or craftsmanship |
| Dynamic range | Variation in level | Whether variation was expressive or accidental |
9. Why a violin produces these spectra↑↓§
A bowed string operates through repeated stick–slip motion. Bow hair grips the string and pulls it sideways until the restoring force makes the string slip. Rosin supplies enough friction to keep the cycle going. When the motion is stable, it produces the approximately periodic Helmholtz motion associated with bowed strings.
The string alone moves too little air to radiate sound efficiently. It sends force through the bridge into the top plate. Besides supporting the strings, the bridge filters their motion and couples it to the body. The top, back, ribs, enclosed air, bass bar, soundpost, and openings all participate in resonant modes that strengthen some frequency regions and weaken others.
The bridge hill is a broad concentration of response often found around 2–3 kHz in good violins. It can contribute brilliance and projection, although its frequency and shape vary. More energy in that region does not mean that the bridge caused the change by itself. The played notes, bow, setup, and microphone are still in the measurement.
The player controls the excitation:
- Bow speed affects supplied energy and loudness.
- Bow force changes how strongly the hair grips the string.
- Contact point changes which harmonic patterns are easy to sustain.
- Bow angle can introduce neighboring-string contact or irregular friction.
- Attack timing determines whether a note begins cleanly or with a transient scrape.
Setup changes the physical system. Bridge position and fit, soundpost position, string type, afterlength, tailpiece mass, and mute placement can all change the response. In my comparison, correcting the bridge was part of the experiment rather than a housekeeping detail.
10. The room and microphone are part of the graph↑↓§
Suppose the violin produces a signal and the room-plus-microphone has an impulse response . Ignoring nonlinear processing for a moment, the recorded signal is approximately
where denotes convolution and represents added noise. In the frequency domain, convolution becomes multiplication:
Moving the phone changes . At one position a reflection may reinforce a frequency; at another it may partly cancel it. Direction matters too, because a violin does not radiate every frequency equally in every direction.
Phone processing also makes the chain partly nonlinear and time-varying. Automatic gain control can raise quiet passages and reduce loud ones. Noise suppression can alter sustained high-frequency content, and the encoder can respond to what happened in the preceding moment. The convolution model is therefore an approximation.
That helps explain why I misidentified the violins in the second comparison. The lower-band balance and detailed harmonic profile moved between sessions, even though the red violin remained relatively clean and dark. I had treated a whole-register spectrum too much like an instrument fingerprint.
11. Designing a trustworthy comparison↑↓§
No amount of analysis repairs an uncontrolled experiment. A useful violin comparison begins before I press Record.
Keep the physical conditions fixed↑↓§
- Mount the phone or microphone; do not hold it.
- Mark the chair and stand positions.
- Record every condition in one session when possible.
- Use the same passage, tempo, note range, and dynamics.
- Remove the mute unless the mute is the variable being tested.
- Tune both instruments and check bridge position first.
- Disable automatic processing when the recorder permits it.
- Prefer mono WAV at 48 kHz or higher over compressed AAC.
Change one factor at a time↑↓§
To separate violin and bow effects, use a two-by-two design:
| Red bow | Trainer bow | |
|---|---|---|
| Red violin | Red instrument and red bow | Red instrument and trainer bow |
| Trainer violin | Trainer instrument and red bow | Trainer instrument and trainer bow |
This design is more informative than comparing only the two original pairings. It estimates the instrument effect while holding the bow constant and the bow effect while holding the instrument constant. It can also reveal an interaction, such as one bow working unusually well with one violin.
The take order should be randomized or alternated. If every trainer take comes first, then warm-up, fatigue, learning, or rosin buildup can look like an instrument difference.
Repeat and quantify variation↑↓§
Record at least three takes of each condition. For each metric, calculate a mean and a standard deviation. Better still, use paired differences when the passages are recorded back-to-back under matched conditions.
Any effect has to be compared with the normal variation between takes. If nominally identical takes vary by about 3 dB in HNR, a 1 dB difference between violins is weak evidence. A consistent 4 dB difference across several matched takes is much harder to dismiss.
Do not select only the cleanest take from one instrument and an average take from the other. Either analyze all valid takes or define the selection rule before recording.
Listen blindly as well as measuring↑↓§
DSP features answer narrow questions. Human listening integrates pitch, phrasing, transient behavior, spatial radiation, and musical preference. A useful protocol includes level-matched, randomized listening samples whose identities are hidden from the listener.
The measurements and the listening test may disagree. That is useful information: the selected feature may not describe what mattered to the listener.
12. A reproducible analysis workflow↑↓§
For the next round of recordings, I would use this sequence:
- Archive the originals. Never overwrite the raw recordings.
- Document the conditions. Record instrument, bow, strings, bridge state, mute, passage, microphone position, and take order.
- Decode consistently. Convert every file through the same path.
- Inspect the waveform. Find clipping, handling noise, silence, and unexpected gain changes.
- Choose regions by rule. Use matched passages or a stated energy threshold rather than whichever crop looks best.
- Measure level. Calculate frame RMS and check whether level matching is needed.
- Compute the STFT. Use the same window, FFT length, overlap, and frequency limits for every take.
- Extract features. Calculate centroid, band ratios, HNR, or other quantities using documented definitions.
- Aggregate repeated takes. Report variation, not only means.
- Plot before concluding. Look for outliers, time-localized noise, and features driven by one note.
- Perform blinded listening. Check whether measured differences are audible and meaningful.
- Report limitations. Preserve alternative explanations.
Someone with the original audio and the analysis settings should be able to reproduce the result. If an undocumented crop or parameter change reverses the conclusion, I would not call the result robust.
13. Reading the red-violin results carefully↑↓§
In the matched A/B passage from Record-001, the interactive analyzer finds a spectral centroid near 1.21 kHz for the trainer and 1.05 kHz for the red violin. My earlier analysis gave roughly 1.23 and 1.06 kHz. The small difference is expected because centroid depends on FFT size, trimming, windowing, averaging, and frequency limits.
There is nothing inherently ideal about a centroid of 1.05 kHz. What matters here is the paired result: in the same-session passage, the red violin placed less of its energy at high frequencies. That fits what I heard as a darker sound.
HNR was generally higher for the red violin, meaning that its recorded signal was more periodic under this estimator. The bow swaps assigned some of that advantage to the red bow. After I corrected the bridge, I obtained the cleanest red-violin recording of the set, so setup was clearly a major variable.
My practical conclusion is modest. The red violin and its bow produced the cleanest combination in these recordings, and the violin retained some advantage when I held the bow constant. I cannot turn that into a universal ranking, a market value, or a requirement that somebody else prefer its darker sound.
14. A compact learning path↑↓§
For someone learning this material, I would study the subjects in this order:
- Algebra and trigonometry: ratios, logarithms, sine waves, frequency, and phase.
- Complex numbers: the language that makes Fourier analysis compact.
- Signals and systems: time domain, convolution, impulse response, and linearity.
- Sampling: Nyquist frequency, aliasing, quantization, and digital audio formats.
- Fourier analysis: DFT, FFT, bins, magnitude, power, and phase.
- Practical spectral analysis: windows, leakage, overlap, STFT, and spectrograms.
- Audio features: RMS, centroid, band energy, HNR, and dynamic range.
- Musical acoustics: strings, bows, bridges, body modes, radiation, rooms, and microphones.
- Statistics and experiment design: repeated trials, paired comparisons, uncertainty, blinding, and confounding variables.
Calculus and linear algebra become useful when deriving transforms and system behavior, but neither is required to build the initial intuition. Circuits, semiconductor physics, power systems, and electromagnetics belong to electrical engineering more broadly; they are not prerequisites for this violin comparison.
Glossary↑§
| Term | Meaning |
|---|---|
| Aliasing | False low-frequency content created when frequencies above Nyquist are sampled improperly. |
| Band energy | Signal power summed within a stated frequency interval. |
| Centroid | The power-weighted average frequency of a spectrum. |
| Convolution | The operation describing how an input is transformed by a linear time-invariant system. |
| DFT | A transform that represents a finite sample block using discrete frequencies. |
| FFT | An efficient algorithm for calculating the DFT. |
| Fundamental | The base repetition frequency associated with a periodic note. |
| Harmonic | A frequency near an integer multiple of the fundamental. |
| HNR | A ratio comparing estimated harmonic power with estimated non-harmonic power. |
| Nyquist frequency | Half the sampling rate; the theoretical upper limit for representable frequencies. |
| RMS | A measure of typical signal magnitude based on the mean of squared samples. |
| Spectrogram | A display of spectral energy across both time and frequency. |
| STFT | A sequence of windowed Fourier transforms applied across time. |
| Window | A taper applied to a finite sample block to control spectral leakage. |
DSP gave me better questions and a way to check some of my impressions. It did not make the judgment for me. I still had to account for the room, the phone, the setup, and my own playing—and to admit when the graph showed less than I wanted it to.