Skip to main content

The "vngen_audio_modify" Function

Syntax#

vngen_audio_modify(id, pitch, volume, duration, [ease], [start, end, full]);
ArgumentTypeDescription
idreal/stringThe ID of the sound to modify (or keyword all for all sounds)
pitchrealThe pitch multiplier, where 1 is default
volumereal (0-1)The sound volume, where 1 is default and 0 is silent
durationrealSets the length of the modification transition, in seconds
[ease]integer/macroOptional: Sets the ease mode for the modification transition
[start]realOptional: Sets the starting point to clip the sound, in seconds
[end]realOptional: Sets the ending point to clip the sound, in seconds
[full]booleanOptional: Enables or disables playing from the current position before clipping
note

Clip arguments are a group. All three must be input together, or not at all.

Description#

Modifies a sound previously played with VNgen audio actions (except vox audio, which uses a separate function for modifications) with pitch, volume, and optional real-time clipping adjustments. As this script is itself an action, generally it is only practical to modify looped sound effects and music.

See Macros & Keywords for a list of available ease modes.

Example#

vngen_event() {
vngen_audio_modify("explode", 0.8, 1, 0.5, ease_sin_out);
vngen_audio_modify("music", 1, 0.75, 1, ease_sin_out, 10, 30, false);
}