May 2010

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

DIY MIDI Sequencer

Not much written about this excellently crafted build from Flickr user Collin Mel however he does mention he’ll have a parts list posted in the future.

On the Flickr page Collin links to his source for the LED light bars.  I checked the link and the product wasn’t found.  What I did find find though was these awesome Playstation 2 thumb joysticks which could be easily rigged up as a midi controller.  only $3.90!

Playstation 2 Analog Joystick

Living VCO

I don’t know much about this one except what is written on Matrixsynth

Living VCO

This one in via John L. Rice. It’s a Living VCO made by Peter:

“I’m not a MOTMer & I make my own panels, so I don’t have much to add to this debate. I did however finish wiring my Living VCO module today. Its still on the bench being checked over and is not integrated into my system yet but is looking and sounding good so far.

I managed a FRAC format panel design that has all the stock features and fits pretty comfortably (for me) on a 5U frac panel.

Here’s a pic of the module taken some time ago before beginning wiring.

You can get the original post here:

Rare Beasts – Wicks Looper Acid Mix

Rare Beasts is out of Australia and they make a small unique selection of great handmade effects-processors/audio noise machines. Definitely take a look at their custom gear at their Etsy shop. The most recent release is a great little sampler/looper/noise generator called The Wicks Looper – Acid Mix.

From Rare Beasts’ Etsy site:

The Wicks Looper has 3 main controls; The frequency control adjusts the frequency of the noise, the first half of the range is tame, the 2nd half is uncut noise. The second control is Speed, which controls how fast the loop is played. The right hand side of this control plays the loop, forwards, turn the control to the left and the loop will play in reverse. Write the loop at a slow tempo then speed it up and reverse it, for a great effect. The third control is the write button, when pressed it writes a sound to memory which is then replayed next time the loop is run. With the Freq control knob adjusted anticlockwise, you can add a rest to the loop by pressing the Write button.

Wicks Looper Acid Mix

The video says it all… simple and cool.

Kathrin Stumreich – Fabric Machine

Kathrin uses the manual manipulation of photodiodes over moving “tracks” of a variety of sewn fabric to generate rhythmic droning passages.  The movement of several of the fabric tracks, at different speeds, directions, lengths, and composition makes this fascinating to watch and listen too. I for one am looking forward to what Kathrin does next.

fabricmachine from Kathrin Stumreich on Vimeo.

From Kathrin’s website:

The instrument

Two fabric loops, driven by a motor divide space. At certain points there are light sensors installed to receive signals, which get translated in audio signals.

Musicality and design

Fabrics which differ in their weaving technique, are sewed one after another (each loop consists of 196 inch length, with a width of 4,2 inch), creating a fabric track.

The basic parameters which take influence on the sound generation and can be chosen by playing consist of the following:

The frequency ( Hertz) or tone pitch is created by the quality of the fabric, weaving tecnique, basically this is the amount of threads interrupting the light per second. For example very transparent fabrics like silkchiffon create breaks.
Breaks and Rhythm are due to the seam, and the length of each sort of fabric, as well as to the performer
The arrangement of the fabrics in aspects of lenght,quality and the connecting seams are additive parameters for composing a rhythm or a flowing change of the tone pitch (frequency).
The information the lightsensor detects gets transformed into the acoustic signal, which gets amplified and sent to loudspeakers.
Engineering Features

The object that runs the loop is a movable construction and can be taken anywhere.
It works as an instrument as well as a standing alone (interactive) sound art installation.

The musicality of the instrument can be experienced by sliding or positioning the sensor across the tracks on the installed amatur.

MIDI Ironing Board

The title says it all. This is way past old news but it’s still a gem. This photo comes by way of Flickr but it was taken at the first (as in 2007) “handmade music” event at Etsy Labs in Brooklyn NY, sponsored by, MAKE Magazine, and Create Digital Music.

ASMO – the Tweakarium

Stu Smith under the project heading ASMO has built this beautiful hand-made custom MAX MSP controller for Chris Cousin.  Click the image to see the entire Flickr set.  From the ASMO blog:

He works with self made instruments custom built from the modified circuits of electronic toys, keyboards and other discarded gadgets. His work explores the sonic landscape of ‘circuit bent’ instruments and their integration into existing modular synthesizer systems. He writes and performs with the groups Threep and The Buoys and has performed at concerts and festivals across the UK, Europe and New York.

You can see more of ASMO’s work here:

Lara Grant – 16th and Mission

In the world of hacked and modified sewing machines using arduino to control max msp and generate music Lara Grant owns it big time.

From her Flickr page:

Lara Grant, part of the circuit bending orchestra for Diana Eng’s Fairytale Fashion Show held at Eyebeam NYC. Through various hacks and circuit bending techniques, Lara’s sewing machine trigger signals that is then fed onto laptops running MAX/MSP to produce the final soundtrack for the runway. Other team members of the orchestra are Peter Kirn and Matt Ganucheau.

You can see the project blog here:

looks like it’s been zapped. too bad. it was exceptional.

Which has many more great closeups like this one…

16th and Mission - Lara Grant

and more of her and her sister’s work here: