Set-Up
I’m on a MacBook Pro 13" 2017 running Ventura 13.6.1 with BMT Pro 1.9.1. build 1057. I made a translator in BMT that takes a note on
input (middle C) and runs the following AppleScript as its output: do shell script "afplay path/to/soundfile.wav"
.
Problem
If I press middle C ten times in a row, really quickly, BMT will play soundfile.wav
ten times in a row, back to back, without overlap. So if soundfile.wav
is six minutes long, in that example, BMT will generate ten instances of soundfile.wav
that play back-to-back for one hour.
Preferred Goal
I’m able to press middle C to trigger multiple, overlapping instances of soundfile.wav
that can start and stop at different times, where the next instance can start (immediately when I press middle C) before the previous instance ends. The length of soundfile.wav
is known in advance (let’s say it’s two seconds).
Another Option
I’m able to press middle C to trigger one and only one instance of soundfile.wav
at a time such that BMT ignores me if I press middle C while soundfile.wav
is playing. The length of soundfile.wav
is known in advance (again, let’s say it’s two seconds).
The use of AppleScript isn’t essential. Triggering the sound file from a note on
message is what’s important. I’m grateful for whatever help anyone can give! Thanks!
–Brian