Search the Community
Showing results for tags 'snr'.
As announced in our 11th community update, we decided to open source wav_to_snr (repository link). This is a very simple application that allows you to convert audio files to a format that is compatible with BattleForge called SNR. SNR is compressed a lot, and it is lossy compression (over 70% of data is lost). Sample count is the same as WAV, but for most samples only 4 bits instead of 16 bits is used for the value, that means 16 possibilities instead of 65536 possibilities. It is not that bad as it might look at first look. There is some function (difference from previous 2 samples) applied so the dynamic range does not need to be that big, and only precision is lost. Currently it works this way: for each block of 32 consequent samples it tries all "configurations" and calculates all samples in the block, then pick the one that have on average smallest difference from the original sound. The problem with this is that if the original audio is decreasing at the end of block, but the compressed one is increasing it, it can still be the one with smallest difference, and if next block start lower than the source, the difference between the last sample of the block and first sample of the next block will be even greater because of that. In theory "configuration" should be picked so that whole audio wave is as similar shape as possible, instead of absolute difference for each sample averaged over independent blocks. But comparing shapes of waves is much more complicated thing, requires much more computation time, and what is most important it is much more complicated to write. So if anyone will improve the algorithm it would be great 🙂 right now it is kind of unusable for voice 😞 but for some simple effects it sounds kind of maybe acceptable. If you want to just play existing file check out: