home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume43 / tclmidi / part14 < prev    next >
Internet Message Format  |  1994-07-21  |  51KB

  1. From: durian@boogie.com (Mike Durian)
  2. Newsgroups: comp.sources.misc
  3. Subject: v43i122:  tclmidi - A language for manipulating MIDI files, v2.0, Part14/14
  4. Date: 21 Jul 1994 19:28:33 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <30n3rh$7ad@sparky.sterling.com>
  9. X-Md4-Signature: afe16422d89137085fc0ed77c0d9a2da
  10.  
  11. Submitted-by: durian@boogie.com (Mike Durian)
  12. Posting-number: Volume 43, Issue 122
  13. Archive-name: tclmidi/part14
  14. Environment: POSIX, (BSDI, NetBSD, LINUX, SVR4 for optional driver), C++, TCL
  15. Supersedes: tclm: Volume 37, Issue 43-47
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  tclmidi-2.0/TODO tclmidi-2.0/contrib/Makefile
  22. #   tclmidi-2.0/contrib/README tclmidi-2.0/contrib/playzip
  23. #   tclmidi-2.0/drivers/BSD/midiioctl.h
  24. #   tclmidi-2.0/drivers/LINUX/midiconf.c
  25. #   tclmidi-2.0/drivers/SVR4/Makefile tclmidi-2.0/drivers/SVR4/Master
  26. #   tclmidi-2.0/drivers/SVR4/Name tclmidi-2.0/drivers/SVR4/Node
  27. #   tclmidi-2.0/drivers/SVR4/README tclmidi-2.0/drivers/SVR4/Space.c
  28. #   tclmidi-2.0/drivers/SVR4/System tclmidi-2.0/drivers/man/Makefile
  29. #   tclmidi-2.0/events/AllEvents.h tclmidi-2.0/events/EventUtil.h
  30. #   tclmidi-2.0/man/midifree.n tclmidi-2.0/man/midimake.n
  31. #   tclmidi-2.0/man/midiplay.n tclmidi-2.0/man/midiput.n
  32. #   tclmidi-2.0/man/midiread.n tclmidi-2.0/man/midirewind.n
  33. #   tclmidi-2.0/man/midisplit.n tclmidi-2.0/man/midistop.n
  34. #   tclmidi-2.0/man/midiversion.n tclmidi-2.0/man/midiwait.n
  35. #   tclmidi-2.0/man/midiwrite.n tclmidi-2.0/man/midtotcl.1
  36. #   tclmidi-2.0/man/minfo.1 tclmidi-2.0/man/mplay.1
  37. #   tclmidi-2.0/midtotcl tclmidi-2.0/minfo tclmidi-2.0/mplay
  38. #   tclmidi-2.0/patchlevel.h tclmidi-2.0/rb/makefile
  39. #   tclmidi-2.0/smf/Makefile tclmidi-2.0/song/Makefile
  40. #   tclmidi-2.0/song/TODO tclmidi-2.0/tclmAppInit.C
  41. #   tclmidi-2.0/tclmidi.h tclmidi-2.0/tests/README
  42. #   tclmidi-2.0/tests/copy.test tclmidi-2.0/tests/merge.test
  43. #   tclmidi-2.0/tests/move.test tclmidi-2.0/tests/put.test
  44. #   tclmidi-2.0/tkmAppInit.C
  45. # Wrapped by kent@sparky on Thu Jul 21 19:05:19 1994
  46. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  47. echo If this archive is complete, you will see the following message:
  48. echo '          "shar: End of archive 14 (of 14)."'
  49. if test -f 'tclmidi-2.0/TODO' -a "${1}" != "-c" ; then 
  50.   echo shar: Will not clobber existing file \"'tclmidi-2.0/TODO'\"
  51. else
  52.   echo shar: Extracting \"'tclmidi-2.0/TODO'\" \(748 characters\)
  53.   sed "s/^X//" >'tclmidi-2.0/TODO' <<'END_OF_FILE'
  54. X  Consider adding a EventTreeNode pointer to every Event.  This would
  55. Xgreatly speed moving from one arbitrary event to it's predicessor
  56. Xor successor.  Speed up would be reflected in reading large files
  57. Xwhere noteoff search for their pairing noteon.  But I'll hold off
  58. Xon this - it would increase each Event by a pointer.  This has been
  59. Xon my todo list for ages, it probably won't happen.
  60. X
  61. X  write doc on libmidi++.a
  62. X
  63. XIn Driver:
  64. X  Find tester for SVR4
  65. X  Comment driver code better.
  66. X  Optimize realtime functions - this has already been done to a partial
  67. Xextent.  Click calculations are now done are read and write time.
  68. X
  69. X
  70. XLong term:
  71. X  Write a graphical notation program based on tclmidi and/or libmidi++.a
  72. XThat was why I rewrote tclmidi, wasn't it?
  73. END_OF_FILE
  74.   if test 748 -ne `wc -c <'tclmidi-2.0/TODO'`; then
  75.     echo shar: \"'tclmidi-2.0/TODO'\" unpacked with wrong size!
  76.   fi
  77.   # end of 'tclmidi-2.0/TODO'
  78. fi
  79. if test -f 'tclmidi-2.0/contrib/Makefile' -a "${1}" != "-c" ; then 
  80.   echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/Makefile'\"
  81. else
  82.   echo shar: Extracting \"'tclmidi-2.0/contrib/Makefile'\" \(106 characters\)
  83.   sed "s/^X//" >'tclmidi-2.0/contrib/Makefile' <<'END_OF_FILE'
  84. XBINDIR=/usr/local/bin
  85. X
  86. XLUCHO=mmet mmap.mt32 playzip mbuild msplit mmerge
  87. X
  88. Xinstall:
  89. X    cp $(LUCHO) $(BINDIR)
  90. END_OF_FILE
  91.   if test 106 -ne `wc -c <'tclmidi-2.0/contrib/Makefile'`; then
  92.     echo shar: \"'tclmidi-2.0/contrib/Makefile'\" unpacked with wrong size!
  93.   fi
  94.   # end of 'tclmidi-2.0/contrib/Makefile'
  95. fi
  96. if test -f 'tclmidi-2.0/contrib/README' -a "${1}" != "-c" ; then 
  97.   echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/README'\"
  98. else
  99.   echo shar: Extracting \"'tclmidi-2.0/contrib/README'\" \(399 characters\)
  100.   sed "s/^X//" >'tclmidi-2.0/contrib/README' <<'END_OF_FILE'
  101. XThis directory contains tclmidi scripts and related programs
  102. Xwritten by others.
  103. X
  104. XThe following were written by Luchezar Georgiev <lucho@midi.tu-varna.bg>
  105. X  mmap.mt32 - converts General MIDI files to Roland MT-32 form
  106. X  mmet - generates a metronome beat with alternating volumes
  107. X  playzip - automatically unzips and plays selected song from an archive
  108. X  mbuild - concatenate and transpose MIDI files
  109. END_OF_FILE
  110.   if test 399 -ne `wc -c <'tclmidi-2.0/contrib/README'`; then
  111.     echo shar: \"'tclmidi-2.0/contrib/README'\" unpacked with wrong size!
  112.   fi
  113.   # end of 'tclmidi-2.0/contrib/README'
  114. fi
  115. if test -f 'tclmidi-2.0/contrib/playzip' -a "${1}" != "-c" ; then 
  116.   echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/playzip'\"
  117. else
  118.   echo shar: Extracting \"'tclmidi-2.0/contrib/playzip'\" \(400 characters\)
  119.   sed "s/^X//" >'tclmidi-2.0/contrib/playzip' <<'END_OF_FILE'
  120. X#!/bin/sh
  121. X
  122. X# uuencoded
  123. X#
  124. X#begin 644 /usr/local/etc/mt32reset
  125. X#,`/`)01`6$G\```'W
  126. X#`
  127. X#end
  128. X
  129. XSingle() {
  130. X    unzip -p $1 $2 2> /dev/null | mplay -quiet
  131. X    if [ "$3" = "-r" ]; then
  132. X        cat /usr/local/etc/mt32reset > /dev/midi0
  133. X    fi
  134. X}
  135. X
  136. Xif [ "$3" = "-s" ]; then
  137. X    Single $1 $2 $4
  138. Xelif [ $# -ge 2 ]; then
  139. X    xargs -i $0 $1 {} -s $3 < $2
  140. Xelse
  141. X    echo "Usage: playzip <archive.zip> <album|{song -s}> [-r]"
  142. X    exit 1
  143. Xfi
  144. Xexit 0
  145. END_OF_FILE
  146.   if test 400 -ne `wc -c <'tclmidi-2.0/contrib/playzip'`; then
  147.     echo shar: \"'tclmidi-2.0/contrib/playzip'\" unpacked with wrong size!
  148.   fi
  149.   chmod +x 'tclmidi-2.0/contrib/playzip'
  150.   # end of 'tclmidi-2.0/contrib/playzip'
  151. fi
  152. if test -f 'tclmidi-2.0/drivers/BSD/midiioctl.h' -a "${1}" != "-c" ; then 
  153.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/BSD/midiioctl.h'\"
  154. else
  155.   echo shar: Extracting \"'tclmidi-2.0/drivers/BSD/midiioctl.h'\" \(392 characters\)
  156.   sed "s/^X//" >'tclmidi-2.0/drivers/BSD/midiioctl.h' <<'END_OF_FILE'
  157. X#define MRESET    _IO('m', 0x01)
  158. X#define MDRAIN    _IO('m', 0x02)
  159. X#define MFLUSH    _IO('m', 0x03)
  160. X#define MGPLAYQ    _IOR('m', 0x04, int)
  161. X#define MGRECQ    _IOR('m', 0x05, int)
  162. X#define MSDIVISION    _IOW('m', 0x06, int)
  163. X#define MGDIVISION    _IOR('m', 0x07, int)
  164. X#define MGQAVAIL    _IOR('m', 0x08, int)
  165. X#define MASYNC    _IOW('m', 0x09, int)
  166. X#define MTHRU    _IOW('m', 0x0a, int)
  167. X#define MRECONPLAY    _IOW('m', 0x0b, int)
  168. END_OF_FILE
  169.   if test 392 -ne `wc -c <'tclmidi-2.0/drivers/BSD/midiioctl.h'`; then
  170.     echo shar: \"'tclmidi-2.0/drivers/BSD/midiioctl.h'\" unpacked with wrong size!
  171.   fi
  172.   # end of 'tclmidi-2.0/drivers/BSD/midiioctl.h'
  173. fi
  174. if test -f 'tclmidi-2.0/drivers/LINUX/midiconf.c' -a "${1}" != "-c" ; then 
  175.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/LINUX/midiconf.c'\"
  176. else
  177.   echo shar: Extracting \"'tclmidi-2.0/drivers/LINUX/midiconf.c'\" \(451 characters\)
  178.   sed "s/^X//" >'tclmidi-2.0/drivers/LINUX/midiconf.c' <<'END_OF_FILE'
  179. X#include <linux/types.h>
  180. X#include <linux/time.h>
  181. X#include <linux/timer.h>
  182. X#include <linux/midi.h>
  183. X
  184. X/*
  185. X * This is where you configure the MPU401 devices.
  186. X * Define NMIDI to be the number of MPU401 devices you have installed.
  187. X * And add an entry to the midi_conf array describing each
  188. X * device's I/O addr and IRQ number.
  189. X */
  190. X#define NMIDI 1
  191. Xint NumMidi = NMIDI;
  192. Xstruct midi_config midi_conf[NMIDI] =
  193. X    {{0x300, 5}};
  194. Xstruct midi_softc midi_sc[NMIDI];
  195. END_OF_FILE
  196.   if test 451 -ne `wc -c <'tclmidi-2.0/drivers/LINUX/midiconf.c'`; then
  197.     echo shar: \"'tclmidi-2.0/drivers/LINUX/midiconf.c'\" unpacked with wrong size!
  198.   fi
  199.   # end of 'tclmidi-2.0/drivers/LINUX/midiconf.c'
  200. fi
  201. if test -f 'tclmidi-2.0/drivers/SVR4/Makefile' -a "${1}" != "-c" ; then 
  202.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Makefile'\"
  203. else
  204.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Makefile'\" \(574 characters\)
  205.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Makefile' <<'END_OF_FILE'
  206. X# I've taken my best guess at how to include the extra module file,
  207. X# quad.c.  There might be a better way to do this than using "ld -r"
  208. XCONF = /etc/conf/bin
  209. X
  210. Xall: Driver.o
  211. X
  212. XDriver.o: midi.o quad.o
  213. X    -rm Driver.o
  214. X    ld -r -o Driver.o midi.o quad.o
  215. X
  216. Xinstall: Driver.o Space.c Master System Node Name
  217. X    cp midi.h /usr/include/sys
  218. X    chown bin.bin /usr/include/sys/midi.h
  219. X    chmod 444 /usr/include/sys/midi.h
  220. X    $(CONF)/idinstall -kae midi
  221. X    $(CONF)/idmknod
  222. X    $(CONF)/idbuild
  223. X
  224. Xupdate: Driver.o Space.c Master System Node Name
  225. X    $(CONF)/idinstall -kue midi
  226. X    $(CONF)/idmknod
  227. X    $(CONF)/idbuild
  228. END_OF_FILE
  229.   if test 574 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Makefile'`; then
  230.     echo shar: \"'tclmidi-2.0/drivers/SVR4/Makefile'\" unpacked with wrong size!
  231.   fi
  232.   # end of 'tclmidi-2.0/drivers/SVR4/Makefile'
  233. fi
  234. if test -f 'tclmidi-2.0/drivers/SVR4/Master' -a "${1}" != "-c" ; then 
  235.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Master'\"
  236. else
  237.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Master'\" \(33 characters\)
  238.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Master' <<'END_OF_FILE'
  239. Xmidi    Iocrwip    icH    midi    0    0    0    4    -1
  240. END_OF_FILE
  241.   if test 33 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Master'`; then
  242.     echo shar: \"'tclmidi-2.0/drivers/SVR4/Master'\" unpacked with wrong size!
  243.   fi
  244.   # end of 'tclmidi-2.0/drivers/SVR4/Master'
  245. fi
  246. if test -f 'tclmidi-2.0/drivers/SVR4/Name' -a "${1}" != "-c" ; then 
  247.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Name'\"
  248. else
  249.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Name'\" \(59 characters\)
  250.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Name' <<'END_OF_FILE'
  251. Xmidi    Midi driver for MPU401 compatible boards in UART mode
  252. END_OF_FILE
  253.   if test 59 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Name'`; then
  254.     echo shar: \"'tclmidi-2.0/drivers/SVR4/Name'\" unpacked with wrong size!
  255.   fi
  256.   # end of 'tclmidi-2.0/drivers/SVR4/Name'
  257. fi
  258. if test -f 'tclmidi-2.0/drivers/SVR4/Node' -a "${1}" != "-c" ; then 
  259.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Node'\"
  260. else
  261.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Node'\" \(45 characters\)
  262.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Node' <<'END_OF_FILE'
  263. Xmidi    midi0    c    0
  264. Xmidi    midi1    c    1
  265. Xmidi    midi2    c    2
  266. END_OF_FILE
  267.   if test 45 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Node'`; then
  268.     echo shar: \"'tclmidi-2.0/drivers/SVR4/Node'\" unpacked with wrong size!
  269.   fi
  270.   # end of 'tclmidi-2.0/drivers/SVR4/Node'
  271. fi
  272. if test -f 'tclmidi-2.0/drivers/SVR4/README' -a "${1}" != "-c" ; then 
  273.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/README'\"
  274. else
  275.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/README'\" \(865 characters\)
  276.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/README' <<'END_OF_FILE'
  277. X  This is a SVR4 version of my MPU401 driver.  This driver is based
  278. Xon the BSD386 driver, but with many changes.
  279. X  I used to have access to a machine running ESIX at work, and
  280. Xat one point this driver would compile, but numerous changes have
  281. Xbeen made since I've lost access to this machine.  So all I can
  282. Xreally say, is it is probably fairly close to compling.
  283. X  I'm definitely interesting in finding people to test it and debug
  284. Xit.  Please take a look the the PROBLEMS file and see if you can help
  285. Xme get this driver working.
  286. X  I'm not positive about the install proceedure, but we'll give it
  287. Xa try.
  288. X
  289. X  + edit the System file.  There should be a line for each
  290. XMPU401 device.  See sdevice(4) for format information.  The MPU401s
  291. Xonly use two IO ports, so the 8th field should be 1 greater than
  292. Xthe 7th.
  293. X
  294. X  + make and make install
  295. X
  296. X  + Now just shutdown and reboot
  297. END_OF_FILE
  298.   if test 865 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/README'`; then
  299.     echo shar: \"'tclmidi-2.0/drivers/SVR4/README'\" unpacked with wrong size!
  300.   fi
  301.   # end of 'tclmidi-2.0/drivers/SVR4/README'
  302. fi
  303. if test -f 'tclmidi-2.0/drivers/SVR4/Space.c' -a "${1}" != "-c" ; then 
  304.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Space.c'\"
  305. else
  306.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Space.c'\" \(631 characters\)
  307.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Space.c' <<'END_OF_FILE'
  308. X#include "config.h"
  309. X#include "sys/param.h"
  310. X#include "sys/types.h"
  311. X#include "sys/signal.h"
  312. X#include "sys/errno.h"
  313. X#include "sys/file.h"
  314. X#include "sys/poll.h"
  315. X#include "sys/midi.h"
  316. X
  317. Xint NumMidi = MIDI_UNITS;
  318. Xstruct midi_softc midi_sc[MIDI_UNITS];
  319. X
  320. Xint midi_addrs[MIDI_UNITS] = {
  321. X#ifdef MIDI_0_SIOA
  322. XMIDI_0_SIOA
  323. X#endif
  324. X#ifdef MIDI_1_SIOA
  325. X, MIDI_1_SIOA
  326. X#endif
  327. X#ifdef MIDI_2_SIOA
  328. X, MIDI_2_SIOA
  329. X#endif
  330. X#ifdef MIDI_3_SIOA
  331. X, MIDI_3_SIOA
  332. X#endif
  333. X};
  334. X
  335. Xint midi_intrs[MIDI_UNITS] = {
  336. X#ifdef MIDI_0_VECT
  337. XMIDI_0_VECT
  338. X#endif
  339. X#ifdef MIDI_1_VECT
  340. X, MIDI_1_VECT
  341. X#endif
  342. X#ifdef MIDI_2_VECT
  343. X, MIDI_2_VECT
  344. X#endif
  345. X#ifdef MIDI_3_VECT
  346. X, MIDI_3_VECT
  347. X#endif
  348. X};
  349. END_OF_FILE
  350.   if test 631 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Space.c'`; then
  351.     echo shar: \"'tclmidi-2.0/drivers/SVR4/Space.c'\" unpacked with wrong size!
  352.   fi
  353.   # end of 'tclmidi-2.0/drivers/SVR4/Space.c'
  354. fi
  355. if test -f 'tclmidi-2.0/drivers/SVR4/System' -a "${1}" != "-c" ; then 
  356.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/System'\"
  357. else
  358.   echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/System'\" \(27 characters\)
  359.   sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/System' <<'END_OF_FILE'
  360. Xmidi    Y    1    4    1    5    300    301    0    0
  361. END_OF_FILE
  362.   if test 27 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/System'`; then
  363.     echo shar: \"'tclmidi-2.0/drivers/SVR4/System'\" unpacked with wrong size!
  364.   fi
  365.   # end of 'tclmidi-2.0/drivers/SVR4/System'
  366. fi
  367. if test -f 'tclmidi-2.0/drivers/man/Makefile' -a "${1}" != "-c" ; then 
  368.   echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/man/Makefile'\"
  369. else
  370.   echo shar: Extracting \"'tclmidi-2.0/drivers/man/Makefile'\" \(366 characters\)
  371.   sed "s/^X//" >'tclmidi-2.0/drivers/man/Makefile' <<'END_OF_FILE'
  372. X#
  373. X# This is the command to format the man pages
  374. X#
  375. XROFF = groff -mdoc -Tascii
  376. X
  377. X#
  378. X# This is where you want the man pages to go
  379. X#
  380. XMANPATH = /usr/local/man
  381. X
  382. XMAN4 = midi.4
  383. X
  384. XMAN4COOKED = midi.0
  385. X
  386. X.SUFFIXES: .0 .4
  387. X
  388. Xinstall-raw:
  389. X    cp $(MAN4) $(MANPATH)/man4
  390. X
  391. Xinstall-cooked: $(MAN4COOKED)
  392. X    cp $(MAN4COOKED) $(MANPATH)/cat4
  393. X
  394. Xclean:
  395. X    rm -f $(MAN4COOKED)
  396. X
  397. X.4.0:
  398. X    $(ROFF) $< > $@
  399. END_OF_FILE
  400.   if test 366 -ne `wc -c <'tclmidi-2.0/drivers/man/Makefile'`; then
  401.     echo shar: \"'tclmidi-2.0/drivers/man/Makefile'\" unpacked with wrong size!
  402.   fi
  403.   # end of 'tclmidi-2.0/drivers/man/Makefile'
  404. fi
  405. if test -f 'tclmidi-2.0/events/AllEvents.h' -a "${1}" != "-c" ; then 
  406.   echo shar: Will not clobber existing file \"'tclmidi-2.0/events/AllEvents.h'\"
  407. else
  408.   echo shar: Extracting \"'tclmidi-2.0/events/AllEvents.h'\" \(717 characters\)
  409.   sed "s/^X//" >'tclmidi-2.0/events/AllEvents.h' <<'END_OF_FILE'
  410. X#ifndef ALLEVENTS_H
  411. X#define ALLEVENTS_H
  412. X#include "Event.h"
  413. X#include "NormalEvent.h"
  414. X#include "Note.h"
  415. X#include "NoteOff.h"
  416. X#include "NoteOn.h"
  417. X#include "KeyPressure.h"
  418. X#include "Parameter.h"
  419. X#include "Program.h"
  420. X#include "ChanPressure.h"
  421. X#include "PitchWheel.h"
  422. X#include "SystemExcl.h"
  423. X#include "MetaEvent.h"
  424. X#include "MetaSeqNum.h"
  425. X#include "MetaText.h"
  426. X#include "MetaCopy.h"
  427. X#include "MetaSeqName.h"
  428. X#include "MetaInstName.h"
  429. X#include "MetaLyric.h"
  430. X#include "MetaMarker.h"
  431. X#include "MetaCue.h"
  432. X#include "MetaChanPrefix.h"
  433. X#include "MetaPortNum.h"
  434. X#include "MetaEOT.h"
  435. X#include "MetaTempo.h"
  436. X#include "MetaSMPTE.h"
  437. X#include "MetaTime.h"
  438. X#include "MetaKey.h"
  439. X#include "MetaSeqSpec.h"
  440. X#include "MetaUnknown.h"
  441. X
  442. X#endif
  443. END_OF_FILE
  444.   if test 717 -ne `wc -c <'tclmidi-2.0/events/AllEvents.h'`; then
  445.     echo shar: \"'tclmidi-2.0/events/AllEvents.h'\" unpacked with wrong size!
  446.   fi
  447.   # end of 'tclmidi-2.0/events/AllEvents.h'
  448. fi
  449. if test -f 'tclmidi-2.0/events/EventUtil.h' -a "${1}" != "-c" ; then 
  450.   echo shar: Will not clobber existing file \"'tclmidi-2.0/events/EventUtil.h'\"
  451. else
  452.   echo shar: Extracting \"'tclmidi-2.0/events/EventUtil.h'\" \(270 characters\)
  453.   sed "s/^X//" >'tclmidi-2.0/events/EventUtil.h' <<'END_OF_FILE'
  454. X#ifndef EVENTUTIL_H
  455. X#define EVENTUTIL_H
  456. X
  457. X#include "Event.h"
  458. X
  459. Xextern Event *ReadEventFromSMFTrack(SMFTrack &track, long &last_t,
  460. X    const char *&errstr);
  461. Xextern int WriteEventToSMFTrack(SMFTrack &track, long &last_t,
  462. X    const Event *event, const char *&errstr);
  463. X#endif
  464. END_OF_FILE
  465.   if test 270 -ne `wc -c <'tclmidi-2.0/events/EventUtil.h'`; then
  466.     echo shar: \"'tclmidi-2.0/events/EventUtil.h'\" unpacked with wrong size!
  467.   fi
  468.   # end of 'tclmidi-2.0/events/EventUtil.h'
  469. fi
  470. if test -f 'tclmidi-2.0/man/midifree.n' -a "${1}" != "-c" ; then 
  471.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midifree.n'\"
  472. else
  473.   echo shar: Extracting \"'tclmidi-2.0/man/midifree.n'\" \(534 characters\)
  474.   sed "s/^X//" >'tclmidi-2.0/man/midifree.n' <<'END_OF_FILE'
  475. X.Dd January 30, 1994
  476. X.Dt MIDIFREE N
  477. X.Os
  478. X.Sh NAME
  479. X.Nm midifree
  480. X.Nd "tclmidi command to free the space used by a MIDI song"
  481. X.Sh SYNOPSIS
  482. X.Nm
  483. X.Ar MidiID
  484. X.Sh DESCRIPTION
  485. X.Nm
  486. Xis a
  487. X.Xr tclmidi 1
  488. Xcommand that
  489. Xfrees the space used by a
  490. X\%MIDI song created from a previous
  491. Xcall to
  492. X.Xr midiread n
  493. Xor
  494. X.Xr midimake n .
  495. XThis command takes one argument, which
  496. Xis the descriptor of a \%MIDI song.
  497. X.Sh RETURN VALUES
  498. X.Nm
  499. Xdoes not return anything.
  500. X.Sh SEE ALSO
  501. X.Xr tclmidi 1 ,
  502. X.Xr midiread n ,
  503. X.Xr midimake n
  504. X.Sh AUTHOR
  505. XMike Durian - durian@boogie.com
  506. END_OF_FILE
  507.   if test 534 -ne `wc -c <'tclmidi-2.0/man/midifree.n'`; then
  508.     echo shar: \"'tclmidi-2.0/man/midifree.n'\" unpacked with wrong size!
  509.   fi
  510.   # end of 'tclmidi-2.0/man/midifree.n'
  511. fi
  512. if test -f 'tclmidi-2.0/man/midimake.n' -a "${1}" != "-c" ; then 
  513.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midimake.n'\"
  514. else
  515.   echo shar: Extracting \"'tclmidi-2.0/man/midimake.n'\" \(735 characters\)
  516.   sed "s/^X//" >'tclmidi-2.0/man/midimake.n' <<'END_OF_FILE'
  517. X.Dd January 30, 1994
  518. X.Dt MIDIMAKE N
  519. X.Os
  520. X.Sh NAME
  521. X.Nm midimake
  522. X.Nd "tclmidi command to create an empty MIDI song"
  523. X.Sh SYNOPSIS
  524. X.Nm
  525. X.Sh DESCRIPTION
  526. X.Nm
  527. Xis a
  528. X.Xr tclmidi 1
  529. Xcommand that creates an empty \%MIDI song
  530. Xfor use by other
  531. X.Xr tclmidi 1
  532. Xcommands.
  533. XBy default the \%MIDI
  534. Xsong is created with 0
  535. Xtracks allocated, the format is type zero and the division
  536. Xis 120.
  537. XThese defaults can then be changed with
  538. Xthe
  539. X.Xr midiconfig n
  540. Xcommand.
  541. X.Pp
  542. XSince
  543. X.Nm
  544. Xallocates space for the \%MIDI
  545. Xsong,
  546. X.Xr midifree n
  547. Xshould be used
  548. Xwhen the file is no longer needed.
  549. X.Sh RETURN VALUES
  550. X.Nm
  551. Xreturns a
  552. X\%MIDI song descriptor
  553. Xfor use by other
  554. X.Xr tclmidi 1
  555. Xcommands.
  556. X.Sh SEE ALSO
  557. X.Xr tclmidi 1 ,
  558. X.Xr midiconfig n
  559. X.Sh AUTHOR
  560. XMike Durian - durian@boogie.com
  561. END_OF_FILE
  562.   if test 735 -ne `wc -c <'tclmidi-2.0/man/midimake.n'`; then
  563.     echo shar: \"'tclmidi-2.0/man/midimake.n'\" unpacked with wrong size!
  564.   fi
  565.   # end of 'tclmidi-2.0/man/midimake.n'
  566. fi
  567. if test -f 'tclmidi-2.0/man/midiplay.n' -a "${1}" != "-c" ; then 
  568.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiplay.n'\"
  569. else
  570.   echo shar: Extracting \"'tclmidi-2.0/man/midiplay.n'\" \(1150 characters\)
  571.   sed "s/^X//" >'tclmidi-2.0/man/midiplay.n' <<'END_OF_FILE'
  572. X.Dd January 30, 1994
  573. X.Dt MIDIPLAY N
  574. X.Os
  575. X.Sh NAME
  576. X.Nm midiplay
  577. X.Nd "tclmidi command to play a MIDI song"
  578. X.Sh SYNOPSIS
  579. X.Nm
  580. X.Ar MidiID
  581. X.Op repeat
  582. X.Sh DESCRIPTION
  583. X.Nm
  584. Xis a
  585. X.Xr tclmidi 1
  586. Xcommand that plays a \%MIDI
  587. Xsong through the \%MIDI device
  588. Xif possible.
  589. XCurrently, only MPU-401 compatible cards in UART mode are
  590. Xsupported.
  591. XA device driver for the MPU-401 is included with this
  592. Xrelease for the following architectures:
  593. X.Bl -item -offset indent -compact
  594. X.It
  595. XBSD/386
  596. X.It
  597. X386BSD and variants
  598. X.It
  599. XSVR4
  600. X.It
  601. XLinux
  602. X.El
  603. X.Pp
  604. XThe first argument to
  605. X.Nm
  606. Xis a \%MIDI song descriptor as returned by
  607. X.Xr midimake n
  608. Xor
  609. X.Xr midiread n .
  610. XThere may also be an optional second argument,
  611. X``repeat.''
  612. XIf ``repeat'' is specified, the song will replay once
  613. Xthe end is reached.
  614. X.Sh RETURN VALUES
  615. X.Nm
  616. Xreturns immediately with
  617. Xthe value 1 if the song could be played
  618. Xor 0 if there is no \%MIDI device available.
  619. X.Xr midistop n
  620. Xmust be used to stop playing of the song
  621. Xand
  622. X.Xr midiwait n
  623. Xcan be used to block until the song reaches
  624. Xthe end.
  625. X.Sh SEE ALSO
  626. X.Xr tclmidi 1 ,
  627. X.Xr midiread n ,
  628. X.Xr midimake n ,
  629. X.Xr midistop n ,
  630. X.Xr midiwait n
  631. X.Sh AUTHOR
  632. XMike Durian - durian@boogie.com
  633. END_OF_FILE
  634.   if test 1150 -ne `wc -c <'tclmidi-2.0/man/midiplay.n'`; then
  635.     echo shar: \"'tclmidi-2.0/man/midiplay.n'\" unpacked with wrong size!
  636.   fi
  637.   # end of 'tclmidi-2.0/man/midiplay.n'
  638. fi
  639. if test -f 'tclmidi-2.0/man/midiput.n' -a "${1}" != "-c" ; then 
  640.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiput.n'\"
  641. else
  642.   echo shar: Extracting \"'tclmidi-2.0/man/midiput.n'\" \(692 characters\)
  643.   sed "s/^X//" >'tclmidi-2.0/man/midiput.n' <<'END_OF_FILE'
  644. X.Dd January 30, 1994
  645. X.Dt MIDIPUT N
  646. X.Os
  647. X.Sh NAME
  648. X.Nm midiput
  649. X.Nd "tclmidi command to insert an event in a MIDI song"
  650. X.Sh SYNOPSIS
  651. X.Nm
  652. X.Ar MidiID
  653. X.Ar track
  654. X.Ar event
  655. X.Sh DESCRIPTION
  656. X.Nm
  657. Xis a
  658. X.Xr tclmidi 1
  659. Xcommand that
  660. Xinserts an event in a track
  661. Xof a \%MIDI song.
  662. XThe first argument is a \%MIDI song descriptor
  663. Xas returned by
  664. X.Xr midimake n
  665. Xor
  666. X.Xr midiread n .
  667. XThe second argument is the track in the \%MIDI song.
  668. XThe third argument is the event to insert.
  669. XSee
  670. X.Xr midievents n ,
  671. Xfor a description of \%MIDI events.
  672. X.Sh RETURN VALUES
  673. X.Nm
  674. Xreturns nothing.
  675. X.Sh SEE ALSO
  676. X.Xr tclmidi 1 ,
  677. X.Xr midiread n ,
  678. X.Xr midimake n ,
  679. X.Xr midiget n ,
  680. X.Xr midievents n
  681. X.Sh AUTHOR
  682. XMike Durian - durian@boogie.com
  683. END_OF_FILE
  684.   if test 692 -ne `wc -c <'tclmidi-2.0/man/midiput.n'`; then
  685.     echo shar: \"'tclmidi-2.0/man/midiput.n'\" unpacked with wrong size!
  686.   fi
  687.   # end of 'tclmidi-2.0/man/midiput.n'
  688. fi
  689. if test -f 'tclmidi-2.0/man/midiread.n' -a "${1}" != "-c" ; then 
  690.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiread.n'\"
  691. else
  692.   echo shar: Extracting \"'tclmidi-2.0/man/midiread.n'\" \(824 characters\)
  693.   sed "s/^X//" >'tclmidi-2.0/man/midiread.n' <<'END_OF_FILE'
  694. X.Dd Januay 30, 1994
  695. X.Dt MIDIREAD N
  696. X.Os
  697. X.Sh NAME
  698. X.Nm midiread
  699. X.Nd "tclmidi command to read a MIDI song from a Standard MIDI File"
  700. X.Sh SYNOPSIS
  701. X.Nm
  702. X.Ar FileID
  703. X.Sh DESCRIPTION
  704. X.Nm
  705. Xis a
  706. X.Xr tclmidi 1
  707. Xcommand that reads a Standard \%MIDI File
  708. Xand converts it to a \%MIDI song for use by other
  709. X.Xr tclmidi 1
  710. Xcommands.
  711. X.Pp
  712. X.Nm
  713. Xtakes one argument that specifies a file
  714. Xdescriptor from which to read the Standard
  715. X\%MIDI File.
  716. XThis argument should be a value returned by
  717. Xthe
  718. X.Xr open n
  719. Xtcl command, or
  720. X``stdin.''
  721. X.Pp
  722. XSince
  723. X.Nm
  724. Xallocates space for the \%MIDI song,
  725. X.Xr midifree n
  726. Xshould be used when the file is no longer needed.
  727. X.Sh RETURN VALUES
  728. X.Nm
  729. Xreturns a \%MIDI song descriptor that may be used
  730. Xby other
  731. X.Xr tclmidi 1
  732. Xcommands.
  733. X.Sh SEE ALSO
  734. X.Xr tclmidi 1 ,
  735. X.Xr open n ,
  736. X.Xr midifree n
  737. X.Sh AUTHOR
  738. XMike Durian - durian@boogie.com
  739. END_OF_FILE
  740.   if test 824 -ne `wc -c <'tclmidi-2.0/man/midiread.n'`; then
  741.     echo shar: \"'tclmidi-2.0/man/midiread.n'\" unpacked with wrong size!
  742.   fi
  743.   # end of 'tclmidi-2.0/man/midiread.n'
  744. fi
  745. if test -f 'tclmidi-2.0/man/midirewind.n' -a "${1}" != "-c" ; then 
  746.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midirewind.n'\"
  747. else
  748.   echo shar: Extracting \"'tclmidi-2.0/man/midirewind.n'\" \(810 characters\)
  749.   sed "s/^X//" >'tclmidi-2.0/man/midirewind.n' <<'END_OF_FILE'
  750. X.Dd January 30, 1994
  751. X.Dt MIDIREWIND N
  752. X.Os
  753. X.Sh NAME
  754. X.Nm midirewind
  755. X.Nd "tclmidi command to reset a MIDI song pointer to the beginning"
  756. X.Sh SYNOPSIS
  757. X.Nm
  758. X.Ar mfileId
  759. X.Op track
  760. X.Sh DESCRIPTION
  761. X.Nm
  762. Xis a
  763. X.Xr tclmidi 1
  764. Xcommand that
  765. Xsets the internal place keeper of
  766. Xa \%MIDI song to the beginning.
  767. XThe first argument is a \%MIDI song descriptor
  768. Xas returned by
  769. X.Xr midimake n
  770. Xor
  771. X.Xr midiread n .
  772. XAn optional second argument may also be specified to
  773. Xrewind only a specific track.
  774. XThis argument should be a track number.
  775. XWithout a second argument, all tracks in the \%MIDI song
  776. Xare rewound.
  777. X.Pp
  778. X.Nm
  779. Xaffects all future calls to
  780. X.Xr midiget n
  781. Xfor the song.
  782. X.Sh RETURN VALUES
  783. X.Nm
  784. Xdoes not return anything.
  785. X.Sh SEE ALSO
  786. X.Xr tclm 1 ,
  787. X.Xr midiread n ,
  788. X.Xr midimake n ,
  789. X.Xr midiget n
  790. X.Sh AUTHOR
  791. XMike Durian - durian@boogie.com
  792. END_OF_FILE
  793.   if test 810 -ne `wc -c <'tclmidi-2.0/man/midirewind.n'`; then
  794.     echo shar: \"'tclmidi-2.0/man/midirewind.n'\" unpacked with wrong size!
  795.   fi
  796.   # end of 'tclmidi-2.0/man/midirewind.n'
  797. fi
  798. if test -f 'tclmidi-2.0/man/midisplit.n' -a "${1}" != "-c" ; then 
  799.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midisplit.n'\"
  800. else
  801.   echo shar: Extracting \"'tclmidi-2.0/man/midisplit.n'\" \(1077 characters\)
  802.   sed "s/^X//" >'tclmidi-2.0/man/midisplit.n' <<'END_OF_FILE'
  803. X.Dd January 30, 1994
  804. X.Dt MIDISPLIT N
  805. X.Os
  806. X.Sh NAME
  807. X.Nm midisplit
  808. X.Nd "tclmidi command to split a track into a meta track and an other track"
  809. X.Sh SYNOPSIS
  810. X.Nm
  811. X.Pf { Ar srcMidiId srcTrack Ns }
  812. X.Pf { Ar metaMidiID metaTrack Ns }
  813. X.Pf { Ar otherMidiID otherTrack Ns }
  814. X.Sh DESCRIPTION
  815. X.Nm
  816. Xis a
  817. X.Xr tclmidi 1
  818. Xcommand that
  819. Xsplits one track into two tracks.
  820. XThe first of the resulting tracks will contain
  821. Xonly meta events, while the second will
  822. Xcontain all other events.
  823. XBoth tracks will be terminated with a MetaEndOfTrack
  824. Xevent.
  825. X.Pp
  826. XThe first argument is a list that contains the \%MIDI
  827. Xsong descriptor of the source track and the track number
  828. Xin that song.
  829. XThe second argument is a similar list for the track where
  830. Xmeta events should go, and the third argument is a list
  831. Xdescribing where the remaining events should go.
  832. X.Pp
  833. XThe \%MIDI song descriptors
  834. Xshould be values returned by either
  835. X.Xr midiread n
  836. Xor
  837. X.Xr midimake n .
  838. X.Sh RETURN VALUES
  839. X.Nm
  840. Xreturns nothing.
  841. X.Sh SEE ALSO
  842. X.Xr tclmidi 1 ,
  843. X.Xr midiread n ,
  844. X.Xr midimake n ,
  845. X.Xr midimerge n
  846. X.Sh AUTHOR
  847. XMike Durian - durian@boogie.com
  848. END_OF_FILE
  849.   if test 1077 -ne `wc -c <'tclmidi-2.0/man/midisplit.n'`; then
  850.     echo shar: \"'tclmidi-2.0/man/midisplit.n'\" unpacked with wrong size!
  851.   fi
  852.   # end of 'tclmidi-2.0/man/midisplit.n'
  853. fi
  854. if test -f 'tclmidi-2.0/man/midistop.n' -a "${1}" != "-c" ; then 
  855.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midistop.n'\"
  856. else
  857.   echo shar: Extracting \"'tclmidi-2.0/man/midistop.n'\" \(535 characters\)
  858.   sed "s/^X//" >'tclmidi-2.0/man/midistop.n' <<'END_OF_FILE'
  859. X.Dd January 30, 1994
  860. X.Dt MIDISTOP N
  861. X.Os
  862. X.Sh NAME
  863. X.Nm midistop
  864. X.Nd "tclmidi command to stop playing or recording a MIDI song"
  865. X.Sh SYNOPSIS
  866. X.Nm
  867. X.Sh DESCRIPTION
  868. X.Nm
  869. Xis a
  870. X.Xr tclmidi 1
  871. Xcommand that stops the playing or
  872. Xrecording of a \%MIDI song.
  873. X.Nm
  874. Xwill only work on files being played by calling
  875. X.Xr midiplay n
  876. Xor
  877. X.Xr midirecord n .
  878. X.Sh RETURN VALUES
  879. X.Nm
  880. Xreturns 1
  881. Xif it could successfully
  882. Xstop playing or recording, 0 otherwise.
  883. X.Sh SEE ALSO
  884. X.Xr tclmidi 1 ,
  885. X.Xr midiplay n ,
  886. X.Xr midirecord n
  887. X.Sh AUTHOR
  888. XMike Durian - durian@boogie.com
  889. END_OF_FILE
  890.   if test 535 -ne `wc -c <'tclmidi-2.0/man/midistop.n'`; then
  891.     echo shar: \"'tclmidi-2.0/man/midistop.n'\" unpacked with wrong size!
  892.   fi
  893.   # end of 'tclmidi-2.0/man/midistop.n'
  894. fi
  895. if test -f 'tclmidi-2.0/man/midiversion.n' -a "${1}" != "-c" ; then 
  896.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiversion.n'\"
  897. else
  898.   echo shar: Extracting \"'tclmidi-2.0/man/midiversion.n'\" \(339 characters\)
  899.   sed "s/^X//" >'tclmidi-2.0/man/midiversion.n' <<'END_OF_FILE'
  900. X.Dd February 15, 1994
  901. X.Dt MIDIVERSION N
  902. X.Os
  903. X.Sh NAME
  904. X.Nm midiversion
  905. X.Nd "tclmidi command to report the version"
  906. X.Sh SYNOPSIS
  907. X.Nm
  908. X.Sh DESCRIPTION
  909. X.Nm
  910. Xis a
  911. X.Xr tclmidi 1
  912. Xcommand that reports the version that
  913. Xis running.
  914. X.Sh RETURN VALUES
  915. X.Nm
  916. Xreturns the version number.
  917. X.Sh SEE ALSO
  918. X.Xr tclmidi 1
  919. X.Sh AUTHOR
  920. XMike Durian - durian@boogie.com
  921. END_OF_FILE
  922.   if test 339 -ne `wc -c <'tclmidi-2.0/man/midiversion.n'`; then
  923.     echo shar: \"'tclmidi-2.0/man/midiversion.n'\" unpacked with wrong size!
  924.   fi
  925.   # end of 'tclmidi-2.0/man/midiversion.n'
  926. fi
  927. if test -f 'tclmidi-2.0/man/midiwait.n' -a "${1}" != "-c" ; then 
  928.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiwait.n'\"
  929. else
  930.   echo shar: Extracting \"'tclmidi-2.0/man/midiwait.n'\" \(654 characters\)
  931.   sed "s/^X//" >'tclmidi-2.0/man/midiwait.n' <<'END_OF_FILE'
  932. X.Dd January 30, 1994
  933. X.Dt MIDIWAIT N
  934. X.Os
  935. X.Sh NAME
  936. X.Nm midiwait
  937. X.Nd "tclmidi command to block until playing or recording a MIDI song finishes"
  938. X.Sh SYNOPSIS
  939. X.Nm
  940. X.Sh DESCRIPTION
  941. X.Nm
  942. Xis a
  943. X.Xr tclmidi 1
  944. Xcommand that blocks until a \%MIDI song finishes
  945. Xplaying.
  946. X.Nm
  947. Xwill only work on files being played by calling
  948. X.Xr midirecord n
  949. Xwith a play song
  950. Xor
  951. X.Xr midiplay n .
  952. X.Sh RETURN VALUES
  953. X.Nm
  954. Xreturns 1
  955. Xif it could successfully
  956. Xstop playing or recording, 0 otherwise.
  957. X.Sh BUGS
  958. XCare should be taken to avoid calling
  959. X.Nm
  960. Xwhen a song is playing in repeat mode.
  961. X.Sh SEE ALSO
  962. X.Xr tclmidi 1 ,
  963. X.Xr midiplay n ,
  964. X.Xr midirecord n
  965. X.Sh AUTHOR
  966. XMike Durian - durian@boogie.com
  967. END_OF_FILE
  968.   if test 654 -ne `wc -c <'tclmidi-2.0/man/midiwait.n'`; then
  969.     echo shar: \"'tclmidi-2.0/man/midiwait.n'\" unpacked with wrong size!
  970.   fi
  971.   # end of 'tclmidi-2.0/man/midiwait.n'
  972. fi
  973. if test -f 'tclmidi-2.0/man/midiwrite.n' -a "${1}" != "-c" ; then 
  974.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiwrite.n'\"
  975. else
  976.   echo shar: Extracting \"'tclmidi-2.0/man/midiwrite.n'\" \(730 characters\)
  977.   sed "s/^X//" >'tclmidi-2.0/man/midiwrite.n' <<'END_OF_FILE'
  978. X.Dd January 30, 1994
  979. X.Dt MIDIWRITE N
  980. X.Os
  981. X.Sh NAME
  982. X.Nm midiwrite
  983. X.Nd "tclmidi command to write a MIDI song as a Standard MIDI File"
  984. X.Sh SYNOPSIS
  985. X.Nm
  986. X.Ar FileID
  987. X.Ar MidiID
  988. X.Sh DESCRIPTION
  989. X.Nm
  990. Xis a
  991. X.Xr tclmidi 1
  992. Xcommand that writes a \%MIDI song to
  993. Xan open tcl file descriptor in the form of a Standard \%MIDI File.
  994. XThis command takes two arguments.
  995. XThe first is a tcl file descriptor as returned
  996. Xby the
  997. X.Nm tcl
  998. Xcommand
  999. X.Xr open n ,
  1000. Xthe string ``stdout'' or ``stderr.''
  1001. XThe second argument is a \%MIDI song descriptor
  1002. Xas returned by
  1003. X.Xr midimake n
  1004. Xor
  1005. X.Xr midiread n .
  1006. X.Sh RETURN VALUES
  1007. X.Nm
  1008. Xdoes not return anything.
  1009. X.Sh SEE ALSO
  1010. X.Xr tclmidi 1 ,
  1011. X.Xr open n ,
  1012. X.Xr midiread n ,
  1013. X.Xr midimake n
  1014. X.Sh AUTHOR
  1015. XMike Durian - durian@boogie.com
  1016. END_OF_FILE
  1017.   if test 730 -ne `wc -c <'tclmidi-2.0/man/midiwrite.n'`; then
  1018.     echo shar: \"'tclmidi-2.0/man/midiwrite.n'\" unpacked with wrong size!
  1019.   fi
  1020.   # end of 'tclmidi-2.0/man/midiwrite.n'
  1021. fi
  1022. if test -f 'tclmidi-2.0/man/midtotcl.1' -a "${1}" != "-c" ; then 
  1023.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midtotcl.1'\"
  1024. else
  1025.   echo shar: Extracting \"'tclmidi-2.0/man/midtotcl.1'\" \(893 characters\)
  1026.   sed "s/^X//" >'tclmidi-2.0/man/midtotcl.1' <<'END_OF_FILE'
  1027. X.Dd June 8, 1994
  1028. X.Dt MIDTOTCL 1
  1029. X.Os
  1030. X.Sh NAME
  1031. X.Nm midtotcl
  1032. X.Nd "create the tclmidi commands that will generate a MIDI file"
  1033. X.Sh SYNOPSIS
  1034. X.Nm
  1035. X.Op Fl playable
  1036. X.Op filename
  1037. X.Sh DESCRIPTION
  1038. X.Nm
  1039. Xis a
  1040. X.Xr tclmidi 1
  1041. Xscript that prints out the tclmidi commands necessary
  1042. Xto reconstruct a \%MIDI file.
  1043. XThis is useful for editing existing \%MIDI files.
  1044. XBy default,
  1045. X.Nm
  1046. Xadds commands to print the \%MIDI to stdout in
  1047. Xthe form of a Standard Midi File.
  1048. XIf the
  1049. X.Fl playable
  1050. Xoption is specified,
  1051. X.Nm
  1052. Xwill add commands to automatically play the \%MIDI
  1053. Xsong after building it.
  1054. XThe file name may be specified on the command line
  1055. Xor read from stdin.
  1056. XSee
  1057. X.Xr midievents n
  1058. Xfor a discription of the different types of events
  1059. Xand their parameters.
  1060. XA similar script is the
  1061. X.Xr minfo 1
  1062. Xprogram that prints the data in a \%MIDI file.
  1063. X.Sh SEE ALSO
  1064. X.Xr midievents n
  1065. X.Xr minfo 1
  1066. X.Sh AUTHORS
  1067. XMike Durian - durian@boogie.com
  1068. END_OF_FILE
  1069.   if test 893 -ne `wc -c <'tclmidi-2.0/man/midtotcl.1'`; then
  1070.     echo shar: \"'tclmidi-2.0/man/midtotcl.1'\" unpacked with wrong size!
  1071.   fi
  1072.   # end of 'tclmidi-2.0/man/midtotcl.1'
  1073. fi
  1074. if test -f 'tclmidi-2.0/man/minfo.1' -a "${1}" != "-c" ; then 
  1075.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/minfo.1'\"
  1076. else
  1077.   echo shar: Extracting \"'tclmidi-2.0/man/minfo.1'\" \(666 characters\)
  1078.   sed "s/^X//" >'tclmidi-2.0/man/minfo.1' <<'END_OF_FILE'
  1079. X.Dd February 3, 1994
  1080. X.Dt MINFO 1
  1081. X.Os
  1082. X.Sh NAME
  1083. X.Nm minfo
  1084. X.Nd "a tclmidi script to print a MIDI file in human readible form"
  1085. X.Sh SYNOPSIS
  1086. X.Nm
  1087. X.Op filename
  1088. X.Sh DESCRIPTION
  1089. X.Nm
  1090. Xis a
  1091. X.Xr tclmidi 1
  1092. Xscript that prints a \%MIDI file
  1093. Xin a human readible form.
  1094. XThe file name may be specified on the command line
  1095. Xor read from stdin.
  1096. XIt prints out the header data for the \%MIDI file
  1097. X(tracks, division and format) and then lists the
  1098. Xevents for each track in the file.
  1099. XThe events are listed one line per event.
  1100. XSee
  1101. X.Xr midievents n
  1102. Xfor a discription of the different types of events
  1103. Xand their parameters.
  1104. X.Sh SEE ALSO
  1105. X.Xr midievents n
  1106. X.Sh AUTHORS
  1107. XMike Durian - durian@boogie.com
  1108. END_OF_FILE
  1109.   if test 666 -ne `wc -c <'tclmidi-2.0/man/minfo.1'`; then
  1110.     echo shar: \"'tclmidi-2.0/man/minfo.1'\" unpacked with wrong size!
  1111.   fi
  1112.   # end of 'tclmidi-2.0/man/minfo.1'
  1113. fi
  1114. if test -f 'tclmidi-2.0/man/mplay.1' -a "${1}" != "-c" ; then 
  1115.   echo shar: Will not clobber existing file \"'tclmidi-2.0/man/mplay.1'\"
  1116. else
  1117.   echo shar: Extracting \"'tclmidi-2.0/man/mplay.1'\" \(828 characters\)
  1118.   sed "s/^X//" >'tclmidi-2.0/man/mplay.1' <<'END_OF_FILE'
  1119. X.Dd February 3, 1994
  1120. X.Dt MPLAY 1
  1121. X.Os
  1122. X.Sh NAME
  1123. X.Nm mplay
  1124. X.Nd "a tclmidi script to play a MIDI file"
  1125. X.Sh SYNOPSIS
  1126. X.Nm
  1127. X.Op Fl repeat
  1128. X.Op Fl quiet
  1129. X.Op file
  1130. X.Sh DESCRIPTION
  1131. X.Nm
  1132. Xis a
  1133. X.Xr tclmidi 1
  1134. Xscript that plays a \%MIDI file.
  1135. XThe file name may be specified on the command line
  1136. Xor read from stdin.
  1137. XThe options are as follows:
  1138. X.Bl -tag -width Fl repeat
  1139. X.It Fl repeat
  1140. XPlay the file repeatedly.
  1141. XIf not in quiet mode, the playing may be stopped
  1142. Xby pressing the return key.
  1143. XOtherwise the process
  1144. Xmust be killed.
  1145. X.It Fl quiet
  1146. XWith this option
  1147. X.Nm
  1148. Xwill not print out messages or ask for input.
  1149. X.El
  1150. X.Pp
  1151. XSince
  1152. X.Nm
  1153. Xmakes use of the
  1154. X.Xr midiplay n
  1155. X.Xr tclmidi 1
  1156. Xcommand,
  1157. Xthis program will only work
  1158. Xif
  1159. X.Xr tclmidi 1
  1160. Xwas compiled with a device
  1161. Xinterface.
  1162. X.Sh SEE ALSO
  1163. X.Xr tclmidi 1 ,
  1164. X.Xr midiplay n
  1165. X.Sh AUTHORS
  1166. XMike Durian - durian@boogie.com
  1167. END_OF_FILE
  1168.   if test 828 -ne `wc -c <'tclmidi-2.0/man/mplay.1'`; then
  1169.     echo shar: \"'tclmidi-2.0/man/mplay.1'\" unpacked with wrong size!
  1170.   fi
  1171.   # end of 'tclmidi-2.0/man/mplay.1'
  1172. fi
  1173. if test -f 'tclmidi-2.0/midtotcl' -a "${1}" != "-c" ; then 
  1174.   echo shar: Will not clobber existing file \"'tclmidi-2.0/midtotcl'\"
  1175. else
  1176.   echo shar: Extracting \"'tclmidi-2.0/midtotcl'\" \(1229 characters\)
  1177.   sed "s/^X//" >'tclmidi-2.0/midtotcl' <<'END_OF_FILE'
  1178. X#!/usr/local/bin/tclmidi
  1179. Xproc Usage {} {
  1180. X    puts stderr {Usage: midtotcl [-playable] [filename]}
  1181. X}
  1182. X
  1183. Xif {$argc > 3} {
  1184. X    Usage
  1185. X    exit 1
  1186. X}
  1187. X
  1188. Xset playable 0
  1189. Xset fname stdin
  1190. Xset f stdin
  1191. X
  1192. Xfor {set i 0} {$i < $argc} {incr i} {
  1193. X    switch -- [lindex $argv $i] {
  1194. X    "-?" -
  1195. X    "-h" -
  1196. X    "-help" {
  1197. X        Usage
  1198. X        exit 1
  1199. X    }
  1200. X    "-playable" -
  1201. X    "-p" {
  1202. X        set playable 1
  1203. X    }
  1204. X    default {
  1205. X        if {$fname != "stdin"} {
  1206. X            Usage
  1207. X            exit 1
  1208. X        } else {
  1209. X            set fname [lindex $argv $i]
  1210. X            set f [open $fname r]
  1211. X        }
  1212. X    }
  1213. X    }
  1214. X}
  1215. X
  1216. Xset mf [midiread $f]
  1217. Xmidirewind $mf
  1218. X
  1219. Xset config [midiconfig $mf tracks division format]
  1220. Xset tracks [lindex [lindex $config 0] 1]
  1221. Xset division [lindex [lindex $config 1] 1]
  1222. Xset format [lindex [lindex $config 2] 1]
  1223. X
  1224. Xputs {#!/usr/local/bin/tclmidi}
  1225. Xputs "\# tclmidi commands for midi file $fname"
  1226. Xputs ""
  1227. Xputs {set mf [midimake]}
  1228. Xputs "midiconfig \$mf {tracks $tracks} {division $division} {format $format}"
  1229. X
  1230. Xfor {set i 0} {$i < $tracks} {incr i} {
  1231. X    puts ""
  1232. X    puts "\# track $i"
  1233. X    while {[set event [midiget $mf $i next]] != "EOT"} {
  1234. X        puts "midiput \$mf $i {$event}"
  1235. X    }
  1236. X}
  1237. Xputs ""
  1238. Xif {$playable} {
  1239. X    puts {# play song}
  1240. X    puts {midiplay $mf}
  1241. X    puts {midiwait}
  1242. X    puts {midistop}
  1243. X} else {
  1244. X    puts {# write midi file}
  1245. X    puts {midiwrite stdout $mf}
  1246. X}
  1247. Xmidifree $mf
  1248. Xclose $f
  1249. END_OF_FILE
  1250.   if test 1229 -ne `wc -c <'tclmidi-2.0/midtotcl'`; then
  1251.     echo shar: \"'tclmidi-2.0/midtotcl'\" unpacked with wrong size!
  1252.   fi
  1253.   chmod +x 'tclmidi-2.0/midtotcl'
  1254.   # end of 'tclmidi-2.0/midtotcl'
  1255. fi
  1256. if test -f 'tclmidi-2.0/minfo' -a "${1}" != "-c" ; then 
  1257.   echo shar: Will not clobber existing file \"'tclmidi-2.0/minfo'\"
  1258. else
  1259.   echo shar: Extracting \"'tclmidi-2.0/minfo'\" \(649 characters\)
  1260.   sed "s/^X//" >'tclmidi-2.0/minfo' <<'END_OF_FILE'
  1261. X#!/usr/local/bin/tclmidi
  1262. Xif {$argc > 1} {
  1263. X    puts stderr {Usage: minfo [filename]}
  1264. X    exit 1
  1265. X}
  1266. X
  1267. Xif {$argc == 0} {
  1268. X    set fname stdin
  1269. X    set f stdin
  1270. X} else {
  1271. X    set fname [lindex $argv 0]
  1272. X    set f [open $fname r]
  1273. X}
  1274. Xset mf [midiread $f]
  1275. Xmidirewind $mf
  1276. X
  1277. Xset config [midiconfig $mf tracks division format]
  1278. Xset tracks [lindex [lindex $config 0] 1]
  1279. Xset division [lindex [lindex $config 1] 1]
  1280. Xset format [lindex [lindex $config 2] 1]
  1281. X
  1282. Xputs "File: $fname"
  1283. Xputs "Format: $format"
  1284. Xputs "Tracks: $tracks"
  1285. Xputs "Division: $division"
  1286. Xfor {set i 0} {$i < $tracks} {incr i} {
  1287. X    puts ""
  1288. X    puts "Track: $i"
  1289. X    while {[set event [midiget $mf $i next]] != "EOT"} {
  1290. X        puts $event
  1291. X    }
  1292. X}
  1293. END_OF_FILE
  1294.   if test 649 -ne `wc -c <'tclmidi-2.0/minfo'`; then
  1295.     echo shar: \"'tclmidi-2.0/minfo'\" unpacked with wrong size!
  1296.   fi
  1297.   chmod +x 'tclmidi-2.0/minfo'
  1298.   # end of 'tclmidi-2.0/minfo'
  1299. fi
  1300. if test -f 'tclmidi-2.0/mplay' -a "${1}" != "-c" ; then 
  1301.   echo shar: Will not clobber existing file \"'tclmidi-2.0/mplay'\"
  1302. else
  1303.   echo shar: Extracting \"'tclmidi-2.0/mplay'\" \(919 characters\)
  1304.   sed "s/^X//" >'tclmidi-2.0/mplay' <<'END_OF_FILE'
  1305. X#!/usr/local/bin/tclmidi
  1306. Xproc Usage {} {
  1307. X    puts stderr {Usage: mplay [-quiet] [-repeat] [filename]}
  1308. X}
  1309. X
  1310. Xset repeat ""
  1311. Xset quiet 0
  1312. Xset fname stdin
  1313. Xset f stdin
  1314. X
  1315. Xfor {set i 0} {$i < $argc} {incr i} {
  1316. X    switch -- [lindex $argv $i] {
  1317. X    "-?" -
  1318. X    "-h" -
  1319. X    "-help" {
  1320. X        Usage
  1321. X        exit 1
  1322. X    }
  1323. X    "-repeat" {
  1324. X        set repeat repeat
  1325. X    }
  1326. X    "-quiet" {
  1327. X        set quiet 1
  1328. X    }
  1329. X    default {
  1330. X        if {$fname != "stdin"} {
  1331. X            Usage
  1332. X            exit 1
  1333. X        } else {
  1334. X            set fname [lindex $argv $i]
  1335. X            set f [open $fname r]
  1336. X        }
  1337. X    }
  1338. X    }
  1339. X}
  1340. X
  1341. X# can't read key strokes if file is coming from stdin
  1342. Xif {$fname == "stdin"} {
  1343. X    set quiet 1
  1344. X}
  1345. X
  1346. Xif {!$quiet} {
  1347. X    puts "loading, please wait"
  1348. X}
  1349. Xset mf [midiread $f]
  1350. X
  1351. Xif {!$quiet} {
  1352. X    puts "press return to begin playing"
  1353. X    gets stdin
  1354. X}
  1355. Xif {![midiplay $mf $repeat]} {
  1356. X    puts stderr "midiplay command not available"
  1357. X    exit 1
  1358. X}
  1359. Xif {$repeat != "repeat" || $quiet} {
  1360. X    midiwait
  1361. X    midistop
  1362. X} else {
  1363. X    puts "press return to stop playing"
  1364. X    gets stdin
  1365. X    midistop
  1366. X}
  1367. END_OF_FILE
  1368.   if test 919 -ne `wc -c <'tclmidi-2.0/mplay'`; then
  1369.     echo shar: \"'tclmidi-2.0/mplay'\" unpacked with wrong size!
  1370.   fi
  1371.   chmod +x 'tclmidi-2.0/mplay'
  1372.   # end of 'tclmidi-2.0/mplay'
  1373. fi
  1374. if test -f 'tclmidi-2.0/patchlevel.h' -a "${1}" != "-c" ; then 
  1375.   echo shar: Will not clobber existing file \"'tclmidi-2.0/patchlevel.h'\"
  1376. else
  1377.   echo shar: Extracting \"'tclmidi-2.0/patchlevel.h'\" \(86 characters\)
  1378.   sed "s/^X//" >'tclmidi-2.0/patchlevel.h' <<'END_OF_FILE'
  1379. X#ifndef PATCHLEVEL_H
  1380. X#define PATCHLEVEL_H
  1381. Xconst char *TCLMIDI_VERSION = "2.0";
  1382. X#endif
  1383. END_OF_FILE
  1384.   if test 86 -ne `wc -c <'tclmidi-2.0/patchlevel.h'`; then
  1385.     echo shar: \"'tclmidi-2.0/patchlevel.h'\" unpacked with wrong size!
  1386.   fi
  1387.   # end of 'tclmidi-2.0/patchlevel.h'
  1388. fi
  1389. if test -f 'tclmidi-2.0/rb/makefile' -a "${1}" != "-c" ; then 
  1390.   echo shar: Will not clobber existing file \"'tclmidi-2.0/rb/makefile'\"
  1391. else
  1392.   echo shar: Extracting \"'tclmidi-2.0/rb/makefile'\" \(319 characters\)
  1393.   sed "s/^X//" >'tclmidi-2.0/rb/makefile' <<'END_OF_FILE'
  1394. XCC = cc
  1395. XCFLAGS    =    -g
  1396. X
  1397. XOBJS = rb.o list.o
  1398. X
  1399. XMOBJS = librb.a
  1400. X
  1401. Xall: librb.a
  1402. X
  1403. Xlibrb.a: $(OBJS)
  1404. X    ar ru librb.a $(OBJS)
  1405. X    ranlib librb.a
  1406. X    #rm *.o
  1407. X
  1408. Xdepend: 
  1409. X    makedep .
  1410. X
  1411. X.c.o:
  1412. X    $(CC) -c $(CFLAGS) $*.c
  1413. X
  1414. Xclean:
  1415. X    -rm *.o librb.a
  1416. X
  1417. X# +mkdep+ 
  1418. Xlist.o: \
  1419. X          ./list.h \
  1420. X          list.c
  1421. X
  1422. Xrb.o: \
  1423. X          ./rb.h \
  1424. X          rb.c
  1425. X
  1426. END_OF_FILE
  1427.   if test 319 -ne `wc -c <'tclmidi-2.0/rb/makefile'`; then
  1428.     echo shar: \"'tclmidi-2.0/rb/makefile'\" unpacked with wrong size!
  1429.   fi
  1430.   # end of 'tclmidi-2.0/rb/makefile'
  1431. fi
  1432. if test -f 'tclmidi-2.0/smf/Makefile' -a "${1}" != "-c" ; then 
  1433.   echo shar: Will not clobber existing file \"'tclmidi-2.0/smf/Makefile'\"
  1434. else
  1435.   echo shar: Extracting \"'tclmidi-2.0/smf/Makefile'\" \(304 characters\)
  1436.   sed "s/^X//" >'tclmidi-2.0/smf/Makefile' <<'END_OF_FILE'
  1437. XCXX = CC
  1438. XCXX = g++
  1439. XCFLAGS = -g
  1440. XINDIRS = 
  1441. X
  1442. XSMFFILES = SMFUtils.o SMFHead.o SMFTrack.o
  1443. X
  1444. X.SUFFIXES: .C $(.SUFFIXES)
  1445. X
  1446. Xobjs: $(SMFFILES)
  1447. X    touch objs
  1448. X
  1449. X.C.o:
  1450. X    $(CXX) $(CFLAGS) $(INCDIRS) -c -o $@ $<
  1451. X
  1452. Xclean:
  1453. X    -rm *.o objs
  1454. X
  1455. XSMFUtils.o: SMFUtils.h
  1456. XSMFHead.o: SMFHead.h SMFUtils.h
  1457. XSMFTrack.o: SMFTrack.h SMFUtils.h
  1458. END_OF_FILE
  1459.   if test 304 -ne `wc -c <'tclmidi-2.0/smf/Makefile'`; then
  1460.     echo shar: \"'tclmidi-2.0/smf/Makefile'\" unpacked with wrong size!
  1461.   fi
  1462.   # end of 'tclmidi-2.0/smf/Makefile'
  1463. fi
  1464. if test -f 'tclmidi-2.0/song/Makefile' -a "${1}" != "-c" ; then 
  1465.   echo shar: Will not clobber existing file \"'tclmidi-2.0/song/Makefile'\"
  1466. else
  1467.   echo shar: Extracting \"'tclmidi-2.0/song/Makefile'\" \(622 characters\)
  1468.   sed "s/^X//" >'tclmidi-2.0/song/Makefile' <<'END_OF_FILE'
  1469. XCXX = CC
  1470. XCXX = g++
  1471. XCFLAGS = -g
  1472. XINCDIRS = -I../rb -I../events -I../smf
  1473. X
  1474. XSONGFILES = EventTree.o Song.o
  1475. X
  1476. X.SUFFIXES: .C $(.SUFFIXES)
  1477. X
  1478. X.C.o:
  1479. X    $(CXX) $(CFLAGS) $(INCDIRS) -c -o $@ $<
  1480. X
  1481. Xobjs: $(SONGFILES)
  1482. X    touch objs
  1483. X
  1484. Xclean:
  1485. X    -rm *.o objs
  1486. X
  1487. XEventTree.o: EventTree.h ../events/Event.h ../smf/SMFTrack.h \
  1488. X    ../smf/SMFUtils.h ../events/Note.h ../events/NormalEvent.h \
  1489. X    ../events/MetaEOT.h ../events/MetaEvent.h
  1490. XSong.o: Song.h ../events/EventUtil.h ../events/Event.h ../smf/SMFHead.h \
  1491. X    ../smf/SMFUtils.h ../smf/SMFTrack.h EventTree.h ../events/Note.h \
  1492. X    ../events/NormalEvent.h ../events/MetaEOT.h ../events/MetaEvent.h
  1493. END_OF_FILE
  1494.   if test 622 -ne `wc -c <'tclmidi-2.0/song/Makefile'`; then
  1495.     echo shar: \"'tclmidi-2.0/song/Makefile'\" unpacked with wrong size!
  1496.   fi
  1497.   # end of 'tclmidi-2.0/song/Makefile'
  1498. fi
  1499. if test -f 'tclmidi-2.0/song/TODO' -a "${1}" != "-c" ; then 
  1500.   echo shar: Will not clobber existing file \"'tclmidi-2.0/song/TODO'\"
  1501. else
  1502.   echo shar: Extracting \"'tclmidi-2.0/song/TODO'\" \(1 character\)
  1503.   sed "s/^X//" >'tclmidi-2.0/song/TODO' <<'END_OF_FILE'
  1504. X
  1505. END_OF_FILE
  1506.   if test 1 -ne `wc -c <'tclmidi-2.0/song/TODO'`; then
  1507.     echo shar: \"'tclmidi-2.0/song/TODO'\" unpacked with wrong size!
  1508.   fi
  1509.   # end of 'tclmidi-2.0/song/TODO'
  1510. fi
  1511. if test -f 'tclmidi-2.0/tclmAppInit.C' -a "${1}" != "-c" ; then 
  1512.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tclmAppInit.C'\"
  1513. else
  1514.   echo shar: Extracting \"'tclmidi-2.0/tclmAppInit.C'\" \(202 characters\)
  1515.   sed "s/^X//" >'tclmidi-2.0/tclmAppInit.C' <<'END_OF_FILE'
  1516. Xextern "C" {
  1517. X#include <tcl.h>
  1518. X}
  1519. X#include <iostream.h>
  1520. X
  1521. X#include "tclmidi.h"
  1522. X
  1523. Xint
  1524. XTcl_AppInit(Tcl_Interp *interp)
  1525. X{
  1526. X
  1527. X    if (Tcl_Init(interp) != TCL_OK)
  1528. X        return (TCL_ERROR);
  1529. X    return (Tclm_Init(interp));
  1530. X}
  1531. END_OF_FILE
  1532.   if test 202 -ne `wc -c <'tclmidi-2.0/tclmAppInit.C'`; then
  1533.     echo shar: \"'tclmidi-2.0/tclmAppInit.C'\" unpacked with wrong size!
  1534.   fi
  1535.   # end of 'tclmidi-2.0/tclmAppInit.C'
  1536. fi
  1537. if test -f 'tclmidi-2.0/tclmidi.h' -a "${1}" != "-c" ; then 
  1538.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tclmidi.h'\"
  1539. else
  1540.   echo shar: Extracting \"'tclmidi-2.0/tclmidi.h'\" \(433 characters\)
  1541.   sed "s/^X//" >'tclmidi-2.0/tclmidi.h' <<'END_OF_FILE'
  1542. X#ifndef TCLM_H
  1543. X#define TCLM_H
  1544. X
  1545. X#include "TclmInterp.h"
  1546. X
  1547. Xextern int Tclm_Init(Tcl_Interp *interp);
  1548. Xextern int Tclm_PlayInit(Tcl_Interp *interp, TclmInterp *tclm_interp);
  1549. Xextern int Tcl_GetLong(Tcl_Interp *interp, const char *string, long *longPtr);
  1550. Xextern int Tclm_ParseDataByte(Tcl_Interp *interp, const char *str,
  1551. X    unsigned char *val);
  1552. Xextern void Tclm_PrintData(ostream &buf, const unsigned char *data,
  1553. X    long length);
  1554. X#endif
  1555. END_OF_FILE
  1556.   if test 433 -ne `wc -c <'tclmidi-2.0/tclmidi.h'`; then
  1557.     echo shar: \"'tclmidi-2.0/tclmidi.h'\" unpacked with wrong size!
  1558.   fi
  1559.   # end of 'tclmidi-2.0/tclmidi.h'
  1560. fi
  1561. if test -f 'tclmidi-2.0/tests/README' -a "${1}" != "-c" ; then 
  1562.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/README'\"
  1563. else
  1564.   echo shar: Extracting \"'tclmidi-2.0/tests/README'\" \(437 characters\)
  1565.   sed "s/^X//" >'tclmidi-2.0/tests/README' <<'END_OF_FILE'
  1566. X  Don't expect much from these tests.  They're basically just for
  1567. Xmy benefit.  I used them to test the tclmidi commands as I created
  1568. Xthem.  They don't do anything useful like give you a success/failed
  1569. Xmessage.  You must look at the code and figure out if they did the
  1570. Xright thing.
  1571. X  The only reason I'm including them is so people can take a look
  1572. Xat the various syntax for the commands, and see simple examples of
  1573. Xhow to use them.
  1574. X
  1575. Xmike
  1576. END_OF_FILE
  1577.   if test 437 -ne `wc -c <'tclmidi-2.0/tests/README'`; then
  1578.     echo shar: \"'tclmidi-2.0/tests/README'\" unpacked with wrong size!
  1579.   fi
  1580.   # end of 'tclmidi-2.0/tests/README'
  1581. fi
  1582. if test -f 'tclmidi-2.0/tests/copy.test' -a "${1}" != "-c" ; then 
  1583.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/copy.test'\"
  1584. else
  1585.   echo shar: Extracting \"'tclmidi-2.0/tests/copy.test'\" \(275 characters\)
  1586.   sed "s/^X//" >'tclmidi-2.0/tests/copy.test' <<'END_OF_FILE'
  1587. X#!../tclmidi
  1588. Xset mf [midimake]
  1589. Xmidiconfig $mf {tracks 1}
  1590. Xmidiput $mf 0 {0 NoteOff 0 1}
  1591. Xmidiput $mf 0 {4 Note 0 1 2 1}
  1592. Xmidiput $mf 0 {5 KeyPressure 0 1 2}
  1593. X
  1594. Xmidicopy "$mf 0" 10 "$mf 0" 0 10
  1595. X
  1596. Xmidirewind $mf
  1597. Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts stdout $event}
  1598. END_OF_FILE
  1599.   if test 275 -ne `wc -c <'tclmidi-2.0/tests/copy.test'`; then
  1600.     echo shar: \"'tclmidi-2.0/tests/copy.test'\" unpacked with wrong size!
  1601.   fi
  1602.   chmod +x 'tclmidi-2.0/tests/copy.test'
  1603.   # end of 'tclmidi-2.0/tests/copy.test'
  1604. fi
  1605. if test -f 'tclmidi-2.0/tests/merge.test' -a "${1}" != "-c" ; then 
  1606.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/merge.test'\"
  1607. else
  1608.   echo shar: Extracting \"'tclmidi-2.0/tests/merge.test'\" \(433 characters\)
  1609.   sed "s/^X//" >'tclmidi-2.0/tests/merge.test' <<'END_OF_FILE'
  1610. X#!../tclmidi
  1611. Xset mf [midimake]
  1612. Xmidiconfig $mf {tracks 1}
  1613. Xmidiput $mf 0 {0 NoteOff 0 1}
  1614. Xmidiput $mf 0 {4 Note 0 1 2 1}
  1615. Xmidiput $mf 0 {5 KeyPressure 0 1 2}
  1616. X
  1617. Xset mf2 [midimake]
  1618. Xmidiconfig $mf2 {tracks 1} {division 480}
  1619. Xmidiput $mf2 0 {16 NoteOff 0 1}
  1620. Xmidiput $mf2 0 {24 Note 0 1 2 1}
  1621. Xmidiput $mf2 0 {4 KeyPressure 0 1 2}
  1622. X
  1623. Xmidimerge "$mf 0" "$mf2 0"
  1624. X
  1625. Xmidirewind $mf
  1626. Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts stdout $event}
  1627. END_OF_FILE
  1628.   if test 433 -ne `wc -c <'tclmidi-2.0/tests/merge.test'`; then
  1629.     echo shar: \"'tclmidi-2.0/tests/merge.test'\" unpacked with wrong size!
  1630.   fi
  1631.   chmod +x 'tclmidi-2.0/tests/merge.test'
  1632.   # end of 'tclmidi-2.0/tests/merge.test'
  1633. fi
  1634. if test -f 'tclmidi-2.0/tests/move.test' -a "${1}" != "-c" ; then 
  1635.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/move.test'\"
  1636. else
  1637.   echo shar: Extracting \"'tclmidi-2.0/tests/move.test'\" \(520 characters\)
  1638.   sed "s/^X//" >'tclmidi-2.0/tests/move.test' <<'END_OF_FILE'
  1639. X#!../tclmidi
  1640. Xset mf [midimake]
  1641. Xmidiconfig $mf {tracks 1}
  1642. Xmidiput $mf 0 {0 NoteOff 0 1}
  1643. X# This next event sticks into the move range
  1644. Xmidiput $mf 0 {1 Note 0 1 2 5}
  1645. Xmidiput $mf 0 {4 Note 0 1 2 1}
  1646. Xmidiput $mf 0 {5 KeyPressure 1 1 2}
  1647. X# This next event sticks out of the move range
  1648. Xmidiput $mf 0 {6 Note 1 1 2 10}
  1649. X# notes in the dest range
  1650. Xmidiput $mf 0 {10 Note 0 1 2 5}
  1651. Xmidiput $mf 0 {15 Note 0 1 2 5}
  1652. X
  1653. Xmidimove "$mf 0" 10 "$mf 0" 5 10
  1654. X
  1655. Xmidirewind $mf
  1656. Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts stdout $event}
  1657. END_OF_FILE
  1658.   if test 520 -ne `wc -c <'tclmidi-2.0/tests/move.test'`; then
  1659.     echo shar: \"'tclmidi-2.0/tests/move.test'\" unpacked with wrong size!
  1660.   fi
  1661.   chmod +x 'tclmidi-2.0/tests/move.test'
  1662.   # end of 'tclmidi-2.0/tests/move.test'
  1663. fi
  1664. if test -f 'tclmidi-2.0/tests/put.test' -a "${1}" != "-c" ; then 
  1665.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/put.test'\"
  1666. else
  1667.   echo shar: Extracting \"'tclmidi-2.0/tests/put.test'\" \(1169 characters\)
  1668.   sed "s/^X//" >'tclmidi-2.0/tests/put.test' <<'END_OF_FILE'
  1669. X#!../tclmidi
  1670. Xset mf [midimake]
  1671. Xmidiconfig $mf {tracks 1}
  1672. Xmidiput $mf 0 {0 NoteOff 0 1}
  1673. Xmidiput $mf 0 {1 NoteOff 0 1 2}
  1674. Xmidiput $mf 0 {3 NoteOn 0 1 2}
  1675. Xmidiput $mf 0 {4 Note 0 1 2 1}
  1676. Xmidiput $mf 0 {5 KeyPressure 0 1 2}
  1677. Xmidiput $mf 0 {6 Parameter 0 1 2}
  1678. Xmidiput $mf 0 {7 Program 0 1}
  1679. Xmidiput $mf 0 {8 ChannelPressure 0 1}
  1680. Xmidiput $mf 0 {9 PitchWheel 0 1}
  1681. Xmidiput $mf 0 {10 SystemExclusive {0x01 0x02 0x03}}
  1682. Xmidiput $mf 0 {11 MetaSequenceNumber 1}
  1683. Xmidiput $mf 0 {12 MetaText "MetaText"}
  1684. Xmidiput $mf 0 {13 MetaCopyright "MetaCopyright"}
  1685. Xmidiput $mf 0 {14 MetaSequenceName "MetaSequenceName"}
  1686. Xmidiput $mf 0 {15 MetaInstrumentName "MetaInstrumentName"}
  1687. Xmidiput $mf 0 {16 MetaLyric "MetaLyric"}
  1688. Xmidiput $mf 0 {17 MetaMarker "MetaMarker"}
  1689. Xmidiput $mf 0 {18 MetaCue "MetaCue"}
  1690. Xmidiput $mf 0 {19 MetaChannelPrefix {0x01 0x02 0x03}}
  1691. Xmidiput $mf 0 {20 MetaPortNumber 1}
  1692. Xmidiput $mf 0 {21 MetaEndOfTrack}
  1693. Xmidiput $mf 0 {22 MetaTempo 100}
  1694. Xmidiput $mf 0 {23 MetaSMPTE 1 2 3 4 5}
  1695. Xmidiput $mf 0 {24 MetaTime 3 4 24 8}
  1696. Xmidiput $mf 0 {25 MetaKey "E flat" minor}
  1697. Xmidiput $mf 0 {26 MetaSequencerSpecific {0x01 0x02 0x03}}
  1698. Xmidiput $mf 0 {27 MetaUnknown 0x60 {0x01 0x02 0x03}}
  1699. X
  1700. Xmidirewind $mf
  1701. END_OF_FILE
  1702.   if test 1169 -ne `wc -c <'tclmidi-2.0/tests/put.test'`; then
  1703.     echo shar: \"'tclmidi-2.0/tests/put.test'\" unpacked with wrong size!
  1704.   fi
  1705.   chmod +x 'tclmidi-2.0/tests/put.test'
  1706.   # end of 'tclmidi-2.0/tests/put.test'
  1707. fi
  1708. if test -f 'tclmidi-2.0/tkmAppInit.C' -a "${1}" != "-c" ; then 
  1709.   echo shar: Will not clobber existing file \"'tclmidi-2.0/tkmAppInit.C'\"
  1710. else
  1711.   echo shar: Extracting \"'tclmidi-2.0/tkmAppInit.C'\" \(321 characters\)
  1712.   sed "s/^X//" >'tclmidi-2.0/tkmAppInit.C' <<'END_OF_FILE'
  1713. Xextern "C" {
  1714. X#include <tcl.h>
  1715. X#include <tk.h>
  1716. X}
  1717. X#include <iostream.h>
  1718. X
  1719. X#include "tclmidi.h"
  1720. X
  1721. Xint
  1722. XTcl_AppInit(Tcl_Interp *interp)
  1723. X{
  1724. X    Tk_Window main;
  1725. X
  1726. X    main = Tk_MainWindow(interp);
  1727. X
  1728. X    if (Tcl_Init(interp) != TCL_OK)
  1729. X        return (TCL_ERROR);
  1730. X    if (Tk_Init(interp) != TCL_OK)
  1731. X        return (TCL_ERROR);
  1732. X    return (Tclm_Init(interp));
  1733. X}
  1734. END_OF_FILE
  1735.   if test 321 -ne `wc -c <'tclmidi-2.0/tkmAppInit.C'`; then
  1736.     echo shar: \"'tclmidi-2.0/tkmAppInit.C'\" unpacked with wrong size!
  1737.   fi
  1738.   # end of 'tclmidi-2.0/tkmAppInit.C'
  1739. fi
  1740. echo shar: End of archive 14 \(of 14\).
  1741. cp /dev/null ark14isdone
  1742. MISSING=""
  1743. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
  1744.     if test ! -f ark${I}isdone ; then
  1745.     MISSING="${MISSING} ${I}"
  1746.     fi
  1747. done
  1748. if test "${MISSING}" = "" ; then
  1749.     echo You have unpacked all 14 archives.
  1750.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1751. else
  1752.     echo You still must unpack the following archives:
  1753.     echo "        " ${MISSING}
  1754. fi
  1755. exit 0
  1756. exit 0 # Just in case...
  1757.