There are several methods of cross-fade.
Here, we will show you how to use envelope attack and release as fade-in and fade-out operations when playing back on a voice-by-voice basis.
A cross-fade allows for the seamless switching from one sound to another (often music).
The cross-fade is implemented by simultaneously controlling the volumes of both sound A and sound B.
When sound B is started while still playing back sound A, sound A fades out and sound B fades in.
A simple method to implement a cross-fade is to play back the sound normally,
and use the Category Cue Limit and the envelope parameters.
Using the Category allows us to cross-fade the sounds when they are part of the same Category.
Prepare a category "BGM" and enable the "Cue Limit."
Then, the sound automatically switches by simply playing back the Cue.
However, with only this, sound A will stop and sound B will start abruptly.
In order to implement the cross-fade, we set the attack and the release of the envelope for the waveform,
and a fade-in/fade-out effect is achieved.