Made 2 utilities for working with .wav and .ogg files for Arma 3. Both expect drag and drop a bunch of files on the exe.

  • sound_duration.exe – prints the durations of .wav and .ogg files in seconds in console (see title image)
  • tracks2config.exe – does what sound_duration does + generates CfgMusic config template with durations, for example:
class CfgMusic { #define TRACK_NAME(NAME) $STR_A3_CfgMusic_##NAME #define TRACK_PATH(FILE) C:\Users\KK\Desktop\##FILE class flip_over { name = TRACK_NAME(flip_over); sound[] = { TRACK_PATH(flip_over.wav), db+0, 1.0 }; duration = 0.17; musicClass = ""; theme = ""; }; class takehostage { name = TRACK_NAME(takehostage); sound[] = { TRACK_PATH(takehostage.ogg), db+0, 1.0 }; duration = 0.60; musicClass = ""; theme = ""; }; };

It writes config.cpp file in the same directory the tracks2config.exe is located. If config.cpp exists it writes config(1).cpp, etc. The prefix in TRACK_NAME and path in TRACK_PATH macros most likely will need tweaking after generation.

Download zip

Enjoy,

KK