To ease compatibility with MIDI, intensity is a value between 0 and 127 inclusive.
When intensity changes, there is a === MIDI Track Allocation ===
There are 16 MIDI channels in a Standard MIDI file.
As intensity increases, the channel volume (CC7) is adjusted accordingly. /** For each increase in intensity, the respective MIDI channel changes by the following amount */ int audio::DeltaVolumePerIntensity[MAX_MIDI_CHANNELS] = {0, 0, 0, 0, 0, -1, -1, -1, -1, 0, -1, 1, 1, 1, 1, 1}; This excerpt, taken from audio.cpp shows that: MIDI Channels 1 to 5 inclusive do not change as intensity changes. These tracks are useful for bass, percussion or instruments that will be present irrespective of intensity level.MIDI Channels 6 - 9 and 11 decrease linearly with intensity. These tracks are at their loudest when intensity is the lowest, useful for periods of low intensity or calm moments.MIDI Channels 12 - 16 inclusive increase linearly with intensity. These tracks are at their loudest when intenisty is the highest, such as when the player is critically injured MIDI Channel 10 is the percussion channel which does not change with intensity. == MIDI Track Design ==It is up to the composer to decide on which musical theme the track should take. Tracks should be loopable, without abrupt changes when transitioning back to the start of the track. Expression or CC11 should be used to control the track dynamics not Volume/CC7 as it will be overridden by the MIDI engine.Channels should always initialise all Program Change (PC) and CC's to ensure it is not affected by the last played track. Bear in mind the MIDI device that you are using to render the files. Most Windows users will be using the no frills Microsoft Wavetable GS Synthesizer. This is GM1 and not GM2 compatible so the composer should keep this in consideration when using GM2 extensions. GM2 extensions can be used in anticipation that the MIDI engine will incorporate a GM2 compatible soundfont/synthesizer. Most of all, have fun writing music for this game. == Future Development == === Dynamic Algorithm ===The current dynamic volume changes are linearly and there are 5 tracks for each, static, decrease and increase per intensity change. More complicated tracks could change this allocation. === Intensity Parameters ===Intensity is currently only linked to the HP% of the lowest body part. This could be expanded to level/dungeon sections. Items equipped, monster vicinity, danger level etc. === Soundfonts ===The MIDI engine works off the hosts MIDI devices, this means that the MIDI files are rendered on the host's MIDI device and may not necessarily sound the same as the composers. A future development could embed a soundfont to enable a consistent experience.