This is a tool developed to help with the sound design and game audio prototyping process.
It now provides several crossfade time options, allowing flexibility when handling audio assets. 3 modes of crossfade are also available, each being linear, logarithmic, and sine. More features are now in development.
The application is built based on Avalonia and the .NET Framework, with the functioning language being C#.
This program emulates the typical way of processing a looping audio in a DAW system.
To make a looping sound, the audio clip will first need to be cut in half and swapped in position. This means that the former half of the audio now becomes the latter half, and vice versa. Then, the two audio tracks will need to be overlapped and crossfaded so they merge perfectly into each other.
This program, essentially, does the same thing.
Using the NAudio library, the program first reads the audio file into a float array that stores all the data. It then cuts the audio into two pieces and performs a swapping operation.
The swapped audio data array will then be used to generate the crossfaded result. The program will start with the midpoint of the array, perform a special computation (see Phase Issue below), and mix the two tracks beginning at the computed index.
Different crossfade modes specify how the program will render the crossfaded area. In its core essence, the program adds the two data multiplied by a weight coefficient that is calculated based on the relative index and functions.
After these steps, the audio clip is ready for exporting. The program will automatically provide a postfix to the file name if no customized file name is specified.
When dealing with audio, phase is always an issue. This tool has a special computation method, to the greatest extent, to eliminate the phase problem.
The program, starting at the midpoint of the array, finds the nearest index at which the wave has an amplitude of zero. This ensures that the crossfaded audio will always start at a zero point, avoiding abrupt jumps in phase and amplitude.