Windows driver(timiditydrv.dll) How To

1.Where I put my timidity.cfg ?
You must set your timidity.cfg in windows directory.
Windows directory may be C:\WINDOWSiWindowsXP) or C:\WINNT(Windows 2000).

2.Change output dmode
For example, If you want to use PortAudioiASIO), you must write the following line to your timidity.cfg
#extension opt -Oo
Available output modes are
 -Od          Windows audio driver
 -Oo          PortAudio(ASIO)
 -OP          PortAudio(DirectSound)
 -Op          PortAudio(WMME).
(For Portaudio portaudio.dll must be in c:\WINDOWS)

3.Change sound device
You can slect sound device as follous
#extension opt --output-device=(n)    (n) is device number
Device number list can get by tying following commad.
timidity -O? --output-devide=         ? is output mode

4.Tune up latency
Timidity have two mechanisms which cause latency.
(1)MIDI lenderer latency.
(2)sound driver latency.
(1) can not be contorlled by users.
(2) can be contorlled with writing followingline in timidity.cfg.
#extension opt --rtsyn-latency= (secj
0.2 is default. If you set the value below 0.04, latency becomes to be 0.04.

5.How to install Driver?
(1) Use Installer package
Everything goes automatically.
(2)Install with GUI
Navigate to the Control Panel | Performance and Maintenance screen and choose System and choose the Hardware tab
and follo up install step:
"Add Hardware Wizard"
"next"
"Yes, I have already connected the hadware. "next"
"Add a new Hardware device" "next"
"Install the hardware that manually select from list[Advanced]" "next"
"sound, video and game contollers" "next"
"Have Disk ..."
"Brouse" and find timiditydrv.INF
"OK"
"! The softoware you are installing has not passed Windows Logo testing......" "Continue Anyway"
"Finish".

6.How to uninstall Driver?
(1)Use Installer packate
Uninstall the Timidity++, and every thing goes automatically.
(2)Uninstall with GUI
Navigate to the Control Panel | Performance and Maintenance screen and choose System and choose the Hardware tab
and follo up uninstall step:
"Device Manager"
"sound, video and game contollers"
Right click on "timiditydrv" and select "delete".

After rebooting the machine. 
Delete c:\windows\system32\timiditydrv.dll and c:\windows\timidity.cfg.


2007.1.4 Keishi Suenaga (skeishi@yaoo.co.jp)




[Appendix] parameters which are folloed by #extension opt.

If it cause sound cliping by too large volume, write as following and set volume "35".
#extension opt -A35

If your machine is too slow, try to write as follows.
#extension opt -s 11.025 (set sampling rate to 11.025kHzj
#extension -EFreverb=d ireverb offj

Prameters are shown by the command "timidity --help".
With 2006.12.26 version, the output of "timidity --help" is folloing lines.

