ExtensionSound - gama-platform/gama GitHub Wiki
Extension: gama.extension.sound
The Sound extension provides a collection of statements that are associated with sound effects.
Starts a sound effect.
| Facet | Type | Description |
|---|---|---|
filename |
string |
Audio file (wav, mp3, ...). This path is relative to the path of the model (no facet name required) |
volume |
float |
Volume (0-1) |
repeat |
bool |
Should the sound be repeated or not? (default: false) |
mode |
identifier |
Mode: overwrite or ignore (default: overwrite) |
Example:
global {
start_sound "mysound.wav";
}
Plays a music file.
| Facet | Type | Description |
|---|---|---|
filename |
string |
Audio file (wav, mp3, ...) (no facet name required) |
volume |
float |
Volume (0-1) |
repeat |
bool |
Should the sound be repeated or not? (default: false) |
mode |
identifier |
Mode: overwrite or ignore (default: overwrite) |
Example:
global {
start_sound_music "mymusic.mp3" repeat:true;
}
Stops a sound effect.
| Facet | Type | Description |
|---|---|---|
filename |
string |
Name of the sound file to be stopped (no facet name required) |
Stops a music file.
No facets required.
Pauses a sound effect.
| Facet | Type | Description |
|---|---|---|
filename |
string |
Name of the sound file to be paused (no facet name required) |
Pauses a music file.
No facets required.
Resumes a paused sound effect.
| Facet | Type | Description |
|---|---|---|
filename |
string |
Name of the sound file to be resumed (no facet name required) |
Resumes a paused music file.
No facets required.
The extension provides a species that agents can be defined as if agents need to play sound effects.
Example:
species SoundEffect type: sound_player skills: [fipa] {
...
}
The extension provides a species that agents can be defined as if agents need to play musics.
Example:
species SoundMusic type: music_player {
...
}