Press "Enter" to skip to content

Sound

Examples of sound formats

In your story, you can use a number of sound formats (sound effects and music). However, the most frequently used formats are the following:

  • Mp3 (.mp3) – type: audio/mpeg
  • OGG (.ogg) – type: audio/ogg
  • Wave (.wav) – type: audio/wav

It is best to convert sound into the mp3 format in order to get a small file (the sound is uploaded faster) and to make sure that it will work in any Internet browser.

Sound effects

Using the <audio> tag (of HTML), you can put a selected sound into a particular fragment of the story (a particular slip).

Syntax – autoplay

<audio autoplay>
    <source src="link.mp3" type="audio/mpeg">
    Oops! Your browser does not support this audio element.
</audio>

Autoplay loop (indefinite autoplay):

<audio autoplay loop>
    <source src="link.mp3" type="audio/mpeg">
    Oops! Your browser does not support this audio element.
</audio>

The autoplay attribute starts replaying the sound as soon as the particular fragment of the story (slip) is accessed – the sound source is not visible in this case.

The loop attribute makes the sound be replayed indefinitely.

Syntax – virtual audio controls

<audio controls>
    <source src="link.mp3" type="audio/mpeg">
    Oops! Your browser does not support this audio element.
</audio>

The controls attribute provides visual audio controls in the place where the sound has been added to the fragment of the story (the slip). The sound is not played automatically – you need to click on a particular button.

Text: You hesitantly come over to a big table and you notice a tablet. You take a closer look and you also notice avideo player on the tablet screen. -Hmm, let`s see what we`ve got here. It is possible to play the sound using a special button.

Background music

Using the Java Script (JS) language, you can obtain the effect of background music. Even when players move from one fragment of the story to another (clicking on the links), the music will be replayed automatically in an indefinite loop.

var music = document.createElement("audio");
music.src = "link.mp3";
music.loop = true;
music.play();
Option: "Your project" - "Edit Story JavaScript"

Sound database

In your project, you can use the following sound effects and music:

Music

Source

Sound effects

Source

License

Please, remember that there are copyrights which protect all intellectual property. Therefore, you should use your own materials or materials created by authors who have agreed to share their works, for example, based on the Creative Commons license. It is good practice to provide a list with sources of the sounds you have used in your project and to add a slip with special thanks to the authors.

More materials

Font Resize
Contrast