User talk:ECMusic/sandbox

Implementation of Game Music
Implementation refers to the process by which a composer inserts their music into a video game environment. This can include either the broad concept: which technique of scoring is used to most effectively enhance the playing experience, (by way of horizontal resequencing or vertical remixing ) or the more focused concept: what input methods the Middleware is programmed to react to and how. In his book, Writing Interactive Music for Video Games, Berklee College of Music professor and lead program developer Michael Sweet, delves into the common industry usages of these concepts.

(Sweet. 145): "A crossfading score is a type of horizontal resequencing model that fades out one musical cue while fading up another musical cue"

(Sweet. 147): "A transitional score is the same as a crossfading score but uses a transitional cue that bridges the two pieces of music"

(Sweet. 149): "A branching score waits for the first music cue to finish before the current musical phrase before moving on to the next music cue"

Horizontal resequencing is commonly implemented when the music has reached a decision point, and it can either repeat or move on to a new section of music, depending on the player's actions. Within the category of horizontal resequencing fall the more narrow sub-categories of crossfading scores, transitional scores, and branching scores. One of the draw-backs to crossfading and transitional scores is that they do not provide a very musically fluid transition: they effectively cut off the first piece of music at whatever point the player makes a decision. This is very effective for fast changes in the game, but there is no guarantee that the music will transition on the downbeat of a measure. Branching scores on the other hand, are very musically fluid, but they don't necessarily allow for an immediate transition. For example, in a game situation, if a player wins a level, the entire musical phrase must play its course before ending, which does not allow for fluid gameplay (the player might think they haven't won yet because the music continues past the supposed victory).

"Vertical remixing is an interactive composition technique in which layers of music are added or taken away to create levels of intensity and emotion ." This technique is found most commonly in games that change state very rapidly (specifically combat games such as Red Dead Redemption (2010) and Mass Effect (2010). As an example, a composer may write a very simple texture for the first layer of music, a more melodically and harmonically interesting second layer, and a percussive third layer.  The composer can then decide which input methods will activate each layer (maybe multiple enemies within a close vicinity will trigger the second layer, and low health could trigger the percussive third layer, in this example).  Vertical remixing allows for very musical changes that can line up instantaneously with the actions of the player.  One draw-back for this scoring technique however, is the fact the multiple cues have to be running in a single level, which may be taxing on CPU depending upon the gaming console. Because of this, it is common practice to use around three layers of music per level or sequence.

The reactivity of horizontal resequencing and vertical remixing in a game environment could not be executed as quickly or as easily without the development of middleware. Middleware such as FMOD and WwISE allows music to be integrated into a game engine like Unity. Depending upon the complexity of the middleware, it's entirely possible (and is often optimized in games) to implement vertical remixing and horizontal resequencing simultaneously. "For instance, it's fairly easy to implement a score that has multiple layers that can fade in and out, then branch from the musical cue on the appropriate musical measure to the next cue "

The last interactive scoring technique Sweet brings up in his book, (which is far less common in the industry today) is the use of MIDI and MOD files in-game. In this method, MIDI instructions are sent to trigger pre-rendered audio. A strong advantage that this technique has over horizontal resequencing and vertical remixing, is its ability to vary tempo, notes, and instruments in real time. Its main disadvantage, being that the instrument audio quality is far inferior to that of a fully recorded score.