4

tiMidity can extract individual tracks from a standard MIDI file to audio files, using its option -o out.wav, and its option -Q 0,-n to quieten all tracks but the n'th.

However, re-mixing the resulting .wav files (sox -m *.wav ...) may not reconstitute the original (all tracks, without -Q). This is because any track whose first note-on event comes several seconds after the overall start (i.e., starts with a rest) produces an audio file that starts exactly at the first note. Noble, but misguided.

How can a single track be extracted into an audio file, preserving any silence before the first note?

(Must I edit the MIDI file to insert, into each track, a dummy zero-volume note at the start of the music? Or add a dummy track m with a zero-volume starting note, and then -Q 0,-n,-m ?)

Camille Goudeseune
  • 2,297
  • 4
  • 32
  • 41

1 Answers1

6

timidity version 2.14.0 has an option --preserve-silence which prevents it from dropping the initial rests.

Aryeh Leib Taurog
  • 360
  • 2
  • 4
  • 13