Community Forums Archive

Go Back

Subject:Markers from Text File
Posted by: maulik
Date:2/11/2009 4:24:06 PM

Hello - I am new to scripting in Sound Forge and C# but I have a strong programming background in general. Here is what I am trying to do. I need to be able to import marker names from a text file that will all appear on a different line of the file. These same markers are going to be reused in several different files that originate from a midi file that is converted to audio at a variety of tempos. Each file needs to have the same markers in it by name. The names of markers will be reused since the only thing changing from file to file will be the tempo and therfore the location of the marker or region start points.

In sound forge 9 I am going to detect the beats using auto region for drum beats. Then once the auto regions are determined, I need to convert the regions to markers and have each marker renamed to the corresponding marker name from the imported file. I have seen the Dump examples that show the use of a save file dialog. I assume I can use an open file dialog from C# in the same way to open up the text file of marker names to use.

After the file of marker names is opened, I intend to maybe store each name in an array. As the portion of the script that will convert from regions to markers goes through each marker, I need to rename the marker to the correct marker from the array and repeat this process until the list of marker names have all been used in the renaming of markers I am converting.

I can run the auto region process manually and get the regions I need into the audio file before running the script. Once the regions are entered into the file, then I will need to run my convert to markers script that renames each marker using the marker names from the opened text file.

I have seen the automatic markers script and some of the dump scripts that look reusable.

Can anyone please point me to scripts to modify or other ideas that could help in this process? Is it possible to open up a text file from within the scripting environment of sound forge 9 and then import these values for the renaming process?


Thanks.
MAulik

Go Back