Community Forums Archive

Go Back

Subject:Who can program a script for me?
Posted by: Olek321
Date:11/5/2008 3:01:38 AM

Hello, i ve been on this forum a few weeks ago through a friend r. weigelt. Meanwhile i bought sf and am allowed to post myself. The member sonyTJ has answered all of my questions, but i need someone, who can write that script for me.

Please get in contact through email with me. Please read text below, what it is about.

Thank you
Olek321

- - - - - - - - - - - - - start quote - - - - - - - - - - - - -

Hi!
I'm about to start a big digitalisation project and looking for a program able to do some tricky things for me. I'm not an official SoundForge user at the moment (only trial), but I would love to buy this program if it's capable doing the mentioned things. Roland Weigelt was so kind to post this for me

I have to handle a lot of WAV files in which i do mark multiple regions. These should later on be exported to single mp3s in a certain quality. Because of the big number of WAV files, the script should be able to do this in batch.

Maybe someone can help me on this. The Script should mainly be able to do the following steps

- Read a wav file with multiple regions
- Detect the name and the regions of the file
- Export the regions to single mp3s (chosable quality by dialog?)
- Naming of the new single mp3 files with the detected name_01, name_02, etc.
- Storing the new single mp3s to a specific location

Further questions .....
- Would it be possible to make this script batch-able ...dealing with many files in one go?
- I would love to use LAME as the encoder. Is it possible to get it into this process somehow?
- Is it possible to run a dithering over the whole file before?
- Would it be possible to write the new created names of a single mp3 to its ID-Tag?
- Would it be possible to create subfolders for mp3s belonging to one origin file?

I know this sounds a lot. I read a lot over the forum, and it looked to me as if a lot of the building blocks are there already .... but im not capable of programing or putting them together.

Regards
Markus Kopschitz

- - - - - - - - - - - - - end quote - - - - - - - - - - - - -

Reply | Report Abuse
Subject: RE: Exporting regions of a WAV to multiple MP
Reply by: SonyTJ
Date: 9/23/2008 9:10:14 PM

In answer to his question - yes. Sound Forge scripting can easily do (almost) all of these things.

- Read a wav file with multiple regions
ISfFileHost file = app.OpenFile(...);

- Detect the name and the regions of the file
// markers and regions are in the markers list.
SfAudioMarkerList regions = file.Markers;

- Export the regions to single mp3s (chosable quality by dialog?)
// save only the time range of the given region to a new file.
file.RenderAs(..., regions[ii], ...) ;

- Naming of the new single mp3 files with the detected name_01, name_02, etc.
Storing the new mp3s to a specific location
string szName = file.Title + "_" + region[ii].Name;
string szDir = @"c:\whatever\";
file.RenderAs(szDir + szName, ...);

- Would it be possible to make this script batch-able ...dealing with many files in one go?
Sure, just look at the sample scripts, GenericProcessAFolder.cs shows one way to do this.

- I would love to use LAME as the encoder. Is it possible to get it into this process somehow?
You can use LAME mp3 to write into MP3 into wave files, but you can't write raw mp3 files using LAME in Sound Forge. (you actually can, but it would require a LOT of script code, essentially bypassing the Sound Forge save code and doing it all yourself - not recommended).

- Is it possible to run a dithering over the whole file before?
file.DoEffect("Dither", "preset name", ...);

- Would it be possible to write the new created names of a single mp3 to its ID-Tag?
file.Summary.Title = szName; // do this before you RenderAs

- Would it be possible to create subfolders for mp3s belonging to one origin file?
Sure, just remember to Directory.Create() folders before you try and save files into them.

All of these things (other than the LAME encoder) are very easy in Sound Forge scripting.


Message last edited on 9/24/2008 12:00:10 AM, by SonyTJ.


Go Back