Music Creation

From IvanWiki
Revision as of 04:27, 13 September 2016 by Orange (talk | contribs) (Created page with "__TOC__ == Introduction == === Welcome === Since version 0.50.7, IVAN has included a MIDI sequencing engine. This MIDI engine adds dynamic music to the IVAN game. This page...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

Welcome

Since version 0.50.7, IVAN has included a MIDI sequencing engine. This MIDI engine adds dynamic music to the IVAN game. This page does assume that you have an understanding about MIDI and MIDI files. If you need more information about MIDI, check out MIDI.org

Tools

A digital audio workstation (DAW) is generally used to compose MIDI files. Trackers are also a viable option.


MIDI Engine Dynamics

The design behind the MIDI engine is to aid immersion for the player, however the music is changed dynamically to suit the environment the player is experiencing.


MIDI Tracks for Playback

Each area data file eg. GloomyCaves.dat, will have an entry in the Level descriptor section.

   AudioPlayList = 
   {
     1,
     "Dungeon.mid";
   }

This shows that there is 1 MIDI file associated with this area and that the file to be played when in this area is Dungeon.mid. More tracks can be associated with the level and these can be appended to the list with the corresponding file count adjusted to suit.

The tracks are played back in a randomly selected order.

Intensity Parameter

The MIDI sequencing engine has one parameter, Intensity, from the game logic which is passed to the MIDI engine. This intensity can in turn be based off multiple game parameters, such as number of monsters in vicinity, player HP, items player is carrying etc.

Currently, intensity is linked to the percentage of HP of the player. The lower the player's HP, the higher the intensity.

To ease compatibility with MIDI, intensity is a value between 0 and 127 inclusive.

MIDI Track Allocation

There are 16 MIDI channels in a Standard MIDI file.

As intensity increases, the channel volume (CC7) is adjusted accordingly.