Help with ambient sounds in Twine Chapbook

Twine Version: 2.2.1
Story Format: Chapbook

I’m having some issues getting sound to play correctly. From what I understand, I need to define all the sounds above a double hyphen. I have this in the start passage:

config.header.center: "Exercise 1"

sound.ambient.audio1.files: "audio1.mp3"


--

This is the introductory passage.

Click to go to [[passage1]].

My audio is in a folder called “files” in the same location as the HTML…

Screen Shot 2020-08-23 at 12.00.19 PM

I get this:

Am I trying to call the sound wrong? I’m looking at
https://klembot.github.io/chapbook/guide/multimedia/audio.html
I wasn’t quite sure if I can define all my audio in the first passage and call it later, or if I need to define it in the passage it’s used in every time?

Also it seems the restart link the footer crashes permanently and won’t let me restart sometimes. Even if I delete the html and publish to file again, it starts in the middle of the story and errors like this.

Screen Shot 2020-08-23 at 12.09.55 PM

My apologies for being a Twine noob, I’m sure I’m overlooking something minor.

I believe you need sound.ambient.myName.url rather than sound.ambient.myName.files?

1 Like

The documentation says:

sound.ambient.forest.url: 'forest.mp3'

I have
sound.ambient.audio1.files: "audio1.mp3"

Sorry if I’m not seeing the difference. (other than single/double quotes, but does that make a difference?)

Have you tried…

sound.ambient.audio1.url: 'files/audio1.mp3'
1 Like

The difference is that you have .files instead of .url.

1 Like

In the previous chapter before audio (about images) it said to replace “url” with the path to where the files are. Sorry if I’m misreading the directions.

Finally got it. The documentation was saying to replace “url” in the line with the path to the file, but it seems it’s actually done between the quotes. Thanks for the help!