Difference between revisions of "Music and SFX Guidelines"

(Add Art Portal navigation template to bottom)
(Overhauled and rewrote most of the page. It should now be up-to-date and more specific.)
Line 1: Line 1:
 +
'''All audio in SuperTuxKart should be in Ogg Vorbis format.'''
 +
 
== Music ==
 
== Music ==
  
Music should be in ogg/vorbis format (.ogg extension), support for mod files has been removed. Try to keep the music file size under 2 megabytes. We want most music to be light-hearted, but it is required that the music isn't 'aggressive' (we want to keep the game's ambient mostly happy). Also it's generally better if your song can loop smoothly (for track music)
+
Stylistically, music in SuperTuxKart should be cartoony and bouncy. While the game does have a positive and light-hearted mood, try to avoid making music that is too neutral and gentle - there is still space for a few intense or aggressive moments, as long as the cartoony vibe is maintained. For the most part, focus on melody and harmonic progression, rather than making music that is purely rhythm-based or is too ambient.
  
Also, please embed inside the file:
+
A good length is usually from 60 to 90 seconds, and music should loop smoothly. Music can either loop back to the beginning, or back to a point specified in its .music file (please see below). SuperTuxKart also supports playing different music files during the final laps of races. A 'final lap' variation of a track's music is just a faster version of its normal music.
*The song's name if you wanted to give it a name (not required thought), because the file names are bound to be changed.
 
*The name of the author(s). Please don't delete the name of anyone, just append yours if you made a significant modification that you want to be recognized for. This isn't required, just if the song's author desires to do so.
 
  
 +
The author's name (or authors' names) should be embedded in the .ogg file's metadata. If you make a significant modification to the file that you want to be recognised for, you can append your name, or add it to the comments field in the metadata. Other metadata, such as the song's name or the year, is optional.
  
=== The music file format ===
+
=== .music Files ===
  
If you want to test your music in game, modify the track.xml files in .../data, and add (or replace) the name of the .music file you want to play. Here is an example of .music file :
+
.music files tell SuperTuxKart how to play the music. These files must be placed in the same directory as the .ogg file. Here is an example of the contents of a .music file :
 
   
 
   
 
  <?xml version="1.0"?>
 
  <?xml version="1.0"?>
  <music title   = "Sky Vibe - High Frequency"
+
  <music title = "Sky Vibe - High Frequency"
        composer = "Speedsound"
+
    composer = "Speedsound"
        gain     = "0.5"
+
        gain = "0.5"
        file     = "SkyVibe-HighFrequency.ogg" />
+
        file = "SkyVibe-HighFrequency.ogg"/>
 
 
 
 
