-
Notifications
You must be signed in to change notification settings - Fork 10
MIDI playback
MIDI files are different from other sound formats, because they do not have actual sounds encoded, but describe the track using instruments and notes. In order to play a MIDI track the engine must have a full knowledge of how to interpret these instruments, how to convert the instrument's note into the real sound. This knowledge is got from what is known as "sound banks", or "patch files".
Prior to AGS 3.6.0 the Windows version of the engine would use the system interface to play MIDI file, that's why the games did not require to contain any sound banks: they would use the ones installed in the system. Other systems (Linux, and so forth), however, required user to install such banks by hand before they are able to hear the MIDI music in games.
Since AGS 3.6.0, for technical reasons, the engine no longer supports using the Windows interface, so even on Windows you require to have the MIDI banks installed if you want to hear MIDI music from AGS games. Please continue the read to know how it can be done.
For playing MIDI files AGS engine uses a software synthesizer known as TiMidity++ (or simply "Timidity"). Timidity transcribes MIDI using Gravis Ultrasound (GUS) patch files. The synthesizer itself is built into the engine so you don't have to worry about that, but the patch files are not. To perform an actual MIDI engine needs a Timidity configuration and patch files present where it can find them.
There are numerous Timidity patch files that may be found on the internet, each has its own differences, and in theory one can even make their custom ones.
Following is an example of a good collection based on the id Software's Doom 1 and 2 games (tested with few older AGS games):
http://www.gamers.org/pub/idgames/music/dgguspat.zip
The primary file is called "timidity.cfg" and it should be present in the following path:
On Windows:
- C:\Timidity\Timidity.cfg
On Linux and MacOS
- etc/timidity.cfg
The patch files may be located in the same directory by default. If you prefer to place them elsewhere for organizational purposes, then you have to add a "dir" command inside timidity.cfg, right at the top of the file:
dir THE_PATH_TO_PATCH_FILES
for example:
dir C:\timidity\patches
dir etc/tim_patches
Getting Started in AGS
Editor
- New Game templates
- Editor Preferences
- General Settings
- Default Setup
- Colours Editor
- Room Editor
- Character Editor
- Cursor Editor
- Dialog Editor
- Font Preview
- GUI Editor
- Inventory Items Editor
- View Editor
- Sprite Manager
- Music and sound
- Voice speech
- Script Modules
- System limits
- Log Panel
- Plugins
- Other Features
Engine
Scripting
- Scripting Tutorial
- Scripting Language
-
Scripting API
- Script API Overview
- Standard Constants
- Standard Enumerated Types
- Standard Types
- Game variables
- Global arrays
- Global event handlers
- repeatedly_execute / repeatedly_execute_always
- Custom dialog options rendering
- Global functions: general
- Global functions: message display
- Global functions: multimedia actions
- Global functions: palette operations
- Global functions: room actions
- Global functions: screen effects
- Global functions: wait
- AudioChannel functions and properties
- AudioClip functions and properties
- Camera functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- Dictionary functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game functions and properties
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Object functions and properties
- Overlay functions and properties
- Parser functions
- Region functions and properties
- Room functions and properties
- Screen functions and properties
- Set functions and properties
- Speech functions and properties
- String functions
- System functions and properties
- TextWindowGUI functions and properties
- ViewFrame functions and properties
- Viewport functions and properties
- Obsolete Script API
- Event Types
- Key code table
- Audio in script
Legal Notice
Getting in touch
Misc
Hidden