Community Forums Archive

Go Back

Subject:8d causing fade ins?
Posted by: D-Slam
Date:5/30/2006 8:23:27 AM

Hi -

I have some custom scripting that was working fine under 8b, but now causes ~2 second fades to be added somewhat mysteriously. Any ideas why this might be happening?

There are one or two places in my scripts where I had created a preset on the fly.(using your helpful script that spit out the preset's raw data-set)..could the format for these raw presets have changed between versions?

Is there any new documentation to help cope with these issues?

thanks


Subject:RE: 8d causing fade ins?
Reply by: _TJ
Date:5/31/2006 4:04:03 PM

Which plugins/effects are you using?

As for documentation, sorry no. We would be far more likely to worry about backward compatibility if we knew that it mattered. So please, tell use what effects you are making presets for. But we almost certainly never publish the interal structures of our effect presets for the exact same reason that you want them.

Because once we publish the raw structures, then we can't change them ever again.
It would be better all around for you to tell us what effects you are creating presets for, and we can try and supply a preset-maker for that effect like we did for Time Stretch, etc. That way your scripts would be clearer and we could still change the raw preset formats as we need.

tj



Subject:RE: 8d causing fade ins?
Reply by: D-Slam
Date:6/6/2006 2:18:05 PM

So if I have 8d installed, and I re-run your DumpPresetAsArray script, if there were changes to the preset formats, that would (in theory) spit out updated versions of the array data, correct? Then I could replace the old data with new data and my script would behave under 8d (maybe?) - Is that how you'd go about fixing things?

My script calls creates a Normalize preset on the fly from a data-set. And it also creates an Auto-Trim preset from data. Are you aware that either of those might have changed under 8d?

Or should I just send you my project?


Subject:RE: 8d causing fade ins?
Reply by: _TJ
Date:6/6/2006 4:53:14 PM

So if I have 8d installed, and I re-run your DumpPresetAsArray script, if there were changes to the preset formats, that would (in theory) spit out updated versions of the array data, correct? Then I could replace the old data with new data and my script would behave under 8d (maybe?) - Is that how you'd go about fixing things?

Yes that would work, have the user edit presets using the normal Sound Forge dialog boxes, then capture the resulting array and save it off for re-use later.

There was a bug in Normalize that caused us to add some fields to the normalize preset for 8.0d. I'm not aware of any changes for Auto-Trim, but I'm not usually the one what works on the plug-ins either.

If I understand what you are saying, the DumpPresetAsArray script isn't really the best way to work with Normalize and Auto-Trim presets, since we have formal methods for creating presets from scratch for those two plug-ins. DumpPresetAsArray is really for working with plug-ins for which their is no formal method for creating presets from scratch. Have a look at the Fields_Normalize class.

If you don't mind sharing your code, maybe that would clarify what is going on here.

Subject:RE: 8d causing fade ins?
Reply by: D-Slam
Date:6/7/2006 1:28:36 PM

Here's a snippet


//// NORMALIZE
ISfGenericEffect fx1 = app.FindEffect("[Sys] Maximize peak value");
byte[] normData = new byte[72] {
8,0,0,0,0,0,0,0,
0,0,0,0,0,0,240,63,
0,0,0,0,0,0,0,0,223,
30,36,128,147,8,119,
63,0,0,0,0,0,0,73,64,
0,0,0,0,0,0,73,64,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,240,191,
0,0,0,0,0,0,240,191,
};

// MAKE PRESET
ISfGenericPreset presetNorm = new SoundForge.SfGenericPreset("Test Preset", fx1, normData);

// get an object that will let us set fields in the preset.
Fields_Normalize fields2 = Fields_Normalize.FromPreset(presetNorm);

// SET VALUES FOR A FEW OF THE FIELDS
app.DoMenu("Edit.SelectAll", true);
fields2.UseLastScan = false;
fields2.ForceScanResult(-1.0, -1.0); // -1.0 triggers a rescan.
fields2.NormalizeTo = SfHelpers.dBToRatio(-2);

// UPDATE PRESET
fields2.ToPreset(presetNorm);

// USE THE PRESET
app.DoEffect("Normalize", presetNorm, EffectOptions.EffectOnly);


Subject:RE: 8d causing fade ins?
Reply by: D-Slam
Date:6/7/2006 1:33:16 PM

I think we went around on this several months ago and came up with this approach as I needed to rescan for each file in a batch of thousands.

Subject:RE: 8d causing fade ins?
Reply by: _TJ
Date:6/7/2006 3:36:50 PM

So, yeah. your easy fix is just to update the byte array. If that doesn't fix it, then the problem is probably something other than the normalize preset.

tj

Go Back