Community Forums Archive

Go Back

Subject:Creating script for process-->volume
Posted by: Audiomigration
Date:8/17/2007 12:13:29 AM

Hi I'm wondering if there is a simple way to create a script that replaces the mouse clicking that needs to be done for the process of increasing or decreasing the volume level in soundforge (Process --> Volume)?

My goal is to have a keyboard shortcut for this.

Hope you can help me!

best regards
J B

Subject:RE: Creating script for process-->volume
Reply by: _TJ
Date:8/28/2007 12:15:20 PM

For the script to be simple, you need to be increasing/decreasing by a preset amount.

You need one copy of this script for each change that you want. Each copy
will use a different value for the volume preset name.

Save each copy of the script under a different name. Put all of the scripts
into the Script Menu folder, then you can bind each script to a different keystroke.

Save this as Volume_6db_Cut.cs

using System;
using System.IO;
using System.Windows.Forms;
using SoundForge;

public class EntryPoint {
public void Begin(IScriptableApp app) {

app.CurrentFile.DoEffect("Volume",
"6 dB Cut (50%)", // this must be the name of a Volume preset.
app.ActiveWindow.EditRegion,
EffectOptions.EffectOnly);
app.CurrentFile.WaitForDoneOrCancel();
}

public void FromSoundForge(IScriptableApp app) {
ForgeApp = app; //execution begins here
app.SetStatusText(String.Format("Script '{0}' is running.", Script.Name));
Begin(app);
app.SetStatusText(String.Format("Script '{0}' is done.", Script.Name));
}
public static IScriptableApp ForgeApp = null;
} //EntryPoint


tj

Message last edited on8/28/2007 12:43:54 PM by_TJ.

Go Back