Multitrack output

2004-05-23
2013-05-08
  • Nobody/Anonymous

    There is one thing I would really like to see in a future version of timidity++ and that is a output in multiple .wav files, one for each track used so you can load all of those tracks into a multitrack editor like Adobe Audition (Cool Edit Pro) and balance the track's yourself since all soundfonts I have used have balance problems between instruments.

     
    • Dieter Demerre

      Dieter Demerre - 2006-04-13

      I have a script:

      Following script will create (in existing directories) tracks.

      <file name="towav">
      #!/bin/bash
      # Usage:
      #   towav file.mid voice1 voice2 ...
      # Will create voice-specific .wav files into
      # track 1 into ../wave-files/voice1/file.wav
      # track 2 into ../wave-files/voice2/file.wav
      #
      #  e.g.
      #  towav fn001heavn.mid sop alt ten1 bas1
      # will put
      # track 1 into ../wave-files/sop/fn001heavn.wav
      # track 2 into ../wave-files/alt/fn001heavn.wav
      # track 3 into ../wave-files/ten1/fn001heavn.wav
      # track 4 into ../wave-files/bas1/fn001heavn.wav

      target=../wave-files
      overwrite=0;

      function allmidi2wav
      {
        # Usage:
        #  allmidi2wav <midi-file> <voice>+
        # with <voice>+ in order they are in midi-file.
        #
        midi_file=$1;
        voicenr=1;
        shift 1;
        while [ $# -gt 0 ]; do
          only_one_voice2wav $midi_file $voicenr $1
          shift 1;
          voicenr=$[ $voicenr + 1 ]
        done
      }

      function only_one_voice2wav
      {
        # Usage:
        #  only_one_voice2wav <midifile> <voicenr> <dir>
        m=$1;
        voice=$2;
        dir=${target}/$3;
        if [ ! -d ${dir ]; then
          echo "Directory ${dir} is not found.">&2
          exit
        fi
        w=${dir}/`echo $m|sed 's/\.mid$/\.wav/'`;
        if [ ${overwrite} -eq 0 -a -s ${w} ]; then
          echo found already existing File ${w}
        else
          echo "converting $f for voice $dir"
          # option --trace causes silence at start of voices that start delayed.
          # so all wav tracks are equally initiated.
          timidity --trace --mute=0,-${voice} --output-mode=w --output-file=${w} ${m}
        fi
      }

      allmidi2wav $@
      </file>

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks