DEV Community

Alex Creatune
Alex Creatune

Posted on

How to Verify Clip Order in a Joined Audio File with Three Test Tones

A six-second export can have the right length and the wrong clip order. If you rearrange an intro, transition, and ending in an audio joiner, duration alone will not catch that mistake.

This small test gives each input a distinct signal, rearranges the inputs, and checks the downloaded file. I’m Alex from the Creatune team. I ran the public, signed-out workflow on October 28, 2026. These are synthetic fixture measurements, not a listening review or a claim about every possible input file.

Create three identifiable inputs

You need Python 3 and a browser. This standard-library script creates three two-second, mono, 16-bit PCM WAV files at 48 kHz:

import math, struct, wave

for name, hz in [("01-low.wav", 220),
                 ("02-mid.wav", 440),
                 ("03-high.wav", 880)]:
    with wave.open(name, "wb") as w:
        w.setparams((1, 2, 48000, 0, "NONE", "not compressed"))
        w.writeframes(b"".join(
            struct.pack("<h", int(8000 * math.sin(2 * math.pi * hz * i / 48000)))
            for i in range(96000)
        ))
Enter fullscreen mode Exit fullscreen mode

Each file has the same duration and amplitude. Frequency is its identifying feature. Keep playback volume low if you choose to listen; listening is not required for the measurement below.

Rearrange the clips in Creatune

Open Creatune Audio Joiner, choose the three local files, and verify the displayed order before editing. The current page says local audio stays on the device and allows up to 12 tracks / 10 minutes, with a five-minute limit on small screens and 50 MB per file.

Three two-second fixtures loaded in low, middle, high order

Use the Move up arrow on 03-high.wav twice so the final order is:

03-high.wav → 01-low.wav → 02-mid.wav
880 Hz      → 220 Hz     → 440 Hz
Enter fullscreen mode Exit fullscreen mode

Leave each Start at 0 and End at 2. Leave Fade in and Fade out disabled, check that both joins say Direct join, and leave Trim silence at joins unchecked. These choices keep timing changes out of this particular test. Select WAV under Output format and download the result. Save it locally as reordered.wav.

The high tone moved first, with direct joins and WAV output selected

The total shown in the interface is 0:06.0. That is useful, but it cannot establish which clip came first.

Inspect the exported signal

The code below reads the first channel of a 16-bit PCM WAV and counts upward zero crossings in three half-second windows. The windows sit inside the clips, away from the joins. This is a simple identifier for clean test tones; it is not a general pitch detector for songs.

import struct, wave

with wave.open("reordered.wav", "rb") as w:
    assert w.getsampwidth() == 2, "This checker expects 16-bit PCM"
    rate, channels, frames = w.getframerate(), w.getnchannels(), w.getnframes()
    values = struct.unpack("<" + "h" * frames * channels, w.readframes(frames))
    mono = values[::channels]

print("rate, channels, frames, seconds:", rate, channels, frames, frames / rate)
observed = []
for start in (0.25, 2.25, 4.25):
    window = mono[round(start * rate):round((start + 0.5) * rate)]
    count = sum(a <= 0 < b for a, b in zip(window, window[1:]))
    observed.append(count / 0.5)
print("estimated frequencies:", observed)
assert all(abs(a - b) <= 4 for a, b in zip(observed, (880, 220, 440)))
Enter fullscreen mode Exit fullscreen mode

My downloaded file produced:

rate, channels, frames, seconds: 44100 2 264597 5.999931972789116
estimated frequencies: [880.0, 218.0, 440.0]
Enter fullscreen mode Exit fullscreen mode

A half-second counting window has roughly 2 Hz resolution, and a crossing near a window boundary affects the count. The middle value is consistent with the 220 Hz fixture under this deliberately loose tolerance. The order check passes for this file.

There are two other observations to preserve: the output is 44.1 kHz stereo rather than 48 kHz mono, and its frame count is three below exactly six seconds at 44.1 kHz. The interface rounds its duration. I therefore would not describe this export as preserving the original sample format or as sample-perfect concatenation. Checking sequence and checking exact sample continuity are different tests.

Turn the fixture into a useful delivery check

For a real music reel, keep a written clip order and identify a recognizable phrase inside each segment. Review those landmarks in the downloaded file, not just in the editor. Listen separately to the transitions: a sequence check does not reveal clicks, awkward harmony, or unwanted overlaps.

If the frequency check fails, first inspect whether the files were actually moved, whether a trim or fade was enabled, and whether you are checking the newest download. Do not widen the tolerance until an unexplained result passes. If you intentionally use crossfades, recompute the expected window positions because overlap changes where later clips begin.

For a rebuildable record of inputs and trims, see how to write a clip manifest before joining audio. For choosing the editorial order of musical excerpts rather than testing their export, see a four-clip listening-reel planning note, in Japanese.

Top comments (0)