Submitted by donnek on Mon, 11/26/2007 - 12:03

by Kevin Donnelly

JACK Timemachine, by Steve Harris, can capture whatever is going to the JACK server - it therefore acts as an instant sound-recorder.

The key point about Timemachine is that it does not start recording once you hit the button. It has already recorded the previous ten seconds in a pre-recording buffer, and will include those seconds in the recording as well. This means it is good for catching those fleeting moments of inspiration that you can't recreate - just click the button and they get recorded to a file retrospectively.

By default, Timemachine records in w64 format, supported only by libsndfile at present. Sweep and Audacity support libsndfile, so they can open these files for editing and convert them, but Rezound uses libaudiofile, so it doesn't. W64 format is used because it better handles long or multichannel files.

Timemachine can also record in wav format, but note that this is WAVE_FORMAT_IEEE_FLOAT, and not the more common WAVE_FORMAT_PCM. Most players (except sndfile-play) will therefore refuse to play this format until
you convert it.

If you want something other than the default settings, start Timemachine with
some arguments:

$ timemachine -f wav -p /home/myuser/music_takes -t 30

To retain these settings, use something like:

alias timemachine='timemachine -f wav -p /home/myuser/music_takes -t 30'

in your ~/.bashrc file. The above line uses -f to specify a .wav file (instead of the default w64), -p to specify a location for the recording (instead of the default home directory), and -t to specify a pre-recording buffer of 30s (instead of the default 10s).

Timemachine in waiting mode

Note that JACK must be running before you start Timemachine. Once started, you need to go to the JACK connections (in JACK Control, for intance), and manually connect the output of the desired sound-playing app to the Timemachine input. So if you have ZynAddSubFX as the client, connect it to Timemachine. Then start playing the sound-creating app, and when you want to capture some sound, click on the big green Timemachine button (it will turn red). You should see the meter levels below the button rising and falling. When complete, click the red button to stop the recording.

Timemachine in recording mode

The recording will be saved to your home directory (change this with the -p switch - see above), under a filename beginning tm-, followed by a timestamp in ISO-8601 format (note that the timestamp reflects the pre-recording buffer, and not the time you clicked the record button).