You demonstrated how to calculate the length of the soundfile. now you can suppress any further start signal in this time frame with the help of the [spigot] object. If the Soundfile is 2 seconds it would be somewhat like this:
I want to play a wav file to the end without interruption.
Beware of fanning outlets like this, this is a recipe for error.
If two connections are made from the same object, they will be executed in the order they were created. Since you don't see this any more they become ambiguous. Please always use the [trigger]
object to make the execution order explicit. In your patch this issue is there 3 times. After the numberbox 0, after the [i]
(better use an [f]
actually) , and lastly after the [/ 44]
(did you mean to write [/ 44.1]
there?).
I am now looking like the attached photo based on what you have told me. If I disconnect [route 1 0] and the second connection [playAudioFile~] the wav file plays to the end but loops forever, if I disconnect the second connection no other sounds are played for 7 seconds but the wav file only plays for as long as the threshold is exceeded.
You might want to simplify the soundfile playback abstraction until you understand how it works. Simplest object to play back a soundfile is [readsf~]. If that works you can rebuild it, so that the samples are preloaded to memory (in an array) and then play it back with [tabplay~].
if i understand correctly, you're now blocking any incoming triggers for as long as the file is playing.
but you need to stop the file from playing once it's done, correct?
so from the delay output, i think you don't only want to re-open the spigot for future triggers (correct time elapsed),
you also want to stop the Audio file playback to prevent the looping first.
so from delay, add trigger object which first bangs the middle playAudioFile input to stop playback, and then bangs the 1 on the spigot like before.
quwrof I'm trying it out on the C++ side now.
why?
giuliomoro
This is because, after considering versatile hardware, microcontrollers that run on c++ are also candidates for use.
giuliomoro
Thank you for teaching me. This patch is my goal. I could not have accomplished without you.