Detect audio restart in loop

Hello, I have an audio file in playing in a loop. I am trying to restart a Trigger when the audio restarts. I tried to look into Info CHOP fraction and set the Trigger Pulse to “op(‘audio_progress’)[‘fraction’] == 0.0“ but it never happens. What is the proper way to get notified when the audio restarts?

Hi,

Perhaps I’m misunderstanding but using the fraction channel from an info chop attached to the audio file works for me.

audioLoopTrigger.toe (10.6 KB)

Hello, the problem is when there is a sustain it never resets. Here is your updated example. The audio should repeat Avery 8 seconds and the ADSR total length is 4 seconds. Its stays stuck at 1

audioLoopTrigger.toe (9.8 KB)

That does seem odd to me as well.

If I set the “Multi Trigger” parameter to “Restart Envelope” it seems to behave as expected. Based on the docs it seems like it ought to release once the input drops below the release threshold but setting a separate release threshold and leaving Multi Trigger setting at it’s default Ignore setting doesn’t produce the desired behavior.

Using the Multi Trigger restart setting lets you get the behavior that I think you want.

I think there may be a bug, or I’m just not understanding the docs properly.

Hi @pierreg and @flowb

this looks like it works as expected. With the sustain set to 1, and the release length set to 0.3 seconds, it probably does reset but also gets triggered right away again, hence it never manages to go down to 0 (for which it would take 0.3 seconds) before hitting the Peak level again.
If you decrease the sustain value slightly, you can see it properly retriggering.

cheers
Markus

I suggest using the index channel and placing it as an index into a lookup CHOP. Your lookup table could be a pulse CHOP with a single sample at the last index point. You’ll then get a reliable pulse every time your audio file reaches the end which you can use to trigger the trigger CHOP.

trigger CHOPs usually expect “pulsed values” rather than ramps .

triggerOnLoopEnd.1.toe (6.2 KB)