The entries for title, and composer are used to display the name of the track and the composer in the game. The ogg file is the actual music file. The gain parameter is a volumne adjustment (here 0.5, means half volume)
 
  
At startup, STK reads all .music files from
+
*'''title''' and '''composer''' are shown in-game when the race begins, if the music is to be played during a race.
* .../data/music
+
*'''gain''' controls the volume of the music. "1" is original volume, "0.5" is half volume, etc.
* .../data/tracks/*  (i.e. all track specific music)
+
*'''file''' is the name of the .ogg file containing the actual music.
* in all directories specified in the SUPERTUXKART_MUSIC_PATH environment variable, which is a ":" separated list. For example: SUPERTUXKART_MUSIC_PATH=/home/user1/ogg:/usr/share/ogg  (for windows user: using drive letters works as expected, e.g.: c:/myoggs:d:/moreoggs).
 
  
To test new music in STK just create a .music file (in the same directory as the .ogg file), add the tracks in which this music should be used, and  add the path to this directory to the SUPERTUXKART_MUSIC_PATH environment variable. To add the list of tracks, use a space separated list of track identifiers, e.g.:
+
Other optional parameters include:
<music title    = "Sky Vibe - High Frequency"
+
*'''loop-start''' tells the game where to return to in the audio file once the end is reached. It is measured in seconds, but can include decimals, making more accurate increments such as milliseconds possible. The game loops music from the start if this field is absent.
        tracks  = "farm olivermath"
+
*'''fast''' controls whether the music has a final lap variation or not, used during races. If fast = "true", the game either reads another .ogg file that contains the sped-up music (specified in the next field), or if this file is not found, it attempts to speed up the music itself by increasing playback speed (unfortunately, this does not sound ideal). If fast = "false", the music will not change for the final lap.
        ... />
+
*'''fast-filename''' is the name of the sped-up .ogg file if fast = true.
 +
*'''fast-loop-start''' is the same as loop-start, but for the final lap music.  
  
Just remember that music is picked randomly, so the new music might not be played every time.
+
At startup, SuperTuxKart reads all .music files from:
 +
*.../data/music
 +
*.../data/tracks/(track name)
 +
*All directories specified in the SUPERTUXKART_MUSIC_PATH environment variable, which is a ":" separated list. For example: SUPERTUXKART_MUSIC_PATH=/home/user1/ogg:/usr/share/ogg (For Windows users, using drive letters works as expected, e.g. c:/myoggs:d:/moreoggs)
  
== Sound effects ==
+
If you want to hear your music in-game during a race, you need to modify the track.xml file of the track you want to play. These can be found in .../data/tracks/(track name). Find the 'music' field and fill it in with the name of the new .music file. Then you can either add the new .ogg and .music files into .../data/music, or into the folder of the track you want to play.
  
The format should be .ogg. If they are positional they should be mono
+
== Sound Effects ==
  
Try to keep the sound effect file size under 30 kilobytes.
+
The game's sound effects should reflect its light-hearted and cartoony attitude. Positional sounds should be mixed down to mono.
  
 
{{ArtPortalNav}}
 
{{ArtPortalNav}}

Revision as of 02:09, 11 September 2016

All audio in SuperTuxKart should be in Ogg Vorbis format.

Music

Stylistically, music in SuperTuxKart should be cartoony and bouncy. While the game does have a positive and light-hearted mood, try to avoid making music that is too neutral and gentle - there is still space for a few intense or aggressive moments, as long as the cartoony vibe is maintained. For the most part, focus on melody and harmonic progression, rather than making music that is purely rhythm-based or is too ambient.

A good length is usually from 60 to 90 seconds, and music should loop smoothly. Music can either loop back to the beginning, or back to a point specified in its .music file (please see below). SuperTuxKart also supports playing different music files during the final laps of races. A 'final lap' variation of a track's music is just a faster version of its normal music.

The author's name (or authors' names) should be embedded in the .ogg file's metadata. If you make a significant modification to the file that you want to be recognised for, you can append your name, or add it to the comments field in the metadata. Other metadata, such as the song's name or the year, is optional.

.music Files

.music files tell SuperTuxKart how to play the music. These files must be placed in the same directory as the .ogg file. Here is an example of the contents of a .music file :

<?xml version="1.0"?>
<music title = "Sky Vibe - High Frequency"
    composer = "Speedsound"
        gain = "0.5"
        file = "SkyVibe-HighFrequency.ogg"/>
  • title and composer are shown in-game when the race begins, if the music is to be played during a race.
  • gain controls the volume of the music. "1" is original volume, "0.5" is half volume, etc.
  • file is the name of the .ogg file containing the actual music.

Other optional parameters include:

  • loop-start tells the game where to return to in the audio file once the end is reached. It is measured in seconds, but can include decimals, making more accurate increments such as milliseconds possible. The game loops music from the start if this field is absent.
  • fast controls whether the music has a final lap variation or not, used during races. If fast = "true", the game either reads another .ogg file that contains the sped-up music (specified in the next field), or if this file is not found, it attempts to speed up the music itself by increasing playback speed (unfortunately, this does not sound ideal). If fast = "false", the music will not change for the final lap.
  • fast-filename is the name of the sped-up .ogg file if fast = true.
  • fast-loop-start is the same as loop-start, but for the final lap music.

At startup, SuperTuxKart reads all .music files from:

  • .../data/music
  • .../data/tracks/(track name)
  • All directories specified in the SUPERTUXKART_MUSIC_PATH environment variable, which is a ":" separated list. For example: SUPERTUXKART_MUSIC_PATH=/home/user1/ogg:/usr/share/ogg (For Windows users, using drive letters works as expected, e.g. c:/myoggs:d:/moreoggs)

If you want to hear your music in-game during a race, you need to modify the track.xml file of the track you want to play. These can be found in .../data/tracks/(track name). Find the 'music' field and fill it in with the name of the new .music file. Then you can either add the new .ogg and .music files into .../data/music, or into the folder of the track you want to play.

Sound Effects

The game's sound effects should reflect its light-hearted and cartoony attitude. Positional sounds should be mixed down to mono.