Sound in MegaZeux

From MZXWiki
Revision as of 01:28, 18 February 2011 by Old-Sckool (talk | contribs)
Jump to navigation Jump to search

Major Supported Formats

Adding Music

The simplest way to add music to a game is through the world editor. The Alt+N editor command allows you to set the default music for a particular board. The default music will loop for as long as the player remains on the board. If two or more boards share the same song, and the game swaps between them, MegaZeux will not reload the song. You can also use Shift+8 or the Numpad * to set the board's default music to a wildcard, which essentially tells MegaZeux to continue playing the current music (if any).

The other way to add music to a game is through Robotic. The MOD "file" command set's the current board's music to the chosen file. You can also set the board's default music to a wildcard by using MOD "*", which does exactly what it does while in edit mode.

There are also a number of commands that can be used to control the volume of the board music. VOLUME # allows you to directly set the volume of the playing song, from 0 (silent) to 255. MOD FADE # # allows you to fade the volume to a given value within a given number of cycles. Lastly, instead of calling MOD "file" (which plays the sound file at the default volume) you can dynamically fade songs in and out with MOD FADE IN "file" and MOD FADE OUT. You can figure out when MOD FADE OUT has finished fading out the current board music with WAIT MOD FADE, which forces the robot to wait until MOD FADE OUT completes.



END MOD

I honestly don't know what use there is to MOD SAM # #.