Problem with SF Pro 15 build 161 and scripting

Unsounded wrote on 1/7/2022, 8:00 PM

I'm a long term user of Sound Forge and have some scripts set as buttons to quickly change volume. Here is an example:

using System;
using System.IO;
using System.Windows.Forms;
using SoundForge;public class EntryPoint {
public void Begin(IScriptableApp app) {   app.CurrentFile.DoEffect("Volume",
                            "1 dB Boost (112.20 %)",   // 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

After updating to build 161 all such scripts have stopped working. They still validate but when I run them, they do nothing. Currently, I'm back with build 64 so that my volume scripts will work. Does anyone know of an alternative volume altering script that works with build 161? Thanks. Incidentally, is there any additional documentation for working with scripts and SF15 beyond that in the help manual?

Comments

rraud wrote on 1/8/2022, 10:48 AM

You should contact Magix tech support by email infoservice@magix.net or officially request a Magix support ticket. Requesting support is a bit confusing, you may want to peruse the cheat sheet :
https://www.magix.info/us/forum/unable-to-record--1272206/#ca1661047.

You can also try contacting the Vegas scripting expert http://www.jetdv.com, who may have some kind of idea.

is there any additional documentation for working with scripts and SF15 beyond that in the help manual?

There was a separate SF scripting forum in the SCS days, You can take a look at the Sony Sound Forge Scripting forum archives

btw @Unsounded, welcome to the Magix Sound Forge users community and best wishes for 2022 .

xman_charl wrote on 1/8/2022, 11:26 AM

my header for scripts

 

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

 

 

rraud wrote on 1/8/2022, 1:05 PM

I can confirm the script does not work in SFP-15 (x64 and x86)
The script does work in SFP-14 and earlier Magix versions (and even SCS SFP-11).

Unsounded wrote on 1/8/2022, 5:44 PM

Thanks for the warm welcome and the replies. The header posted by xman_charl works with my scripts using build 64. I'd be grateful if someone could confirm that it works with build 161. The whole script now looks like this:

using System;
using System.IO;
using System.Windows.Forms;
using SoundForge;
using System.Collections;
using System.Collections.Generic;public class EntryPoint {
public void Begin(IScriptableApp app) {   app.CurrentFile.DoEffect("Volume",
                            "1 dB Boost (112.20 %)",   // 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

I'd like to use the latest build but not at the cost of losing basic functionality I've had for years. Thanks again.

rraud wrote on 1/9/2022, 12:13 PM

Hi @Unsounded, sorry to say, the latest script does not work on my PC in SFP-15, Bld 161. (x64 and x86) It does work as before in SFP-12 through 14.
.. However.. to add to the confusion,. the amplitude is reduced 21dB SFP-11 and about 8dB in SFP-10. The previous script was the same in all.