Download

← All updates

Update

quark 1.18.6

Everything that changed in this version, and why.

The owner asked for a sound editor: "show all the packs, each sound that exists in them, be able to play them, solo and some different samples of gameplay with them ... trim ... filters, and automation for making them all the same volume based on lufs (you can pick a group to all be the same volume)". The editor is a tool outside the game. One small game change makes its loudness levelling hold in the game. Gameplay, network protocol and demos are unchanged.

Sound levels (src/client/audio.cpp, src/client/overrides.*, tools/embed_overrides.py)

  • Why: every replacement sound is rescaled to the loudness of the sound it replaces (prepareClip: the loudest 20 ms; the hitsound tiers by heard loudness, levelHit). That keeps the kits fair, but it also undoes any levelling done in the editor. Example: a group of weapons set to one LUFS comes back at each default's own level.
  • What: a text file sound-levels.txt at the overrides root (shipped assets/overrides/ and the player's <data folder>/overrides/; the player's lines add to the shipped ones) lists, one per line without the extension, the files that keep their own level, e.g. sounds/default/ROCKET, voices/male/GO. mods/sounds/sound-levels.txt does the same for mods (paths relative to mods/sounds, e.g. default/ROCKET).
    • The file is matched without regard to case. Backslashes, a leading ./, an audio extension, blank lines and # comments are tolerated.
  • How a listed file is prepared: the same as before (mono, leading silence trimmed, resampled to 48 kHz, cut at 3 s or 5 s with a 10 ms fade), but with no loudness match and no hitsound levelling. If its peak is over 1.0 it is scaled down to 1.0, never hard-clipped.
    • A kept DEFAULT replacement still carries over to the kits that use DEFAULT's sound, at its own level, and RETRO's chiptuned copy keeps that level too.
  • Cost: none without overrides. The list is read only after the overrides::any() early return; mods make one file-open attempt at startup.
  • tools/embed_overrides.py skipped every .txt file, so a shipped sound-levels.txt would never have reached the game. A root-level sound-levels.txt is now embedded; other .txt / .md files are still skipped.
  • Test: testSoundLevels (assets group). A 0.1-peak tone stays at 0.1 when listed (a sound, a hitsound tier and a voice line) and is matched when not. A listed 2.5-peak file comes out at 1.0. The test also covers case-insensitive matching, CRLF, backslashes and a commented-out line.
  • Docs: docs/ASSETS.md (the overrides table), assets/sfx/custom/README.md, mods/sounds/README.txt.

Sound editor (tools/sound_editor)

  • A local page that runs from disk in Chrome or Edge with no server. build.py <export> <out> builds it from quark_tests exportassets (stdlib Python; FLAC data when ffmpeg is present, about 22 MB, otherwise WAV, about 40 MB).
  • Grids of every kit's 33 sounds and every voice's 30 lines, with play, solo and mute. 10 gameplay scenes use the game's own values: per-sound volumes, pitch jitter, refire times, the 40 ms hitsound gate, the 3D gain and pan formula, the 0.6 master and the mixer's soft limit.
  • Editing: drop a file to replace a sound. Trim and fade on the waveform, then a filter chain (EQ, pitch, compressor, drive, reverb, limiter) with A/B against the original and undo.
  • Loudness is measured by BS.1770-4 (within 0.05 LU of ffmpeg's ebur128), plus max momentary, true peak and the game's heard loudness. Group levelling brings a chosen group to one loudness and keeps the hitsound ladder's ratios.
  • A "missing sounds" list from an audit of events that have no sound, such as gunfire from players the server hides, the bomb explosion and a tag.
  • Export writes sounds/<kit>/<SOUND>.wav, voices/<voice>/<LINE>.wav and a merged sound-levels.txt.