From 5a11104bdf92ee0ac6eaa45a68a8ad56deeaa09c Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 20 Oct 2014 13:45:16 -0700 Subject: [PATCH] Updated script --- examples/audioReverbOff.js | 12 ----------- examples/audioReverbOn.js | 43 ++++++++++++++++++++++---------------- 2 files changed, 25 insertions(+), 30 deletions(-) delete mode 100644 examples/audioReverbOff.js diff --git a/examples/audioReverbOff.js b/examples/audioReverbOff.js deleted file mode 100644 index 1076a825a7..0000000000 --- a/examples/audioReverbOff.js +++ /dev/null @@ -1,12 +0,0 @@ -// -// audioReverbOff.js -// examples -// -// Copyright 2014 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// -// -AudioDevice.setReverb(false); -print("Reberb is now off."); diff --git a/examples/audioReverbOn.js b/examples/audioReverbOn.js index 6d43c31943..479f5bba74 100644 --- a/examples/audioReverbOn.js +++ b/examples/audioReverbOn.js @@ -8,25 +8,32 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // http://wiki.audacityteam.org/wiki/GVerb#Instant_reverb_settings -var audioOptions = new AudioEffectOptions(); - -// Square Meters -audioOptions.maxRoomSize = 50; -audioOptions.roomSize = 50; - -// Seconds -audioOptions.reverbTime = 4; - -// Between 0 - 1 -audioOptions.damping = 0.50; -audioOptions.inputBandwidth = 0.75; - -// dB -audioOptions.earlyLevel = -22; -audioOptions.tailLevel = -28; -audioOptions.dryLevel = 0; -audioOptions.wetLevel = 6; +var audioOptions = new AudioEffectOptions({ + // Square Meters + maxRoomSize: 50, + roomSize: 50, + + // Seconds + reverbTime: 4, + + // Between 0 - 1 + damping: 0.50, + inputBandwidth: 0.75, + + // dB + earlyLevel: -22, + tailLevel: -28, + dryLevel: 0, + wetLevel: 6 +}); AudioDevice.setReverbOptions(audioOptions); AudioDevice.setReverb(true); print("Reverb is now on with the updated options."); + +function scriptEnding() { + AudioDevice.setReverb(false); + print("Reberb is now off."); +} + +Script.scriptEnding.connect(scriptEnding); \ No newline at end of file