Community Forums Archive

Go Back

Subject:Need help to create a tiny script
Date:8/29/2012 3:57:32 PM

I need to create a button or a shortcut to make this happen: Tools->Find->End of Silent Region->OK. The command seems so common, at least I have to use it dozens of times per day, it seems there would be an alt f6 or something (obviously I'm making that up) but some keyboard shortcut, or even better, a way to place a button that would accomplish the whole thing.

Or, maybe someone is about to tell me that for all these years, all I've had to do is go to this special place and create my own shortcuts, I just never found it in the owner's manual. That would be cool.

Anyway, whether I'm asking an intelligent question or not, I'd sure appreciate someone's guidance. I am teachable. I asked this question in the SF forum and someone helpfully sent me here.

Thank you.

Message last edited on8/29/2012 3:58:09 PM bytheloniouscoltrane.
Subject:RE: Need help to create a tiny script
Reply by: AnotherSoundGuy
Date:8/31/2012 11:18:06 AM

Greetings theloniouscoltrane,

It seems like something based on the following ISfFileHost method would work…


FindAudioAbove --- Find the position within the SfAudioSelection where the audio is above the threshold
level.

long FindAudioAbove(
SfAudioSelection asel,
double dThreshold,
bool fAfterSilence
)

Parameters

asel --- The selection to search in. Use SfAudioSelection.all to search the whole file.

dThreshold --- Specifies a value between 0.0 and 1.0 that the audio must exceed in order to stop
the search.

fAfterSilence --- If true, matches are ignored unless they are preceded by at least 60 milliseconds
of audio below the threshold level.

Return Value --- The position of the first sample that exceeds the threshold level.


Does the above threshold criteria work for you? Or, do you need some minimum length above some specified RMS average value? Please elaborate.

Regards,
David

Message last edited on8/31/2012 11:21:39 AM byAnotherSoundGuy.

Go Back