Development:Audio

From VsWiki
Revision as of 16:04, 24 November 2008 by Pyramid (talk | contribs)
Jump to: navigation, search

Introduction

This guidelines standardize the sound and music in order to achieve equal quality for different contributions throughout the game. This standards are applicable for:

  • music
  • voices
  • other sounds

Sound Requirements

The following quality settings apply:

  • 44kHz sample rate (the best that most microphones under $200 can produce, and more than enough if we use Chuck's concept of "tinny" intership communications)
  • Mono (we have 2 ears, but only one mouth)
  • Vorbis OGG format

Music Requirements

Music Engine

The soundserver (integrated in VS) handles playing songs, while the Vega Strike engine handles sequencing them using the defined playlists (which are selected according to the situation by dj_lib.py).

The soundserver uses SDL to play them, which supports .mp3, .ogg, .wav, I don't think it supports flac (perhaps on Windows), and it does support .mid (but I have the feeling it will get dropped, at least temporarily, during the soundsystem rewrite, as supporting midi with only OpenAL is simply impossible - we'll get something later, though, don't despair).

.m3u lists are just like winamp lists, which are a bunch of files, each on its own line (relative paths are computed against where soundserver.exe is, which is usually inside the bin folder - and usually you want to always say ../music/something ), and you can add comments (on their own line, I don't think it works on the same line) by starting the line with '#'.

Playlists are stored in the user-data folder (usually under ~/.vegastrike), inside their own folder hierarchy (~/.vegasrtike/playlists). Inside playlists, you may find additional grouping, by situation:

  • battle
  • peace
  • threat

Inside each, you'll find a playlist for each faction. Usually, the faction is selected according to the system owner at the time battle/threat/peace happens, though inside peace you'll have also around_sig and away, which get selected according to whether you are near a significant unit (base or planet - dockable) or not. That all gets configured in dj_lib.py, so if you add playlists, you have to add them to dj_lib.py as well - I doubt anyone will have to add playlists, though.

Inside playlists, you can (currently - until the extension commands get added) bias the frequency of some tracks by simply repeating them on the playlist. The engine will avoid playing the same track over and over, having a record of recently played tracks.

(information provided by klauss)

Music Engine Future Plans

Eventually, we'll add sequencing commands to playlists, disguised as special comments (probably '#!<command>') - that will allow us to specify a bayesian network for the tracks, with (potentially) custom transition - that means, each track can have a certain subset of tracks follow it, with a certain assigned probability. That's not that far in the future, it needs not wait for the rewrite, as it's doable as an enhancement to the current engine.

(information provided by klauss)