DaveInDev
Member
Hi,
I search in the doc, but I did not find the answer :
Is there a way to precisely chain audio assets ?
(more precisely than just testing audio_exists() in a step event, and trigger the next sound when the previous sound dies).
What I want to achieve is a 3 part sound simulating an ASR enveloppe :
I'd like to play a single (A)ttack sound , followed by a looped (S)ustained sound that could last any time, and then ended by a (R)elease sound.
As I said before, using audio_exists() in a step event leaves audible gap between sounds.
Another possibility is to use alarms to trigger the next sound just a little before the previous one dies ; but then there is also an audible overlapping giving a temporary increase of volume, as the end of one sound is quite the same as the beginning of the next one, it finally doubles the result....
Infact, the best solution would be to be able to travel in one single sound asset. Setting an inside loop in the form of two time points : the entrance and exit of the loop.
Like this :
So I tried to use audio_sound_set_track_position with an alarm to loop backwards regularly, but it also creates a sound glitch because the loop in an out points are not guarantied to be on a zero of the sound wave, giving a discontinuity in the resulting wave form...
Any idea on how to achieve this properly ?
PS: note that it's not only a question of volume or gain enveloppe : the starting sound can have a different "texture" than the looping sound and than the ending sound. But they chains nicely, continously.
I search in the doc, but I did not find the answer :
Is there a way to precisely chain audio assets ?
(more precisely than just testing audio_exists() in a step event, and trigger the next sound when the previous sound dies).
What I want to achieve is a 3 part sound simulating an ASR enveloppe :
I'd like to play a single (A)ttack sound , followed by a looped (S)ustained sound that could last any time, and then ended by a (R)elease sound.
As I said before, using audio_exists() in a step event leaves audible gap between sounds.
Another possibility is to use alarms to trigger the next sound just a little before the previous one dies ; but then there is also an audible overlapping giving a temporary increase of volume, as the end of one sound is quite the same as the beginning of the next one, it finally doubles the result....
Infact, the best solution would be to be able to travel in one single sound asset. Setting an inside loop in the form of two time points : the entrance and exit of the loop.
Like this :
So I tried to use audio_sound_set_track_position with an alarm to loop backwards regularly, but it also creates a sound glitch because the loop in an out points are not guarantied to be on a zero of the sound wave, giving a discontinuity in the resulting wave form...
Any idea on how to achieve this properly ?
PS: note that it's not only a question of volume or gain enveloppe : the starting sound can have a different "texture" than the looping sound and than the ending sound. But they chains nicely, continously.