Musics

From Open Surge Engine Wiki
Revision as of 22:51, 25 February 2012 by Alexandre (Talk | contribs) (Music)

Jump to: navigation, search

Music

Music in Open Surge is stored in the musics directory. The common format used is ogg/vorbis (.ogg). To use this music ingame you can:

  • Change the 'music' line in your level file to read the music you wish to use.
  • Create an object that plays music.

See also: Level specification

Music in Objects

Currently, the following commands are supported for music playback using objects:

  • play_music music_name [loops] : This allows you to play a music, and specify how many times it should loop. NOTE:After calling this command change state, or you will discover some odd effects.
  • play_level_music : Clears any music called by objects, and restores the music specified in the .lev file.
  • set_music_volume : Changes the volume level of any music currently playing.

See also: API Reference

Suggested specifications

You are not required to follow these, but they are kept here as a reference.

  • Use .ogg format; bitrate: 56 kbps.
  • Musics below 1 MB!
  • The audio reproduction is limited to 10 channels of audio (stereo), and the chips are a Yamaha YM2612 (FM) and a SN76489 (PSG). They can be faithfully emulated by any hardware or software, including virtual instruments (VST) and audio trackers. (This specification is optional)
  • Is preferable music in loop or equivalent.