Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Using L's HTML sound macros in 2.0 Harlowe

Hi, I'm new here, just trying out 2.0 on Harlowe. I would like an ambient loop (from a .wav I'm hosting) to play after starting the game, ideally with a fade in (and later a fade out when the story's over). Searching for a solution led me to L's HTML 5 sound macros post, which seems perfect - I'm just unable to get it working in 2.0.

Anyone who could, slowly*, help me out?

*I have zero knowledge when it comes to macros, javascript and stuff. I just cut 'n' paste and cross my fingers. Thanks!


  • Leon's HTML5 sound macro was designed to be used with Twine 1 story formats.
    It makes a number of assumptions that are not correct in Harlowe, the major one being that the story format will allow the Authors to create/add new macros, which Harlowe currently does not allow.

    You will need to use a standard HTML <audio> tag to play sound, there are a number of posts on the forum covering this issue.
    here, here, here
  • Raw HTML has serious issues and I've found the sound macros extremely superior even with HTML5-compatible browsers. One big problem you'll find is that with raw html audio, sometimes switching to a new passage cuts the sound off, sometimes it doesn't. From what I've tested, it's completely random if it does or not. The sound macros solve this problem.

    So if you have heavy use of audio, my recommendation is to use SugarCube, which does accept the sound macros with a very tiny modification to get them working in it (which is searchable within these forums).
  • Thank you both for the quick reply, switching to SugarCube seems to be the way to go.
Sign In or Register to comment.