Music: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Chibi (talk | contribs)
No edit summary
 
Fox (talk | contribs)
No edit summary
 
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
music <num> <x1> <x2> <3> <4> <5> <6> <7> <8> <etc>
'''music''' <volume> <level 1> [level 2] [level 3] [level 4] [level 5] ... [level [[MAXLEVELS]]]


Sets up music to be played during levels depending on how <num> is used, and how many levels there are.
Defines a list of music files to be designated as the background music for individual levels, in sequence for a single episode.


EXAMPLE:
==Syntax==


<num> - 0 (This will mean that only <x1> and <x2> apply, <x1> being the music for the title screen, and <x2> being the music for the end.)
<volume> is a number indicating which episode the list is for. Note that unlike '''all''' other uses of this number, such as [[VOLUME]] and [[volume_number]], counting actually starts at 1.
<num> - 1-4 (This really depends on how many episodes you have, you don't really need to put four 'playlists' if you dont have four episodes.)


<1-etc> - TEMP.mid (This is the music file to be played during whatever level number it applies to.)
<level ''X''> is a path to a music file for the game to play. Level entries do not need to continue all the way to MAXLEVELS.


EXAMPLE2:
The supported formats for music are MIDI, Ogg Vorbis, and FLAC.


music 1 E1M1.mid E1M2.mid E1M3.mid E1M4.mid
Example:


(To be played on episode 1, levels one thru four.)
// episode 1, levels one through four
'''''music''''' 1 E1M1.mid E1M2.ogg E1M3.flac E1M4.mid


See also [[definevolumename]], [[definelevelname]]
===Volume 0===


NOTE: Only supports MIDI as of yet..
A '''''music''''' entry with <volume> 0 is a special list of music files (maximum length: 8) with specific roles outside normal level music.
 
Example:
 
'''''music''''' 0 grabbag.mid briefing.mid
 
==Alternative==
 
Due to the one-shot nature of the '''''music''''' CON command it may be desirable to use the [[DEF Language#music|music def command]] if you want to avoid defining music for a level, or something potentially annoying like music for the loading screen.
 
== Hard-coded values ==
 
{{Music}}
 
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Sound manipulation]]

Latest revision as of 10:35, 22 February 2020

music <volume> <level 1> [level 2] [level 3] [level 4] [level 5] ... [level MAXLEVELS]

Defines a list of music files to be designated as the background music for individual levels, in sequence for a single episode.

Syntax

<volume> is a number indicating which episode the list is for. Note that unlike all other uses of this number, such as VOLUME and volume_number, counting actually starts at 1.

<level X> is a path to a music file for the game to play. Level entries do not need to continue all the way to MAXLEVELS.

The supported formats for music are MIDI, Ogg Vorbis, and FLAC.

Example:

// episode 1, levels one through four
music 1 E1M1.mid E1M2.ogg E1M3.flac E1M4.mid

Volume 0

A music entry with <volume> 0 is a special list of music files (maximum length: 8) with specific roles outside normal level music.

Example:

music 0 grabbag.mid briefing.mid

Alternative

Due to the one-shot nature of the music CON command it may be desirable to use the music def command if you want to avoid defining music for a level, or something potentially annoying like music for the loading screen.

Hard-coded values

The following values are used with music, starttrack, starttrackvar, music_level and other music manipulation commands.

These are the tracks defined with music using zero as the episode value. Entries four through eight are reserved by EDuke32 for future use.

Exposed Value Label Description
No 0 MUS_INTRO
No 1 MUS_BRIEFING
No 2 MUS_LOADING
Defines
define MUS_INTRO                        0
define MUS_BRIEFING                     1
define MUS_LOADING                      2