The NGLE Manual
Audio Engine
and Flipeffects for Audio Playback
By Titak
New Audio Engine
The TRNG now includes an
audio engine and flipeffect triggers for audio playback.
This new audio engine allows you to use different formats
for audio files. Supported audio formats are:
- AIFF
- MP1
- MP2
- MP3
- OGG
- WAV
The standard syntax for enabling the audio engine of your
choice is:
Syntax: Customize=CUST_NEW_SOUND_ENGINE, NewSoundEngine
flags (NSE_...), SoundExtension (SEXT_...), LongFadeOut,
ShortFadeOut
The basic script entries for enabling the different formats
are:
Customize= CUST_NEW_SOUND_ENGINE, ignore, SEXT_WAV, ignore,
ignore
Customize= CUST_NEW_SOUND_ENGINE, ignore, SEXT_OGG, ignore,
ignore
Customize= CUST_NEW_SOUND_ENGINE, ignore, SEXT_MP1, ignore,
ignore
Customize= CUST_NEW_SOUND_ENGINE, ignore, SEXT_MP2, ignore,
ignore
Customize= CUST_NEW_SOUND_ENGINE, ignore, SEXT_MP3, ignore,
ignore
Customize= CUST_NEW_SOUND_ENGINE, ignore, SEXT_AIFF, ignore,
ignore
You
can paste one of these commands in the [Title] area of the
script so it will be used in ALL levels or you can put one
of the commands in the [Level] areas of your script. So
basically you can use, for example, WAV in your 1st level,
OGG in your 2nd level and MP3 in you 3rd level! You can also
play around with the NewSoundEngine flags, LongFadeOut and
ShortFadeOut fields, to customize the sound engine more.
New Flipeffects for Audio Playback
Instead of using the regular CD-trigger you can also create
flipeffect triggers for audio playback.
Included audio-flipeffect-triggers can be seen in the below
screenshot:

In this tutorial I’m am going to give
examples on how you can use the audio-flipeffects marked in
yellow above.
If you use the OGG format for your audio, two audio
tracks can be played at once: the background audio/ambience
(channel 1) and a foreground track (channel 2) which was
triggered.
Here are two examples of how you can setup flipeffect
triggers for playing two audio tracks at once.
EXAMPLE 1
107.ogg
- TRA mansion background audio track
- background track
- is enabled in the script of the level so it plays by
default when the level starts
001.ogg
- TR2 Venice audio track
- foreground music
- triggered by a small pushswitch
Since both audio tracks are music tracks you don’t want to
have them play at the same volume because it sounds bad. The
volume of the background track is automatically reduced a
bit when a new foreground track is triggered but in this
case it is still too loud. So the volume of the audio track
needs to be reduced a lot when the foreground track is
triggered and starts playing.
To accomplish this you need to place the following two
triggers on the same tile:
1. to trigger track 001.ogg to start playing.

2. to reduce the volume of track 107.ogg.

As you can see you don’t have to type in the
number of the background audio track. The engine knows
automatically which audio track is set as background track,
even when you have used a regular CD trigger to change
background audio.
In this example I have set the volume to 10 so the
background audio can still be heard, but barely. You can
also set it to 0, so it can’t be heard at all.
Okay, now I can hear you ask ‘Why not use a regular CD
trigger to trigger 001.ogg to play?’.
The answer is that you can do that too, no problem.
The reason I used the flipeffect trigger is because that way
the audio track can be triggered over and over again, as
many times as the player wants. Each time the player presses
the pushswitch, 001.ogg will start playing from the
beginning, even is it hasn’t finished playing yet. This is
not possible with the regular CD trigger.
Important:
the volume of the background track does not return to full
volume once the foreground track has finished playing
because it was reduced with a flipeffect trigger. To make it
return to full volume one would need to place another
flipeffect trigger for it, with volume set to 100.
EXAMPLE 2
107.ogg
- TRA mansion background audio track
- background track
- is enabled in the script of the level so it plays by
default when the level starts
016.ogg
- ‘chains rattling’ audio track
- foreground music
- triggered by a rollingball (heavy trigger)
Since this 016.ogg track is more like a sound effect it is
okay to keep the background track at full volume.
To accomplish this you need to place the following two
triggers on the same tile:
1. to trigger track 016.ogg to start playing.

2. to keep the full volume of track 107.ogg.

So now 107.ogg keeps playing at full volume
while 016.ogg plays at the same time, also at full volume.
This is much better than having the background audio stop
completely, for 2 reasons:
a. it simply sounds better to also have the
background audio still playing when a foreground track is
more like a sound effect.
b. no more silences in between.
EXAMPLE 3
Examples 1 and 2 speak of triggering an audiotrack that will
only play once, because the trigger was set to single
playback in the (E)tra box of the trigger window.
But if you have a closer look at this (E)tra box
you'll see you can also set it to looped playback.
This is a very interesting feature because by setting the
trigger to looped playback you can have as many
looped audio tracks as you want, instead of only the default
range from 098.wav to 111.wav.
With this looped playback setting it does not matter
what number the audio track has, it will repeat itself over
and over, until Lara steps on a new audio trigger.
Again, you can do this for background audio (channel 1) and
for foreground audio (channel 2).
channel 1
If you use the flipeffect for channel 1 audio, the newly
triggered audio will replace the current background audio,
just like it does when you trigger a new background audio
track with the CD-trigger. But with this flipeffect trigger
you can set whatever track you want to looping background,
even the 005 secret sound, as shown in the below screenshot!

channel 2
If you use the flipeffect for channel 2 audio, the newly
triggered audio will play while the background audio also
keeps playing.
You could use this, for example, with an ambience audio
track as background and then trigger a music track on
channel 2 in an area where Lara can hear a radio playing. Or
you could use it to add some extra atmospheric ambience in a
place where it becomes scarier, or where water is dripping
from the ceiling or where there are supposed to be more
birds or bugs flying around, or... (use you imagination!)
The trigger then needs to be set up like this:

Note 1:
Keep in mind that in this case you can also set a second
flipeffecttrigger to reduce/increase the volume of the
background audio (channel 1), as described in EXAMPLE 1 and
2.
Note 2:
Also keep in mind that you can't have two audiotracks
playing at the same time when you use WAV format. It works
for OGG format. (At least it didn't work for me when I used
WAV audio engine. I haven't tried the other formats yet).