Options:
  -A n,m     --volume=n, --drum-power=m
               Amplify volume by n percent (may cause clipping),
                 and amplify drum power by m percent
     (a)     --[no-]volume-compensation
               Toggle amplify compensation (disabled by default)
  -a         --[no-]anti-alias
               Enable the anti-aliasing filter
  -B n,m     --buffer-fragments=n,m
               Set number of buffer fragments(n), and buffer size(2^m)
  -C n       --control-ratio=n
               Set ratio of sampling and control frequencies
  -c file    --config-file=file
               Read extra configuration file
  -D n       --drum-channel=n
               Play drums on channel n
  -E mode    --ext=mode
               TiMidity sequencer extensional modes:
                 mode = w/W : Enable/Disable Modulation wheel
                        p/P : Enable/Disable Portamento
                        v/V : Enable/Disable NRPN Vibrato
                        s/S : Enable/Disable Channel pressure
                        e/E : Enable/Disable Modulation Envelope
                        t/T : Enable/Disable Trace Text Meta Event at playing
                        o/O : Enable/Disable Overlapped voice
                        z/Z : Enable/Disable Temperament control
                        m<HH>: Define default Manufacture ID <HH> in two hex
                        M<HH>: Define system Manufacture ID <HH> in two hex
                        b<n>: Use tone bank <n> as the default
                        B<n>: Always use tone bank <n>
                        i<n/m>: Use program <n> on channel <m> as the default
                        I<n/m>: Always use program <n> on channel <m>
                        F<args>: For effect.  See below for effect options
                   default: -E wpvSEToz
  -e         --evil
               Increase thread priority (evil) - be careful!
  -F         --[no-]fast-panning
               Disable/Enable fast panning (toggle on/off, default is on)
  -f         --[no-]fast-decay
               Enable fast decay mode (toggle)
  -H n       --force-keysig=n
               Force keysig number of sHarp(+)/flat(-) (-7..7)
  -h         --help
               Display this help message
  -i mode    --interface=mode
               Select user interface (see below for list)
             --rtsyn-latency=sec (for rtsyn only)
               Set the realtime latency (sec)
                 (default is 0.2 sec, minimum is 0.04 sec)
  -j         --[no-]realtime-load
               Realtime load instrument (toggle on/off)
  -K n       --adjust-key=n
               Adjust key by n half tone (-24..24)
  -k msec    --voice-queue=msec
               Specify audio queue time limit to reduce voice
  -L path    --patch-path=path
               Append dir to search path
  -M name    --pcm-file=name
               Specify PCM filename (*.wav or *.aiff) to be played or:
                 "auto" : Play *.mid.wav or *.mid.aiff
                 "none" : Disable this feature (default)
  -m msec    --decay-time=msec
               Minimum time for a full volume sustained note to decay,
                 0 disables
  -N n       --interpolation=n
               Set the interpolation parameter (depends on -EFresamp option)
                 Linear interpolation is used if audio queue < 99%
                 cspline, lagrange:
                   Toggle 4-point interpolation (default on)
                 newton:
                   n'th order Newton polynomial interpolation, n=1-57 odd
                 gauss:
                   n+1 point Gauss-like interpolation, n=1-34 (default 25)
  -O mode    --output-mode=mode
               Select output mode and format (see below for list)
             --flac-verify (for Ogg FLAC only)
               Verify a correct encoding
             --flac-padding=n (for Ogg FLAC only)
               Write a PADDING block of length n
             --flac-complevel=n (for Ogg FLAC only)
               Set compression level n:[0..8]
             --oggflac (for Ogg FLAC only)
               Output OggFLAC stream (experimental)
  -o file    --output-file=file
               Output to another file (or device/server) (Use "-" for stdout)
  -P file    --patch-file=file
               Use patch file for all programs
  -p n       --polyphony=n
               Allow n-voice polyphony.  Optional auto polyphony reduction
     (a)     --[no-]polyphony-reduction
               Toggle automatic polyphony reduction.  Enabled by default
  -Q n[,...] --mute=n[,...]
               Ignore channel n (0: ignore all, -n: resume channel n)
     (t)     --temper-mute=n[,...]
               Quiet temperament type n (0..3: preset, 4..7: user-defined)
  -q sec/n   --audio-buffer=sec/n
               Specify audio buffer in seconds
                 sec: Maxmum buffer, n: Filled to start (default is 5.0/100%)
                 (size of 100% equals device buffer size)
  -R msec      Pseudo reveb effect (set every instrument's release to msec)
                 if n=0, n is set to 800
  -S n       --cache-size=n
               Cache size (0 means no cache)
  -s freq    --sampling-freq=freq
               Set sampling frequency to freq (Hz or kHz)
  -T n       --adjust-tempo=n
               Adjust tempo to n%,
                 120=play MOD files with an NTSC Amiga's timing
  -t code    --output-charset=code
               Output text language code:
                 code=auto  : Auto conversion by `LANG' environment variable
                              (UNIX only)
                      ascii : Convert unreadable characters to '.' (0x2e)
                      nocnv : No conversion
                      1251  : Convert from windows-1251 to koi8-r
                      euc   : EUC-japan
                      jis   : JIS
                      sjis  : shift JIS
  -U         --[no-]unload-instruments
               Unload instruments from memory between MIDI files
  -V power   --volume-curve=power
               Define the velocity/volume/expression curve
                 amp = vol^power (auto: 0, linear: 1, ideal: ~1.661, GS: ~2)
  -v         --version
               Display TiMidity version information
  -W mode    --wrd=mode
               Select WRD interface (see below for list)
  -w mode    --rcpcv-dll=mode
               Windows extensional modes:
                 mode=r/R : Enable/Disable rcpcv.dll
  -x str     --config-string=str
               Read configuration str from command line argument
  -Z file    --freq-table=file
               Load frequency table (Use "pure" for pure intonation)
  pure<n>(m) --pure-intonation=n(m)
               Initial keysig number <n> of sharp(+)/flat(-) (-7..7)
                 'm' stands for minor mode
  --module=n
               Simulate behavior of specific synthesizer module by n
                 n=0       : TiMidity++ Default (default)
                   1-15    : GS family
                   16-31   : XG family
                   32-111  : SoundBlaster and other systhesizer modules
                   112-127 : TiMidity++ specification purposes

Effect options (-EF, --ext=F option):
  -EFdelay=d   Disable delay effect (default)
  -EFdelay=l   Enable Left delay
    [,msec]      `msec' is optional to specify left-right delay time
  -EFdelay=r   Enable Right delay
    [,msec]      `msec' is optional to specify left-right delay time
  -EFdelay=b   Enable rotate Both left and right
    [,msec]      `msec' is optional to specify left-right delay time
  -EFchorus=d  Disable MIDI chorus effect control
  -EFchorus=n  Enable Normal MIDI chorus effect control
    [,level]     `level' is optional to specify chorus level [0..127]
                 (default)
  -EFchorus=s  Surround sound, chorus detuned to a lesser degree
    [,level]     `level' is optional to specify chorus level [0..127]
  -EFreverb=d  Disable MIDI reverb effect control
  -EFreverb=n  Enable Normal MIDI reverb effect control
    [,level]     `level' is optional to specify reverb level [1..127]
  -EFreverb=g  Global reverb effect
    [,level]     `level' is optional to specify reverb level [1..127]
  -EFreverb=f  Enable Freeverb MIDI reverb effect control (default)
    [,level]     `level' is optional to specify reverb level [1..127]
  -EFreverb=G  Global Freeverb effect
    [,level]     `level' is optional to specify reverb level [1..127]
  -EFvlpf=d    Disable voice LPF
  -EFvlpf=c    Enable Chamberlin resonant LPF (12dB/oct) (default)
  -EFvlpf=m    Enable Moog resonant lowpass VCF (24dB/oct)
  -EFns=n      Enable the n th degree (type) noise shaping filter
                 n:[0..4] (for 8-bit linear encoding, default is 4)
                 n:[0..4] (for 16-bit linear encoding, default is 4)
  -EFresamp=d  Disable resamplation
  -EFresamp=l  Enable Linear resample algorithm (default)
  -EFresamp=c  Enable C-spline resample algorithm
  -EFresamp=L  Enable Lagrange resample algorithm
  -EFresamp=n  Enable Newton resample algorithm
  -EFresamp=g  Enable Gauss-like resample algorithm
                 -EFresamp affects the behavior of -N option

Alternative TiMidity sequencer extensional mode long options:
  --[no-]mod-wheel
  --[no-]portamento
  --[no-]vibrato
  --[no-]ch-pressure
  --[no-]mod-envelope
  --[no-]trace-text-meta
  --[no-]overlap-voice
  --[no-]temper-control
  --default-mid=<HH>
  --system-mid=<HH>
  --default-bank=n
  --force-bank=n
  --default-program=n/m
  --force-program=n/m
  --delay=(d|l|r|b)[,msec]
  --chorus=(d|n|s)[,level]
  --reverb=(d|n|g|f|G)[,level]
  --voice-lpf=(d|c|m)
  --noise-shaping=n
  --resample=(d|l|c|L|n|g)

Available interfaces (-i, --interface option):
  -in          ncurses interface
  -iT          vt100 interface
  -id          dumb interface
  -iW          Windows Synthesizer interface

Interface options (append to -i? option):
  `v'          more verbose (cumulative)
  `q'          quieter (cumulative)
  `t'          trace playing
  `l'          loop playing (some interface ignore this option)
  `r'          randomize file list arguments before playing
  `s'          sorting file list arguments before playing

Alternative interface long options:
  --verbose=n
  --quiet=n
  --[no-]trace
  --[no-]loop
  --[no-]random
  --[no-]sort

Available output modes (-O, --output-mode option):
  -Od          Windows audio driver
  -Oo          PortAudio(ASIO)
  -OP          PortAudio(DirectSound)
  -Op          PortAudio(WMME)
  -Ow          RIFF WAVE file
  -Or          Raw waveform data
  -Ou          Sun audio file
  -Oa          AIFF file
  -Ov          Ogg Vorbis
  -OF          FLAC / OggFLAC
  -Og          MP3 GOGO
  -Ol          List MIDI event
  -Om          Write MIDI file
  -OM          MOD -> MIDI file conversion

Output format options (append to -O? option):
  `S'          stereo
  `M'          monophonic
  `s'          signed output
  `u'          unsigned output
  `1'          16-bit sample width
  `2'          24-bit sample width
  `8'          8-bit sample width
  `l'          linear encoding
  `U'          U-Law encoding
  `A'          A-Law encoding
  `x'          byte-swapped output

Alternative output format long options:
  --output-stereo
  --output-mono
  --output-signed
  --output-unsigned
  --output-16bit
  --output-24bit
  --output-8bit
  --output-linear
  --output-ulaw
  --output-alaw
  --[no-]output-swab

Available WRD interfaces (-W, --wrd option):
  -Ww          Windows Console WRD tracer
  -Wt          TTY WRD tracer
  -Wd          dumb WRD tracer
  -W-          No WRD trace
