Contents of this document:
1. ModMusicManager Documentation
------------------------


COPY THIS FILE IF YOU WANT TO USE ANY OF THE SOFTWARE EXPLAINED IN THIS FILE. IT WILL HELP
OTHERS UNDERSTAND WHAT THE SOFTWARE DOES AND THAT THEY CAN TOO COPY IT FOR MODDING PURPOSES.


ModMusicManager Documentation
------------------------

The Mod Music Manager is a component to organise custom music across various mods.

How to set up:
1. Copy "scripts/components/modmusicmanager.lua" and paste in your mod
2. Copy the code given at the beginning of the file and paste it in the respective files

How to use:
1. Add your music like so:
	GetModMusicManager():AddTrack(soundpath, priority, cooldown_init, cooldown_rep)
		whereas "soundpath" is a string and the event path for the FMOD sound event,
		"priority" is a number and the importance of the track (higher = more important),
		"cooldown_init" is a number and the time before fading out after starting (If
			no time is given, the track will play for ever),
		"cooldown_rep" is a number and the minimum time before fading out after refreshing (If
			no time is given, "cooldown_init" is used);
		return value: the track table
	
2. Play your music like so:
	GetModMusicManager():StartTrack(id)
		whereas "id" is either the numeric key of the track in the "tracks" table or the
			track table itself (as returned by "AddTrack" and "GetTrack")
	
3. (If desired) Set volume like so:
	GetModMusicManager():SetVolume(id, value)
		whereas "id" is either the numeric key of the track in the "tracks" table or the
			track table itself (as returned by "AddTrack" and "GetTrack"),
		"value" is a numeric value from 0 to 1, representing the percentual volume;
	
4. (If desired) Set parameters like so:
	GetModMusicManager():SetParameter(id, key, value)
		whereas "id" is either the numeric key of the track in the "tracks" table or the
			track table itself (as returned by "AddTrack" and "GetTrack"),
		"key" is a string and the name of the parameter in question,
		"value" is the value as usual;
	
5. (If fade-out time is given) Continue playing your music like so:
	GetModMusicManager():ContinueTrack(id)
		whereas "id" is either the numeric key of the track in the "tracks" table or the
			track table itself (as returned by "AddTrack" and "GetTrack")
	
6. Stop playing your music like so:
	GetModMusicManager():StopTrack(id)
		whereas "id" is either the numeric key of the track in the "tracks" table or the
			track table itself (as returned by "AddTrack" and "GetTrack")
	
Please note that calling the manager in modmain.lua usually requires the "GLOBAL." prefix.

Please do not edit the file without contacting the original author "Mobbstar". Report problems
to the original author to prevent outdated files from overriding the new one.
