Reverse Engineering the Korg Monotribe Firmware Upgrade

An excellent post (and useful comments) on the reverse engineering of the Korg Monotribe firmware update which apparently is provided as an audio file.  I’ll definitely be checking back on this regularly to watch Gravitronic’s progress.

GRAVITRONIC: Decoding the Korg Monotribe Firmware Upgrade.

Sound Forge Batch Export Script

I frequently use Sound Forge to edit large wave files into smaller samples and clips that I then use in software samplers, drum machines, or set aside for further editing, When you’re only creating two or three clips, highlighting, copying, pasting, saving, renaming isn’t a big deal. Recently though while working on a project I found myself I need of creating dozens of clips from a single file… and this had to be done for a hundred files.

Sound Forge scripting to the rescue.

Sound Forge comes with some great built in scripts. For the task above I found the script named “Save Regions as Files” particularly useful. At first anyway. The existing script still required me to name the file and select the file location. This is a minor detail but when you have to repeat this process over 100 times it can be extremely frustrating. With a little help from the Sound Forge scripting SDK I came up with the following modification to the original script that will export all regions to the original file’s directory without any prompting.

The example above is named “Test_Wave_Export.wav”. When running the script the 6 regions are automatically saved in the same directory as the source file in incremental format without any additional prompting. A huge time saver.


Once the script is saved in the Sound Forge Script folder you can make an icon and add the script directly on your toolbar for easy access. This script uses JScript


import System;
import System.IO;
import System.Windows.Forms;
import SoundForge;

//Run with a file that contains regions
//Iterates through the regions, renders to format of your choice and
//saves the rendered file to the same directory as the source file
//Scan the file for MODIFY HERE to see how to quickly customize for your own use

public class EntryPoint {

public function CleanForFilename(szName)
szName = szName.Replace(“:”,”;”);
szName = szName.Replace(“?”,”!”);
szName = szName.Replace(“*”,”+”);
szName = szName.Replace(“/”,”|”);
szName = szName.Replace(“\\”,”|”);
if (szName.IndexOfAny(Path.InvalidPathChars) >= 0)
for (var ch in Path.InvalidPathChars)
szName = szName.Replace(ch.ToString(),”_”);
return szName;

public function Begin(app : IScriptableApp) {

//MODIFY HERE———————————————–
var szType = “.wav”; //choose any valid extension: .avi .wav .w64 .mpg .mp3 .wma .mov .rm .aif .ogg .raw .au .dig .ivc .vox .pca
var vPreset = “DaveTemplate”; //put the name of the template between the quotes, or leave blank to pop the Template chooser.
var FileFullName = app.CurrentFile.Filename; //obtain the full path and filename of the current file
var szDir = FileFullName.substring( 0, FileFullName.lastIndexOf(“\\”) ); //Set the directory to that of the source file.
var file = app.CurrentFile;

if (null == file)
app.SetStatusText(“open a file loser!”);

//make sure the directory exists

var rend : ISfRenderer = null;
if (szType.StartsWith(“.”))
rend = app.FindRenderer(null, szType);
rend = app.FindRenderer(szType, null);

if (null == rend)
app.SetStatusText(“Renderer not found. Script stopped.”);
DPF(“renderer for {0} not found.”, szType);

var template = null;
if (vPreset != “”)
template = rend.GetTemplate(vPreset);
template = rend.ChooseTemplate(null, vPreset);
if (null == template)
app.SetStatusText(“Template not found. Script stopped.”);

var szBase = file.Window.Title;
szBase = szBase.substring(0,szBase.length – 4);

for (var mk in file.Markers)
if (mk.Length <= 0)

var szName = String.Format(“{0}-{1}.{2}”, szBase, mk.Name, rend.Extension);

szName = CleanForFilename(szName);

var szFullName = Path.Combine(szDir, szName);
if (File.Exists(szFullName))

var range : SfAudioSelection = new SfAudioSelection(mk.Start, mk.Length);
file.RenderAs(szFullName, rend.Guid, template, range, RenderOptions(“RenderOnly”));

var status : SfStatus = app.WaitForDoneOrCancel();
DPF(“Done -{0}”, status);

public function FromSoundForge(app : IScriptableApp) {
ForgeApp = app;
app.SetStatusText(String.Format(“Script ‘{0}’ is running.”, Script.Name));
app.SetStatusText(String.Format(“Script ‘{0}’ is done.”, Script.Name));
public var ForgeApp : IScriptableApp = null;
public function DPF(sz) { ForgeApp.OutputText(sz);}
public function DPF(sz,o) { ForgeApp.OutputText(System.String.Format(sz,o)); }
public function DPF(sz,o,o2) { ForgeApp.OutputText(System.String.Format(sz,o,o2)); }

public function DPF(sz,o,o2,o3) { ForgeApp.OutputText(System.String.Format(sz,o,o2,o3)); }

} // class EntryPoint