Monogatari Documentation
HomepageGitHubDiscordTwitter
v1.3.0
v1.3.0
  • Getting Started
  • Configuration
    • Internationalization
    • Saving
    • Skip Main Menu
  • Design
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Port
    • Ren'py
  • Release
    • Chrome App
    • Desktop
    • Mobile
    • Web
  • Script
    • Audio
    • Characters
    • Choices
    • Images
    • Input
    • JavaScript
    • Labels
    • Messages
    • Notifications
    • Particles
    • Scenes
    • Split Files
    • Storage
    • Text
    • Vibration
    • Video
Powered by GitBook
On this page

Was this helpful?

  1. Script

Audio

PreviousWebNextCharacters

Last updated 6 years ago

Was this helpful?

Everyone enjoys music while playing, and special effects and of course, voices.

The "Play" command is the way of doing it. You can declare them so they'll have an identifier, if you prefer using the file's name that's ok, just remember that either case they must be in the corresponding directory (music, voice or sound) inside the audio directory.

To view the supported formats, you can take a look at .

Declarations:

var music = {
    "Theme": "song.mp3"
}
var voice = {
    "F1": "f1.mp3"
}
var sound = {
    "Rain": "rain.mp3"
}

Music

Playing music:

With declaration:

"play music Theme loop" // If loop isn't there, it will only play once.

Without declaration:

"play music song.mp3 loop"

You can stop or pause music:

"stop music"
"pause music"

Voice

"play voice f1"

Sound

With declaration:

"play sound Rain loop" // If loop isn't there, it will only play once.

Without declaration:

"play sound rain.mp3 loop"

You can also stop a sound with the "stop command.

"stop sound"
this page