Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Exe request (Read 1464 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Exe request

Can somebody make for me (and others?) a CLI -program that adds cues/markers/loop points etc. to .wav -file?
Or is there already a program, but I haven't found it?

Like I said before, my hobby is game modding and usually the Richard Burns Rally (PC) -game.
All audio files in that game are normal/un-encrypted .wav or .ogg -files, but engine sounds are some kind of packed .eng -files.
There are already tools for create and un-pack those .eng -files, so that's not the problem.

The problem is that "engine creating tool" accepts only .wav -files that contains cues/markers/loop points etc.
I can add those "points" to .wav -file manually with Sony Sound Forge 7.0 -program, but it takes so much time.
Twenty .wav -files and each have 256 loop points (which I think are maximum), it's ~5k loop points in total.
If something goes wrong or I just wanna test something, it's a frustrating thing.
And SSF is old, hard to find, $$$ and other features are useless.
I have tested Audacity, but it doesn't understand these "loop points".

I have created a .wav file that contains one "loop point" and compare it to normal .wav -file.
With hex -editor, it looks like that "loop points" are added to end of the file and it only adds "few bytes" to the file size.
So, it might be a quite easy task to do this kind of program for person that knows .wav -file specification and already have building tools installed.

@john33
I have use your other cli wav -tools, wavgain and volumax, and they are great, so you might know something about this subject?

These are some requirements that I have discovered.
Simple and basic program is good enough and extra features are listed if they are easy to add.

-Engine creation tool accepts only single channel (mono) .wav -files, so multichannel (stereo, 5.1, etc) is not required, but maybe in the future...
-Engine creation tool accepts only 16 bit .wav -files, so 8, 20, 24, 32 bit is not required, but maybe in the future...
-Wav -files probably has to be normal (PCM/signed), so "raw/headerless/etc." is not required and I don't think that we need that feature in the future...
-Engine creation tool accepts at least common sample rates (hz), 8000, 11025, 12000, 22050, 24000, ..., and final product is probably 44100 or 48000.
 So, testing with 44100hz and 48000hz is required and should be "bug free".
 High and low sample rates (below and above ~48kHz) is optional, but very useful/required feature...
-Loop points are numbered and has to be in right order (1, 2, 3, ...)
 I haven't tested what is the maximum loop point count, but I think that 256 (FF) is enough, because after that "loop point fixer" -program gets out-of-order.
-I don't know how .wav -file marks the position of the loop point, but sample point is accurate format and I can use that.
 So, time based -format is not required (00:00.00) and maybe should be disabled.
-There has to be some kind of .wav file duration detector, so loop points are "inside".
 In SSF, there are feature called "Import points from another .wav -file" and that is handy, but it doesn't detect file length.
 If new file is shorter than old file, it adds all "points" to new file, even when "points" are out-of-range.
-Loop points are usually placed same distance to each other, so "--add-looppoints-from-start-to-end-and-use-this-samplegap=123" is good, but maybe custom gaps in the future...
 Starting position and how many "points" to add -features are also nice to have, if wav. file is badly edited or too long.
-Mathematically, loop points has to be same distance between each other and they should be in "zero crossing point" because of "cracks".
 Because (gasoline) engines are not 100% accurate, usually these two requirements are not meet in the same time.
 There are "loop point fixer" -program that I can use, but some kind of "zero crossing point" -detecting feature in this CLI might be useful.
-Wav -file lengths are usually max 5 seconds long, but I think that this information is useless.
-Win32 is enough, but Win64 (x64) might be future proof.
 No need to Linux or Mac builds.
-CLI because it's simpler (No GUI).

I have attached .zip package to this post that contains few example .wav -files to clarify what I mean.
All files are 100ms long.

Re: Exe request

Reply #1
The problem is that "engine creating tool" accepts only .wav -files that contains cues/markers/loop points etc.
I can add those "points" to .wav -file manually with Sony Sound Forge 7.0 -program, but it takes so much time.
Twenty .wav -files and each have 256 loop points (which I think are maximum), it's ~5k loop points in total.
That sounds like a seriously over-engineered format. The only time I've seen looping WAV files in a game is with WAV + SGT files. SGT is created by Microsoft's DirectX MusicProducer software and contains the information about where the loop stops and ends.

I suspect you'll have to offer a monetary bounty to get any programmer interested in solving your problem for you. It doesn't sound like a fun task. Using a site like bountysource might help:

https://github.com/bountysource/core/wiki/Frequently-Asked-Questions

but it looks like this requires an open-source project to already exist for the format you want to manipulate. You can only post bounties to get new features added to that program more quickly.


Re: Exe request

Reply #3
Thanks @Porcus
You solved my problem :)

No need to build a custom exe anymore, I can use BWF MetaEdit.
It is open source, CLI, up-to-date and can import/export "looppoints" from/to .xml -file.
But it was so difficult to find a software which understand these "cues", because I don't know what they are or are they official standard.
Code: [Select]
--in-cue=               Insert cue metadata from the specified file
--in-cue-remove         Remove cue and adlt metadata
--in-cue-xml            Insert cue metadata from filename.cue.xml
--out-cue-xml           Save cue related metadata in filename.cue.xml
It's easy and fast to edit/create .xml -files.
All I have to remember that I don't exceed .wav -file lenght.
Code: [Select]
<?xml version="1.0"?>
<Cues>
    <Cue>
        <ID>1</ID>
        <Position>441</Position>
        <DataChunkID>0x64617461</DataChunkID>
        <ChunkStart>0</ChunkStart>
        <BlockStart>0</BlockStart>
        <SampleOffset>441</SampleOffset>
        <Label>1</Label>
    </Cue>
</Cues>
I don't know what <DataChunkID>, <ChunkStart> and <BlockStart> means, but they seem to be always same and probably doesn't affect to my "looppoints".
I have tried "--in-cue-remove" -option and it works, but "behind-the-scenes" it only adds padding, so the filesize is same and probably the reason is that no need to create a new file.
Same kind of thing that flac uses when editing tags.
But I don't use that feature, because I always use "clean" .wav's.

Looks like that this "import/export" -feature in BWF MetaEdit -software is quite new thing:

Version 21.07, 2020-07-09
+ Cue chunks editor

@Aleron Ives
Yes, to create engine sounds to Richard Burns Rally -game, it's quite complicated thing and I think that this "looppoint" -thing is so special that people don't know about it.
The "engine creating tool" accepts max 20 .wav -files, but you can have less that that.
And you don't have to have 256 loopoints in one .wav -file.
Game's default engine sound has 12 .wav's and about 100 looppoints for one .wav.
That takes +1k in total.

But creating good engine sound it is recommended to use max values.