OSDN Git Service

Update README and INSTALL
[timidity41/timidity41.git] / INSTALL
1 ======================================================================
2         TiMidity++ Installation guide
3
4                                         Masanao Izumo
5                                         <iz@onicos.co.jp>
6                                         Jan.25.2004
7                                         version 2.13.0 or later
8 ======================================================================
9
10 This document describes how to install TiMidity++(version 2.13.0 or
11 later) for your UNIX-like machine.  Methods for Macintosh are not
12 described in this document.
13
14 It is enabled to configure and make timidity.exe on the Cygwin
15 environment of Windows98/95/NT.  If you are in Windows, install cygnus
16 and egcs (or mingw) if you don't have them (which is available from
17 http://sourceware.cygnus.com/cygwin/), and run `cygnus', and make
18 symbolic link /bin/sh to bash.
19
20 Installing process:
21
22   1. configure
23   2. edit common.makefile, Makefile, timidity.h (not necessary)
24   3. make (required:GNU make)
25   4. installation
26   5. search for various voice data :)
27
28 Each processes are explained in following sections.
29 (Note that '%' is the shell prompt.)
30
31 1. configure
32 ------------
33 First, execute the following command:
34
35 % /bin/sh configure --help
36
37 Many options of configure will be displayed. Main of these are the
38 following:
39
40   --help
41     Displays help messages.
42
43   --prefix=PREFIX
44     Specifies the base of installing directory. By default, PREFIX is
45     "/usr/local/".
46     Any files are installed in:
47         PREFIX/bin: executable files
48         PREFIX/share/timidity: configuration files and patches
49         PREFIX/lib/timidity: libraries and dynamic link interfaces.
50         PREFIX/man: online manuals
51     Example:
52         % sh configure --prefix=/opt/gnu
53         # installs to /opt/gnu/bin, /opt/gnu/man, /opt/gnu/...
54
55   --x-includes=DIR
56     Specifies include directory of X library.
57
58   --x-libraries=DIR
59     Specifies library directory of X library.
60
61   --enable-debug
62     Compiles TiMidity++ with debugging methods/informations.
63
64   --with-x
65     You should specify this option if you have X Window environment.
66     --with-x is `yes' by default.
67
68   --without-x
69     You must specify this option if you don't have X Window environment.
70
71   --with-tcl-includes=dir
72     Specifies include directory of Tcl.
73     (If you fail to detect it automatically, try to specify this.)
74
75   --with-tcl-libs=dir
76     Specifies library directory of Tcl.
77     (If you fail to detect it automatically, try to specify this.)
78
79   --with-tk-includes=dir
80     Specifies include directory of Tk.
81     (If you fail to detect it automatically, try to specify this.)
82
83   --with-tk-libs=dir
84     Specifies library directory of Tk.
85     (If you fail to detect it automatically, try to specify this.)
86
87   --enable-audio[=mode_list]
88     Enables TiMidity++ to play MIDI files.
89     If --enable-audio=no, TiMidity++ is only the MIDI-to-WAVE converter.
90     You can specify multi-audio device from follows (specify comma
91     separated list):
92         default:  Automatically select audio device.    (default)
93         oss:    OSS /dev/dsp
94         sun:    SunOS /dev/audio
95         hpux:   HPUX /dev/audio
96         irix:   IRIX audio library
97         mme:    OSF/1 MME
98         sb_dsp: BSD/OS 2.0 /dev/sb_dsp
99         w32:    Windows MMS
100         alsa:   ALSA pcm device
101         alib:   HPUX network audio (Alib)
102         nas:    NAS - Network Audio System
103         esd:    EsounD
104
105   --enable-nas
106     Enables TiMidity++ to play MIDI files using NAS (Network Audio
107     System).
108
109   --enable-esd
110     Enables TiMidity++ to play MIDI files using EsounD.
111
112   --enable-interface=[Comma separated interface list]
113     Specifies interface list (Comma separated).  Choose interfaces from
114     follows.
115         ncurses,slang,motif,tcltk,emacs,vt100,xaw,xskin,gtk,w32gui,server
116     Note that
117         --enable-interface=INTERFACE1,INTERFACE2,...
118     equals as
119         --enable-INTERFACE1=yes --enable-INTERFACE2=yes ...
120
121   --enable-dynamic[=Comma separated interface list]
122     Specifies dynamic link interface list.
123     Note that
124         --enable-dynamic=INTERFACE1,INTERFACE2,...
125     equals as
126         --enable-INTERFACE1=dynamic --enable-INTERFACE2=dynamic ...
127
128   --enable-ncurses
129     Includes Ncurses interface.  If you build this interface as dinamic
130     link interface, please specify --enable-ncurses=dynamic.
131
132   --enable-slang
133     Includes slang interface.  If you build this interface as dinamic
134     link interface, please specify --enable-slang=dynamic.
135
136   --enable-motif
137     Includes Motif interface.  If you build this interface as dinamic
138     link interface, please specify --enable-motif=dynamic.
139     If you don't have Motif for the lack of a fund:), lesstif is the
140     another answer.
141
142   --enable-tcltk
143     Includes Tcl/Tk interface.  If you build this interface as dinamic
144     link interface, please specify --enable-tcltk=dynamic.
145
146   --enable-emacs
147     Includes Emacs interface.  If you build this interface as dinamic
148     link interface, please specify --enable-emacs=dynamic.
149     If you want use TiMidity++ on Emacs, install this interface and
150     press M-x timidity.
151     And you should edit timidity.el and install to appropriate
152     directory.
153
154   --enable-vt100
155     Includes VT100 interface.  If you build this interface as dinamic
156     link interface, please specify --enable-vt100=dynamic.
157     This is the full-screen interface using VT100 terminal control
158     codes.
159
160   --enable-xaw
161     Includes X Athena Widget interface.  If you build this interface
162     as dinamic link interface, please specify --enable-xaw=dynamic.
163
164   --enable-xskin
165     Includes skin interface.  This is the small X interface using
166     skins of WinAmp/x11amp.  If you build this interface as dinamic
167     link interface, please specify --enable-xaw=dynamic.
168
169   --enable-gtk
170     Includes Gtk+ interface.  If you build this interface as dinamic
171     link interface, please specify --enable-gtk=dynamic.
172
173   --enable-w32gui
174     Build TiMidity++ as Windows GUI.
175
176   --enable-alsaseq
177     Build TiMidity++ as ALSA sequencer client.
178
179   --enable-network
180     This option allows TiMidity++ to play MIDI file getting via
181     network.  You can specify the location of MIDI files by
182     http://foo.bar/baz.mid - like format.
183
184   --enable-spectrogram
185     This option allows TiMidity++ to open the sound-spectrogram window
186     in X.
187
188   --enable-wrd
189     Includes WRD interface(on X). WRD is Japanese local lyric-contents
190     format.
191
192 For example:
193
194 % ./configure --enable-ncurses --enable-slang --enable-motif \
195               --enable-tcltk --enable-emacs --enable-vt100 --enable-xaw \
196               --enable-xskin --enable-gtk \
197               --enable-network --enable-spectrogram --enable-wrd
198
199 Some of MIDI file eats too much CPU power.  If you choose correct
200 optimizing method, TiMidity++ can play such MIDI files smoothly.
201 Optimizing options can specify in configuration:
202
203 (for example: super-sparc/gcc)
204
205 (csh, tcsh)
206 % env CFLAGS='-O3 -Wall -mv8 -funroll-all-loops -fomit-frame-pointer \
207               -msupersparc /bin/sh configure [configure-options]...
208
209 (sh, bash)
210 % CFLAGS='-O3 -Wall -mv8 -funroll-all-loops -fomit-frame-pointer \
211           -msupersparc /bin/sh configure [configure-options]...
212
213 2. edits common.makefile, Makefile, timidity.h
214 ----------------------------------------------
215 If configure failed or compile not complete successfully, edit
216 common.makefile, Makefile, and timidity.h to appropriate value.
217 All of definition of variables are orverwrited by common.makefile.
218
219 3. make
220 -------
221 Once finished above setting, type
222
223 % make
224
225 This make method requires GNU make.  Some system has it as gmake.
226
227 Note: Some system announces warnings
228
229 vendorShellClassRec
230 vendorShellWidgetClass
231
232 in linking XAW.  But it makes no matter.  Don't worry.
233
234 4. install
235 ----------
236 On UNIX, you can type `make install' to install all files.  Or you
237 can select follows:
238
239     make install.bin    - installs executable files
240     make install.tk     - installs Tcl/Tk interface
241     make install.el     - installs Emacs interface
242     make install.man    - installs man files
243     make install        - installs all files
244
245 I recommend to check the install directories and files by executing
246
247 % make -n ...
248
249 5. Search for various voice data
250 --------------------------------
251 TiMidity++ uses GUS/patch (Glavis Ultrasound) as the voice data to
252 play.  You must get GUS/patch files, and make the configuration file.
253 You must make the configuration file (*.cfg).  By default,
254 timidity.cfg is /usr/local/share/timidity/timidity.cfg (or
255 C:\WINDOWS\TIMIDITY.CFG on Windows).  And please check the following
256 sites for many voice(patch) data:
257
258 http://www.goice.co.jp/member/mo/timidity/link.html#gus
259 http://www.goice.co.jp/member/mo/timidity/dist/cfg/ (Some samples of *.cfg)
260 http://www.i.h.kyoto-u.ac.jp/~shom/timidity/        (10M or 4M patch)
261 ftp://ftp.cdrom.com/pub/gus/sound/patches/files/    (GUS site)
262
263 If you got funny voice archive, extract it to appropriate directory
264 and configure *.cfg files with the name and path of these voice dates.
265
266 ==============================================================================
267         configuration of timidity.h
268 ==============================================================================
269
270 Edit CONFIG_FILE to your convenience.  By default,
271
272 #define CONFIG_FILE DEFAULT_PATH "/timidity.cfg"
273
274 are recommended.  DEFAULT_PATH is the same as TIMID_DIR in Makefile.
275 If you want to place it to another path, specify as the following:
276
277 #define CONFIG_FILE "/etc/timidity.cfg"
278
279 The next configuration is the file extractor (please ignore in
280 Windows).  By default:
281
282 #define DECOMPRESSOR_LIST { \
283                 ".gz", "gunzip -c %s", \
284                 ".bz2", "bunzip2 -c %s", \
285                 ".Z", "zcat %s", \
286                 ".zip", "unzip -p %s", \
287                 ".lha", "lha -pq %s", \
288                 ".lzh", "lha -pq %s", \
289                 ".shn", "shorten -x %s -", \
290                 0 }
291
292 TiMidity++ can handle some of archive format directly.  But other
293 format will use this extractor.
294
295 Next, configuration of patch file converter (please ignore in
296 Windows).  By default:
297
298 #define PATCH_CONVERTERS { \
299                 ".wav", "wav2pat %s", \
300                 0 }
301
302 Next, configuration of extensions of GUS/patch file.  If specified in
303 this configuration, the extension can omit in all *.cfg.  By default:
304
305 #define PATCH_EXT_LIST { \
306                 ".pat", \
307                 ".shn", ".pat.shn", \
308                 ".gz", ".pat.gz", \
309                 ".bz2", ".pat.bz2", \
310                 0 }
311
312 Next, configuration of default instrument.  By default:
313
314 #define DEFAULT_PROGRAM 0
315
316 If no Program Change event, this program name are adopted.  Usually 0
317 is Piano.
318
319 Next, configuration of drum channel.  By default:
320
321 #define DEFAULT_DRUMCHANNELS {10, -1}
322
323 Numbers is the list of drum channels, and -1 is the terminator.  For
324 example, if you wish to default drum channel be 10 and 16,
325
326 #define DEFAULT_DRUMCHANNELS {10, 16, -1}
327
328 This channel can change in command line option.
329
330 Next, type of floating point number.  Choose one of these:
331
332 - typedef double FLOAT_T;
333 - typedef float FLOAT_T;
334
335 Many machine which has FPU results faster operations with double than
336 that with float.  But some machine results contrary.
337
338 Next, minimum and max range of playing sample rate.  By default:
339
340 #define MIN_OUTPUT_RATE 4000
341 #define MAX_OUTPUT_RATE 65000
342
343 Next, default value of master volume.  By default:
344
345 #define DEFAULT_AMPLIFICATION 70
346
347 This number is the percentage of max volume.  This default value will
348 be nice in any occasions.  This number can specify in command line
349 option (-A).
350
351 Next, default sampling rate.  By default:
352
353 #define DEFAULT_RATE 44100
354
355 If you have much CPU power, DAT quality GUS/patch and want to listen
356 funny sound,
357
358 #define DEFAULT_RATE 48000
359
360 is good solution.
361
362 Next, configuration of default polyphony numbers.  By default:
363
364 #define DEFAULT_VOICES 256
365
366 DEFAULT_VOICE is the polyphony number in boot-time.  This value is
367 configurable by the command line option (-p) from 1 to until memory
368 is allowed.  If your machine has much CPU power,
369
370 #define DEFAULT_VOICES  512
371
372 enables good harmony.
373
374 Next, size of internal buffer.  By default:
375
376 #define AUDIO_BUFFER_BITS 12
377
378 I guess this values no need to change.
379
380 Next, value of CONTROLS_PER_SECOND.  By default:
381
382 #define CONTROLS_PER_SECOND 1000
383
384 Next, interpolation in re-sampling.  By default:
385
386 #define DEFAULT_RESAMPLATION resample_gauss
387
388 This definition cause TiMidity++ to Gauss-like interpolation in
389 re-sampling, and the quality of sound would be nice.  But it eats CPU
390 powers.  I recommend define it if your machine has much power.  The
391 following algorighms are available:
392
393 #define DEFAULT_RESAMPLATION resample_none
394 #define DEFAULT_RESAMPLATION resample_linear
395 #define DEFAULT_RESAMPLATION resample_cspline
396 #define DEFAULT_RESAMPLATION resample_lagrange
397 #define DEFAULT_RESAMPLATION resample_newton
398 #define DEFAULT_RESAMPLATION resample_gauss
399
400 This option is configurable by the command line option (-EFresamp).
401 To disallow users to choose the resamplation algorithm:
402
403 #define FIXED_RESAMPLATION
404
405 Next, configuration of USE_DSP_EFFECT to refine chorus, delay, EQ and
406 insertion effect.  By default:
407
408 #define USE_DSP_EFFECT
409
410 Next, configuration of LOOKUP_HACK.  By default, this features are
411 undefined like this:
412
413 /* #define LOOKUP_HACK */
414 /* #define LOOKUP_INTERPOLATION */
415
416 This option saves a little CPU power, but sound quality would decrease
417 noticeably.  If your machine suffers from lack of CPU power, enable
418 it.
419
420 Next, configuration of FAST_DECAY.  By default:
421
422 /* #define FAST_DECAY */
423
424 This option makes envelopes twice as fast and saves CPU power.  But
425 since the release time of voices is shorten, the sound would be poor.
426 This feature is controllable in command line option.
427
428 Next, configuration of FRACTION_BITS.  By default:
429
430 #define FRACTION_BITS 12
431
432 I recommend leave this value.
433
434 Next, configuration of adjusting amplitude of GUS/patch.  By default:
435
436 #define ADJUST_SAMPLE_VOLUMES
437
438 This option makes TiMidity to adjust amplitudes of each GUS/patch to
439 same volume.
440
441 Next, configuration of DANGEROUS_RENICE.  By default this feature
442 is disabled:
443
444 /* #define DANGEROUS_RENICE -15 */
445
446 If you want to increase process priority of TiMidity++ by using setuid
447 root enable this option.  This option is only available in UNIX.  Once
448 you enabled this option, you should install timidity with the
449 following procedure:
450
451 # chown root /usr/local/bin/timidity
452 # chmod u+s /usr/local/bin/timidity
453
454 Note: You should not set setuid to timidity if DANGEROUS_RENICE isn't
455 enabled.
456
457 Next, configuration of MAX_DIE_TIME.  By default:
458
459 #define MAX_DIE_TIME 20
460
461 If this value is too small, click noise would be come.  I recommend
462 this value leave to this.
463
464 Next, configuration of LOOKUP_SINE.  By default:
465
466 #define LOOKUP_SINE
467
468 On some machines (especially PCs without math coprocessors), looking
469 up sine values in a table will be significantly faster than computing
470 them on the fly.  I recommend define it.
471
472 Next, configuration of optimizing re-sampling.  By default:
473
474 #define PRECALC_LOOPS
475
476 This option saves some CPU power only in some system.
477
478 Next, configuration of use of ldexp().  By default this feature is
479 disabled:
480
481 /* #define USE_LDEXP */
482
483 If your machine can multiply floating point number with ldexp() faster
484 than other method, enable this option.
485
486 Next, configuration of size of pre-re-sampling cache.  By default:
487
488 #define DEFAULT_CACHE_DATA_SIZE (2*1024*1024)
489
490 Next, configuration about networks.  TiMidity++ can access any files
491 via networks with URL.  This feature are configurable in Makefile.  If
492 you have enabled this feature in Makefile (configure --enable-network),
493 configure the following macros:
494
495 - MAIL_DOMAIN
496   specifies domain name of your name address.  If your name address
497   is "iz@onicos.co.jp" set the macro:
498   #define MAIL_DOMAIN "@onicos.co.jp"
499
500 - MAIL_NAME
501   specifies mail name of yours if in Windows.  In UNIX, uncomment it.
502   For example, your name address is "iz@onicos.co.jp" set the macro:
503   #define MAIL_NAME "iz"
504
505 This mail addresses are used when TiMidity++ access to anonymous FTP
506 sites.
507
508 Next, configuration of temporary directory.  By default, this option
509 is disabled:
510
511 /* #define TMPDIR "/var/tmp" */
512
513 In UNIX, if this option is disabled TiMidity++ creates temporary files
514 in the path specified by the environment variable TMPDIR.  If
515 environment variable TMPDIR also isn't defined, TiMidity++ creates
516 temporary files in /tmp.  In Windows, TMPDIR variable are ignored.  So
517 you should specify the temporary path with this macro.
518
519 Next, recognizing GS drum part by GS exclusive message.
520
521 #define GS_DRUMPART
522
523 enables to recognize GS exclusive message to set drum part.
524
525 /* #define GS_DRUMPART */
526
527 disables this feature.
528
529 Next, output text code.  If your system is in Japanese environment,
530 define
531
532 #define JAPANESE
533
534 or comment out it like
535
536 /* #define JAPANESE */
537
538 Next, specifies output text code (in Japanese environment).  You
539 should specify appropriate code name to OUTPUT_TEXT_CODE macro.  The
540 following strings are available:
541
542 "AUTO"  - Auto conversion by `LANG' environment variable (UNIX only)
543 "ASCII" - Convert unreadable characters to '.'(0x2e)
544 "NOCNV" - No conversion
545 "EUC"   - EUC
546 "JIS"   - JIS
547 "SJIS"  - shift JIS
548
549 In Japanized UNIX system, all of above are available.  In Windows,
550 "ASCII", "NOCNV", "SJIS" are available.  If your environment cannot
551 handle Japanese, specify "ASCII" or "NOCNV" alternatively.
552
553 Next, controllers of MIDI actions. By default:
554
555 #define MODULATION_WHEEL_ALLOW
556 #define PORTAMENTO_ALLOW
557 #define NRPN_VIBRATO_ALLOW
558 /* #define REVERB_CONTROL_ALLOW */
559 #define FREEVERB_CONTROL_ALLOW
560 #define CHORUS_CONTROL_ALLOW
561 /* #define SURROUND_CHORUS_ALLOW */
562 /* #define GM_CHANNEL_PRESSURE_ALLOW */
563 #define VOICE_CHAMBERLIN_LPF_ALLOW
564 /* #define VOICE_MOOG_LPF_ALLOW */
565 /* #define MODULATION_ENVELOPE_ALLOW */
566 /* #define ALWAYS_TRACE_TEXT_META_EVENT */
567 #define OVERLAP_VOICE_ALLOW
568 #define TEMPER_CONTROL_ALLOW
569
570 These values are configurable in command line options.  So you may
571 leave these in default value.
572
573 - MODULATION_WHEEL_ALLOW
574   Enables modulation wheel by default.
575   (-Ew:on -EW:off)
576 - PORTAMENTO_ALLOW
577   Enables portamento by default.
578   (-Ep:on -EP:off)
579 - NRPN_VIBRATO_ALLOW
580   Enables NRPN vibration by default.
581   (-Ev:on -EV:off)
582 - REVERB_CONTROL_ALLOW
583   Enable standard reverb control by default.  This feature requires a
584   little CPU power.
585   (-EFreverb=1:on -EFreverb=0:off)
586 - FREEREVERB_CONTROL_ALLOW
587   Enable Freeverb control by default.  This feature requires too much
588   CPU power.  So this option prevents TiMidity++ from playing in real
589   time if this option is enabled (in command line / this define).
590   (-EFreverb=3:on -EFreverb=0:off)
591 - CHORUS_CONTROL_ALLOW
592   Enables standard chorus control by default.  This feature also
593   requires a little CPU power too.
594   (-EFchorus=1:on -EFchorus=0:off)
595 - SURROUND_CHORUS_ALLOW
596   Enables surround chorus control by default.  This feature also
597   requires a little CPU power too.
598   (-EFchorus=2:on -EFchorus=0:off)
599 - GM_CHANNEL_PRESSURE_ALLOW
600   Enables Channel pressure by default.
601   (-Es:on -ES:off)
602 - GM_CHANNEL_PRESSURE_ALLOW
603   Enables channel pressure by default.
604   (-Es:on -ES:off)
605 - VOICE_CHAMBERLIN_LPF_ALLOW
606   Enables Chamberlin resonant LPF (12dB/oct) by default.
607   (-EFvlpf=1:on -EFvlpf=0:off)
608 - VOICE_MOOG_LPF_ALLOW
609   Enables Moog resonant lowpass VCF (24dB/oct) by default.
610   (-EFvlpf=2:on -EFvlpf=0:off)
611 - MODULATION_ENVELOPE_ALLOW
612   Enables modulation envelope by default.
613   (-Ee:on -EE:off)
614 - ALWAYS_TRACE_TEXT_META_EVENT
615   Enables tracing the Text Meta Event by default.
616   (-Et:on -ET:off)
617 - OVERLAP_VOICE_ALLOW
618   Enables allowing pronouncing overlapped voice.
619   (-Eo:on -EO:off)
620 - TEMPER_CONTROL_ALLOW
621   Enables temperament control in MIDI Tuning Standard by default.
622   (-Ez:on -EZ:off)
623
624 ----------------------------------------------------------------------
625 This document is translated from the original INSTALL.jp (written in
626 Japanese).
627 Translator: NAGANO Daisuke <breeze_geo@geocities.co.jp>
628             (And modified by Masanao Izumo <mo@goice.co.jp>)
629 If you have any comments on or corrections for this translation,
630 please tell us.