"Delaying" start of audio in Harlowe/HAL?

Twine Version: Harlowe 3

With as new as I am to Twine, I’m also even newer to the idea of adding audio to a game, so as a result this question might be kinda silly.

Is there a way in Harlowe (or Harlowe Audio Library, specifically) to not let an audio file play until a certain amount of time has gone by?

For context, I’m making a game kinda inspired by old Japanese adventure games/visual novels (think something closer to Radical Dreamers, Snatcher, or Bio-Monster Jesus), and I really like the thing a lot of them do with character dialogue where it plays like a small sound or series of notes to indicate which character is talking. I’m using the old ‘instant’ method of displaying the text in a ‘typewriter’ fashion, and I’m trying to see if there’s a way to play a little sound at the point where a certain character’s dialogue appears, by perhaps delaying the playing of the sound until enough time has passed that the character’s dialogue would start displaying (or something! I don’t know!)

Is something like that possible in HAL? I tried looking through the documentation a bit this morning but I couldn’t quite find an answer that lined up with what I need - that said, it’s entirely likely that the solution is looking me right in the face, wouldn’t be the first time!

Thanks!

Sounds like you just want a slight delay to occur before playing the sound.

The (live:) macro will achieve this. Many moons ago in another forum, this discussion occurred…
How to make a timer? - Twine Forum

You can check the Harlowe documentation here for the (live:) macro. Just nest the (live:) macro and the necessary (if:) conditions for playing the HAL audio file within a link or upon visiting a new passage… however you plan on displaying the dialog text.

Let us know if you need any other information.