Community Forums Archive

Go Back

Subject:Can this be automated?
Posted by: mitchb2
Date:12/28/2006 8:31:34 AM

I'm using the Smooth/Enhance function alot. Is there a way that I can choose a selection, then with a single keystroke execute the Smooth function without a dialogue and "OK" click?

Subject:RE: Can this be automated?
Reply by: ForumAdmin
Date:12/28/2006 9:23:52 AM

Three options:

1) While selecting the menu option or toolbar button, hold down the Shift key to apply the last-used settings without bringing up the dialog.

2) Alt+P, Shift+O

3) Visit the scripting forum.

J.

Subject:RE: Can this be automated?
Reply by: rraud
Date:12/29/2006 10:29:49 AM

In addition you can use "Edit> Repeat" to repeat the previous process, so one would only need to highlite-select.
In my case, I have designated F8 as Edit>Repeat for single keystroke repetitve tasks. This will not work with "external" plug-ins however.
Cheers

Subject:RE: Can this be automated?
Reply by: Ghent
Date:2/9/2007 10:55:48 PM

I use several functions in a row repeatedly. So I wrote a simple script to run them one after the other in order.

Here is a script that I run. It saves me a TON of time. Because I work with hour long sound files, it take a long time to wait for each process to finish so I can start the next one. With the script I simple create a "preset" with all the settings I want and then refer to them in the script. After this script has run all my processes it saves the file as WMA and MP3. All this is automated. I even made a button on the tool bar that runs my script. Now I have more time to eat donuts. Sound Forge 8 Scripting is great!
This is a VBScript, the preset I use is called "Sermon Script"

Imports System
Imports System.IO
Imports System.Windows.Forms
Imports SoundForge

Public Class EntryPoint
Public Function Begin(ByVal App As IScriptableApp)
'Begin here
' This makes it so I can type FileRef instead of App.CurrentFile all the time.
' It also allows me to work with multiple files by making sure I always have the right one.
Dim FileRef As ISfFileHost : FileRef = App.CurrentFile
Dim FileName As String ' This will hold what the new file will be called.

' Addes the word "Processed" to the file name
FileName = FileRef.Filename.Remove(FileRef.Filename.Length - 4, 4) & "Processed"
' Checks to see if the file is Mono or Stereo
If Decimal.OP_Implicit(FileRef.Channels) = 2
'If the file is Mono it will do these addition fuctions (Changes it to mono)
FileRef.DoEffect("Invert/Flip", "", SelFile2, EffectOptions.EffectOnly + EffectOptions.WaitForDoneOrCancel)
FileRef.DoEffect("Channel Converter", "Sermon Script", WholeFile, EffectOptions.EffectOnly + EffectOptions.WaitForDoneOrCancel)
End If

FileRef.DoEffect("Sony Graphic EQ", "Sermon Script", WholeFile, EffectOptions.EffectOnly + EffectOptions.WaitForDoneOrCancel)
FileRef.DoEffect("Sony Noise Gate", "Sermon Script", WholeFile, EffectOptions.EffectOnly + EffectOptions.WaitForDoneOrCancel)
FileRef.DoEffect("Normalize", "Sermon Script", WholeFile, EffectOptions.EffectOnly + EffectOptions.WaitForDoneOrCancel)
FileRef.RenderAs(FileName & ".wma", ".wma", "Sermon Script", WholeFile, RenderOptions.RenderOnly + RenderOptions.WaitForDoneOrCancel)
FileRef.RenderAs(FileName & ".mp3", ".mp3", "Sermon Script", WholeFile, RenderOptions.RenderOnly + RenderOptions.WaitForDoneOrCancel)
End Function


Function FromSoundForge(ByVal App As IScriptableApp)
ForgeApp = App
App.SetStatusText(String.Format("Script '{0}' is running.", Script.Name))
Begin(App)
App.SetStatusText(String.Format("Script '{0}' is done.", Script.Name))
End Function

Public ForgeApp As IScriptableApp

Public Function DPF(ByVal sz)
ForgeApp.OutputText(sz)
End Function

Public Function DPF(ByVal sz, ByVal o)
ForgeApp.OutputText(System.String.Format(sz, o))
End Function

Public Function DPF(ByVal sz, ByVal o, ByVal o2)
ForgeApp.OutputText(System.String.Format(sz, o, o2))
End Function

Public Function DPF(ByVal sz, ByVal o, ByVal o2, ByVal o3)
ForgeApp.OutputText(System.String.Format(sz, o, o2, o3))
End Function

End Class 'EntryPoint

Go Back