Running item after audio has played for a specific duration
Hello,
I'd like to run an item (a trigger) after my audio has played for a certain duration of time. I have a list of durations that I'm planning to include in my loop table that corresponds to the audio files, under a column called [vowel_onset_time]. Each audio file is unique, and so is each duration. For example, I'd like to run the trigger item 1500ms after the audio starts. Should I be changing something in the sequence's 'run if' or have an inline code before the trigger item specifying the delay?
If it helps, I'm planning to use the parallel_port_trigger plugin for the trigger item.
Comments
Hi @shaza
If you are using the sampler item to play your audio files, you can simply indicate 'sound' as the duration. The sampler will then wait until the sound has finished before moving to the next item (see the relevant documentation here: Sound // OpenSesame documentation). Alternatively, you can indicate 'vowel_onset_time' as the duration, as you indicated that this variable refers to the duration of the audio file; it should work in the same way.
Hope this helps!
Claire
Check out SigmundAI.eu for our OpenSesame AI assistant! 🤖