[edit] About Audio[edit] Kinds of audioThere are two basic kinds auf audio in Widelands: music and sound effects. Music is split in three areas: the intro, which is played during the initial splash screen, music to be played in the full screen menus outside of a game and ingame music. Sound effects are more varied: basically anything that is visible can produce an fx at any time:
Workers and buildings can produce sounds synchronized to either their appearance (i.e. to a certain frame of their "animation") or their status (i.e. their "work program"). To find out where we could use the most help, look at Sound Effects. If you are into longer pieces, just compose a little symphony or two and tell us
[edit] Adding your own music[edit] A single piece
Example: widelands/sound/ingame_07.ogg widelands/sound/ingame_16.ogg
[edit] Several pieces in a directoryYou want to listen to your ogg collection in Widelands? You have written 150 songs and there are not enough numbers left? Just put your songs into a directory and follow those rules:
Example: widelands/music/ingame_12/myCD_song1.ogg widelands/music/ingame_12/myCD_song2.ogg widelands/music/ingame_12/myCD_song3.ogg widelands/music/ingame_13/sub/song-1.ogg widelands/music/ingame_13/sub/song-2.ogg widelands/music/ingame_13/sub/dir/song-n.ogg
[edit] Adding your own sound effects[edit] User interfaceAudio for the UI is tightly integrated with the code. Please contact the developers for information.
[edit] Effects synchronized to work programs1. Having more than one audio file for the same effect is encouraged!
3. In the [[global] section, register every sound effect you will be using with the directive "soundfx=NAME" Example: Files: In the conf file (note lines 2 and 5 of the work program): [[fish] In this special case, you might also have used sound synchronized to the animation in point 4. This should, however, only be done for animations that repeat over and over.
[edit] Effects synchronized to animationsThis is similar in nature to effects synchronized to work programs, just the config file is different. This time, you have to edit the section for the animation you are aiming for. All other rules mentioned before apply here, too. Use "sfx_name=NAME" to specifiy an effect name and "sfx_frame" for the frame number at which the effect should be triggered. Note that only the beginning is synchronized, you cannot depend on the effect ending at a certain time. Be careful to have the same number of "sfx_name" as of "sfx_frame", otherwise you will hear ... something potentially quite funny Example: wood_chop_00.ogg, wood_chop_01.ogg, wood_chop_02.ogg In the conf file:
[[global] # Cutting down a tree [[harvesting]
[edit] Internationalized sound effectsUnlike music, sound effects can be recorded for several languages. For example, you could use this to change the lumberjack's warning call from "TIMBEEEEER!" to "BAUM FÄÄLLLLT!" for German players. To use i18n-ed sound effects, just follow the usual naming scheme but append the locale to the filename/directory. barbarians/workers/lumberjack/timber_00.ogg barbarians/workers/lumberjack/timber_01.ogg barbarians/workers/lumberjack/timber_02/ barbarians/workers/lumberjack/timber_02/1.ogg barbarians/workers/lumberjack/timber_02/n.ogg barbarians/workers/lumberjack/timber_00.ogg.de_DE barbarians/workers/lumberjack/timber_01.ogg.de_DE barbarians/workers/lumberjack/timber_02.de_DE/ barbarians/workers/lumberjack/timber_02.de_DE/1.ogg barbarians/workers/lumberjack/timber_02.de_DE/n.ogg For any given effect:
[edit] File formatAll music and all sound effects in Widelands are encoded as Ogg. Nominal and average bitrates typically range from 30 to 80 kbit/sec for sound effects, music should be encoded at or below about 150kbit/sec. Please use higher bitrates only if it is neccessary. Sound effects should be recorded in mono (stereo effects are applied in-game), music may be mono or stereo.
[edit] Conditions for sound effect playback(this is only a preview, the code is still under development) You will not hear your sound effect every time you expect it to be played! Having every effect play every time is not funny anymore when you have 50 buildings/workers playing a sound every 5 seconds Therefore, Widelands will implement a selection algorithm:
|
![[Main Page]](/modules/mediawiki/images/mediawiki.png)
About Audio
From Widelands.org
Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki modePrintable version | Disclaimers | Privacy policy
