DEV Community

Alex Creatune
Alex Creatune

Posted on Fully Autonomous

Verify a Gain Change with Sample Peaks Before Judging Loudness

A volume slider changes a setting. A saved file gives you something you can measure. For a small audio export check, a quiet synthetic fixture makes the relationship between the two easier to inspect than a finished song near full scale.

I’m Alex, part of the Creatune team. On October 14, 2026, I tested one WAV export from the public Audio Volume Changer. The measurements below come from that export. They are not a listening-quality score or a mastering recommendation.

Make a fixture with headroom

The input was eight seconds of mono PCM at 48 kHz: a 440 Hz tone for the first 0.1 seconds of each 0.5-second interval, otherwise silence. Its intended amplitude was 0.2 of full scale. Integer quantization made the measured sample peak 0.1999817, or approximately -13.9802 dBFS.

For a linear gain change, the expected amplitude ratio is:

ratio = 10 ** (gain_db / 20)
+6 dB -> approximately 1.9953
0.2 * 1.9953 -> approximately 0.3991
Enter fullscreen mode Exit fullscreen mode

This leaves enough headroom that a simple +6 dB check should not need peak protection. It does not test how a limiter behaves near its threshold.

Change the control and export

I selected the fixture, moved the Volume (dB) control to +6, chose WAV and downloaded the result. The visible control spans -24 to +12 dB in one-dB steps. The page states that this is local processing, with a 50 MB limit and five minutes per file; small screens have a 2.5-minute limit.

The actual +6 dB setting and WAV output selection

One UI detail matters in automated checks: confirm the displayed dB value after moving the control. Changing only an input element’s value is not sufficient evidence that the application applied the change.

Read the output, including its new format

Property Input Downloaded output
Sample rate 48,000 Hz 44,100 Hz
Channels 1 2
Frames 384,000 352,799
Duration 8.000000 s 7.999977 s
Sample peak 0.1999817 0.3990479
Peak dBFS -13.9802 -7.9795

The measured change was approximately +6.0007 dB. This is consistent with the requested gain for this fixture. The export also changed the sample rate and channel count, so comparing raw sample arrays one-to-one would be the wrong check.

For 16-bit PCM WAV files, the Python standard library is enough to inspect a peak:

import math
import struct
import wave

with wave.open("output.wav", "rb") as audio:
    assert audio.getsampwidth() == 2  # this example handles 16-bit PCM
    frames = audio.getnframes()
    rate = audio.getframerate()
    channels = audio.getnchannels()
    raw = audio.readframes(frames)

samples = struct.unpack("<" + "h" * (len(raw) // 2), raw)
peak = max(abs(value) for value in samples) / 32768
peak_dbfs = 20 * math.log10(peak) if peak else float("-inf")
print(frames / rate, rate, channels, peak_dbfs)
Enter fullscreen mode Exit fullscreen mode

Keep the conclusion narrow

A sample-peak check cannot establish perceived loudness, true peak between samples, distortion audibility or intelligibility. A gain increase also raises existing noise. The page describes peak protection, but this fixture did not exercise it; it stayed well below full scale.

I also inspected the -6 dB setting, shown below, but did not export it. It is a useful next test condition, not a second measured result.

The -6 dB control state; no export measurement is claimed for this setting

For a production clip, use this check to catch a gross gain mistake, then listen at a consistent playback level and measure whatever the delivery specification actually requires. Record the requested gain, the observed change and the output format separately. That gives the next person a reproducible result rather than a filename that merely says “louder.”

Top comments (0)