home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume43
/
tclmidi
/
part14
< prev
next >
Wrap
Internet Message Format
|
1994-07-21
|
51KB
From: durian@boogie.com (Mike Durian)
Newsgroups: comp.sources.misc
Subject: v43i122: tclmidi - A language for manipulating MIDI files, v2.0, Part14/14
Date: 21 Jul 1994 19:28:33 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <30n3rh$7ad@sparky.sterling.com>
X-Md4-Signature: afe16422d89137085fc0ed77c0d9a2da
Submitted-by: durian@boogie.com (Mike Durian)
Posting-number: Volume 43, Issue 122
Archive-name: tclmidi/part14
Environment: POSIX, (BSDI, NetBSD, LINUX, SVR4 for optional driver), C++, TCL
Supersedes: tclm: Volume 37, Issue 43-47
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: tclmidi-2.0/TODO tclmidi-2.0/contrib/Makefile
# tclmidi-2.0/contrib/README tclmidi-2.0/contrib/playzip
# tclmidi-2.0/drivers/BSD/midiioctl.h
# tclmidi-2.0/drivers/LINUX/midiconf.c
# tclmidi-2.0/drivers/SVR4/Makefile tclmidi-2.0/drivers/SVR4/Master
# tclmidi-2.0/drivers/SVR4/Name tclmidi-2.0/drivers/SVR4/Node
# tclmidi-2.0/drivers/SVR4/README tclmidi-2.0/drivers/SVR4/Space.c
# tclmidi-2.0/drivers/SVR4/System tclmidi-2.0/drivers/man/Makefile
# tclmidi-2.0/events/AllEvents.h tclmidi-2.0/events/EventUtil.h
# tclmidi-2.0/man/midifree.n tclmidi-2.0/man/midimake.n
# tclmidi-2.0/man/midiplay.n tclmidi-2.0/man/midiput.n
# tclmidi-2.0/man/midiread.n tclmidi-2.0/man/midirewind.n
# tclmidi-2.0/man/midisplit.n tclmidi-2.0/man/midistop.n
# tclmidi-2.0/man/midiversion.n tclmidi-2.0/man/midiwait.n
# tclmidi-2.0/man/midiwrite.n tclmidi-2.0/man/midtotcl.1
# tclmidi-2.0/man/minfo.1 tclmidi-2.0/man/mplay.1
# tclmidi-2.0/midtotcl tclmidi-2.0/minfo tclmidi-2.0/mplay
# tclmidi-2.0/patchlevel.h tclmidi-2.0/rb/makefile
# tclmidi-2.0/smf/Makefile tclmidi-2.0/song/Makefile
# tclmidi-2.0/song/TODO tclmidi-2.0/tclmAppInit.C
# tclmidi-2.0/tclmidi.h tclmidi-2.0/tests/README
# tclmidi-2.0/tests/copy.test tclmidi-2.0/tests/merge.test
# tclmidi-2.0/tests/move.test tclmidi-2.0/tests/put.test
# tclmidi-2.0/tkmAppInit.C
# Wrapped by kent@sparky on Thu Jul 21 19:05:19 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 14 (of 14)."'
if test -f 'tclmidi-2.0/TODO' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/TODO'\"
else
echo shar: Extracting \"'tclmidi-2.0/TODO'\" \(748 characters\)
sed "s/^X//" >'tclmidi-2.0/TODO' <<'END_OF_FILE'
X Consider adding a EventTreeNode pointer to every Event. This would
Xgreatly speed moving from one arbitrary event to it's predicessor
Xor successor. Speed up would be reflected in reading large files
Xwhere noteoff search for their pairing noteon. But I'll hold off
Xon this - it would increase each Event by a pointer. This has been
Xon my todo list for ages, it probably won't happen.
X
X write doc on libmidi++.a
X
XIn Driver:
X Find tester for SVR4
X Comment driver code better.
X Optimize realtime functions - this has already been done to a partial
Xextent. Click calculations are now done are read and write time.
X
X
XLong term:
X Write a graphical notation program based on tclmidi and/or libmidi++.a
XThat was why I rewrote tclmidi, wasn't it?
END_OF_FILE
if test 748 -ne `wc -c <'tclmidi-2.0/TODO'`; then
echo shar: \"'tclmidi-2.0/TODO'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/TODO'
fi
if test -f 'tclmidi-2.0/contrib/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/Makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/contrib/Makefile'\" \(106 characters\)
sed "s/^X//" >'tclmidi-2.0/contrib/Makefile' <<'END_OF_FILE'
XBINDIR=/usr/local/bin
X
XLUCHO=mmet mmap.mt32 playzip mbuild msplit mmerge
X
Xinstall:
X cp $(LUCHO) $(BINDIR)
END_OF_FILE
if test 106 -ne `wc -c <'tclmidi-2.0/contrib/Makefile'`; then
echo shar: \"'tclmidi-2.0/contrib/Makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/contrib/Makefile'
fi
if test -f 'tclmidi-2.0/contrib/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/README'\"
else
echo shar: Extracting \"'tclmidi-2.0/contrib/README'\" \(399 characters\)
sed "s/^X//" >'tclmidi-2.0/contrib/README' <<'END_OF_FILE'
XThis directory contains tclmidi scripts and related programs
Xwritten by others.
X
XThe following were written by Luchezar Georgiev <lucho@midi.tu-varna.bg>
X mmap.mt32 - converts General MIDI files to Roland MT-32 form
X mmet - generates a metronome beat with alternating volumes
X playzip - automatically unzips and plays selected song from an archive
X mbuild - concatenate and transpose MIDI files
END_OF_FILE
if test 399 -ne `wc -c <'tclmidi-2.0/contrib/README'`; then
echo shar: \"'tclmidi-2.0/contrib/README'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/contrib/README'
fi
if test -f 'tclmidi-2.0/contrib/playzip' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/playzip'\"
else
echo shar: Extracting \"'tclmidi-2.0/contrib/playzip'\" \(400 characters\)
sed "s/^X//" >'tclmidi-2.0/contrib/playzip' <<'END_OF_FILE'
X#!/bin/sh
X
X# uuencoded
X#
X#begin 644 /usr/local/etc/mt32reset
X#,`/`)01`6$G\```'W
X#`
X#end
X
XSingle() {
X unzip -p $1 $2 2> /dev/null | mplay -quiet
X if [ "$3" = "-r" ]; then
X cat /usr/local/etc/mt32reset > /dev/midi0
X fi
X}
X
Xif [ "$3" = "-s" ]; then
X Single $1 $2 $4
Xelif [ $# -ge 2 ]; then
X xargs -i $0 $1 {} -s $3 < $2
Xelse
X echo "Usage: playzip <archive.zip> <album|{song -s}> [-r]"
X exit 1
Xfi
Xexit 0
END_OF_FILE
if test 400 -ne `wc -c <'tclmidi-2.0/contrib/playzip'`; then
echo shar: \"'tclmidi-2.0/contrib/playzip'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/contrib/playzip'
# end of 'tclmidi-2.0/contrib/playzip'
fi
if test -f 'tclmidi-2.0/drivers/BSD/midiioctl.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/BSD/midiioctl.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/BSD/midiioctl.h'\" \(392 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/BSD/midiioctl.h' <<'END_OF_FILE'
X#define MRESET _IO('m', 0x01)
X#define MDRAIN _IO('m', 0x02)
X#define MFLUSH _IO('m', 0x03)
X#define MGPLAYQ _IOR('m', 0x04, int)
X#define MGRECQ _IOR('m', 0x05, int)
X#define MSDIVISION _IOW('m', 0x06, int)
X#define MGDIVISION _IOR('m', 0x07, int)
X#define MGQAVAIL _IOR('m', 0x08, int)
X#define MASYNC _IOW('m', 0x09, int)
X#define MTHRU _IOW('m', 0x0a, int)
X#define MRECONPLAY _IOW('m', 0x0b, int)
END_OF_FILE
if test 392 -ne `wc -c <'tclmidi-2.0/drivers/BSD/midiioctl.h'`; then
echo shar: \"'tclmidi-2.0/drivers/BSD/midiioctl.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/BSD/midiioctl.h'
fi
if test -f 'tclmidi-2.0/drivers/LINUX/midiconf.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/LINUX/midiconf.c'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/LINUX/midiconf.c'\" \(451 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/LINUX/midiconf.c' <<'END_OF_FILE'
X#include <linux/types.h>
X#include <linux/time.h>
X#include <linux/timer.h>
X#include <linux/midi.h>
X
X/*
X * This is where you configure the MPU401 devices.
X * Define NMIDI to be the number of MPU401 devices you have installed.
X * And add an entry to the midi_conf array describing each
X * device's I/O addr and IRQ number.
X */
X#define NMIDI 1
Xint NumMidi = NMIDI;
Xstruct midi_config midi_conf[NMIDI] =
X {{0x300, 5}};
Xstruct midi_softc midi_sc[NMIDI];
END_OF_FILE
if test 451 -ne `wc -c <'tclmidi-2.0/drivers/LINUX/midiconf.c'`; then
echo shar: \"'tclmidi-2.0/drivers/LINUX/midiconf.c'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/LINUX/midiconf.c'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Makefile'\" \(574 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Makefile' <<'END_OF_FILE'
X# I've taken my best guess at how to include the extra module file,
X# quad.c. There might be a better way to do this than using "ld -r"
XCONF = /etc/conf/bin
X
Xall: Driver.o
X
XDriver.o: midi.o quad.o
X -rm Driver.o
X ld -r -o Driver.o midi.o quad.o
X
Xinstall: Driver.o Space.c Master System Node Name
X cp midi.h /usr/include/sys
X chown bin.bin /usr/include/sys/midi.h
X chmod 444 /usr/include/sys/midi.h
X $(CONF)/idinstall -kae midi
X $(CONF)/idmknod
X $(CONF)/idbuild
X
Xupdate: Driver.o Space.c Master System Node Name
X $(CONF)/idinstall -kue midi
X $(CONF)/idmknod
X $(CONF)/idbuild
END_OF_FILE
if test 574 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Makefile'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/Makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/Makefile'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/Master' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Master'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Master'\" \(33 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Master' <<'END_OF_FILE'
Xmidi Iocrwip icH midi 0 0 0 4 -1
END_OF_FILE
if test 33 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Master'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/Master'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/Master'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/Name' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Name'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Name'\" \(59 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Name' <<'END_OF_FILE'
Xmidi Midi driver for MPU401 compatible boards in UART mode
END_OF_FILE
if test 59 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Name'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/Name'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/Name'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/Node' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Node'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Node'\" \(45 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Node' <<'END_OF_FILE'
Xmidi midi0 c 0
Xmidi midi1 c 1
Xmidi midi2 c 2
END_OF_FILE
if test 45 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Node'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/Node'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/Node'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/README'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/README'\" \(865 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/README' <<'END_OF_FILE'
X This is a SVR4 version of my MPU401 driver. This driver is based
Xon the BSD386 driver, but with many changes.
X I used to have access to a machine running ESIX at work, and
Xat one point this driver would compile, but numerous changes have
Xbeen made since I've lost access to this machine. So all I can
Xreally say, is it is probably fairly close to compling.
X I'm definitely interesting in finding people to test it and debug
Xit. Please take a look the the PROBLEMS file and see if you can help
Xme get this driver working.
X I'm not positive about the install proceedure, but we'll give it
Xa try.
X
X + edit the System file. There should be a line for each
XMPU401 device. See sdevice(4) for format information. The MPU401s
Xonly use two IO ports, so the 8th field should be 1 greater than
Xthe 7th.
X
X + make and make install
X
X + Now just shutdown and reboot
END_OF_FILE
if test 865 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/README'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/README'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/README'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/Space.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/Space.c'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/Space.c'\" \(631 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/Space.c' <<'END_OF_FILE'
X#include "config.h"
X#include "sys/param.h"
X#include "sys/types.h"
X#include "sys/signal.h"
X#include "sys/errno.h"
X#include "sys/file.h"
X#include "sys/poll.h"
X#include "sys/midi.h"
X
Xint NumMidi = MIDI_UNITS;
Xstruct midi_softc midi_sc[MIDI_UNITS];
X
Xint midi_addrs[MIDI_UNITS] = {
X#ifdef MIDI_0_SIOA
XMIDI_0_SIOA
X#endif
X#ifdef MIDI_1_SIOA
X, MIDI_1_SIOA
X#endif
X#ifdef MIDI_2_SIOA
X, MIDI_2_SIOA
X#endif
X#ifdef MIDI_3_SIOA
X, MIDI_3_SIOA
X#endif
X};
X
Xint midi_intrs[MIDI_UNITS] = {
X#ifdef MIDI_0_VECT
XMIDI_0_VECT
X#endif
X#ifdef MIDI_1_VECT
X, MIDI_1_VECT
X#endif
X#ifdef MIDI_2_VECT
X, MIDI_2_VECT
X#endif
X#ifdef MIDI_3_VECT
X, MIDI_3_VECT
X#endif
X};
END_OF_FILE
if test 631 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/Space.c'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/Space.c'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/Space.c'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/System' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/System'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/System'\" \(27 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/System' <<'END_OF_FILE'
Xmidi Y 1 4 1 5 300 301 0 0
END_OF_FILE
if test 27 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/System'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/System'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/System'
fi
if test -f 'tclmidi-2.0/drivers/man/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/man/Makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/man/Makefile'\" \(366 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/man/Makefile' <<'END_OF_FILE'
X#
X# This is the command to format the man pages
X#
XROFF = groff -mdoc -Tascii
X
X#
X# This is where you want the man pages to go
X#
XMANPATH = /usr/local/man
X
XMAN4 = midi.4
X
XMAN4COOKED = midi.0
X
X.SUFFIXES: .0 .4
X
Xinstall-raw:
X cp $(MAN4) $(MANPATH)/man4
X
Xinstall-cooked: $(MAN4COOKED)
X cp $(MAN4COOKED) $(MANPATH)/cat4
X
Xclean:
X rm -f $(MAN4COOKED)
X
X.4.0:
X $(ROFF) $< > $@
END_OF_FILE
if test 366 -ne `wc -c <'tclmidi-2.0/drivers/man/Makefile'`; then
echo shar: \"'tclmidi-2.0/drivers/man/Makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/man/Makefile'
fi
if test -f 'tclmidi-2.0/events/AllEvents.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/AllEvents.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/AllEvents.h'\" \(717 characters\)
sed "s/^X//" >'tclmidi-2.0/events/AllEvents.h' <<'END_OF_FILE'
X#ifndef ALLEVENTS_H
X#define ALLEVENTS_H
X#include "Event.h"
X#include "NormalEvent.h"
X#include "Note.h"
X#include "NoteOff.h"
X#include "NoteOn.h"
X#include "KeyPressure.h"
X#include "Parameter.h"
X#include "Program.h"
X#include "ChanPressure.h"
X#include "PitchWheel.h"
X#include "SystemExcl.h"
X#include "MetaEvent.h"
X#include "MetaSeqNum.h"
X#include "MetaText.h"
X#include "MetaCopy.h"
X#include "MetaSeqName.h"
X#include "MetaInstName.h"
X#include "MetaLyric.h"
X#include "MetaMarker.h"
X#include "MetaCue.h"
X#include "MetaChanPrefix.h"
X#include "MetaPortNum.h"
X#include "MetaEOT.h"
X#include "MetaTempo.h"
X#include "MetaSMPTE.h"
X#include "MetaTime.h"
X#include "MetaKey.h"
X#include "MetaSeqSpec.h"
X#include "MetaUnknown.h"
X
X#endif
END_OF_FILE
if test 717 -ne `wc -c <'tclmidi-2.0/events/AllEvents.h'`; then
echo shar: \"'tclmidi-2.0/events/AllEvents.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/AllEvents.h'
fi
if test -f 'tclmidi-2.0/events/EventUtil.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/EventUtil.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/EventUtil.h'\" \(270 characters\)
sed "s/^X//" >'tclmidi-2.0/events/EventUtil.h' <<'END_OF_FILE'
X#ifndef EVENTUTIL_H
X#define EVENTUTIL_H
X
X#include "Event.h"
X
Xextern Event *ReadEventFromSMFTrack(SMFTrack &track, long &last_t,
X const char *&errstr);
Xextern int WriteEventToSMFTrack(SMFTrack &track, long &last_t,
X const Event *event, const char *&errstr);
X#endif
END_OF_FILE
if test 270 -ne `wc -c <'tclmidi-2.0/events/EventUtil.h'`; then
echo shar: \"'tclmidi-2.0/events/EventUtil.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/EventUtil.h'
fi
if test -f 'tclmidi-2.0/man/midifree.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midifree.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midifree.n'\" \(534 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midifree.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIFREE N
X.Os
X.Sh NAME
X.Nm midifree
X.Nd "tclmidi command to free the space used by a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Ar MidiID
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xfrees the space used by a
X\%MIDI song created from a previous
Xcall to
X.Xr midiread n
Xor
X.Xr midimake n .
XThis command takes one argument, which
Xis the descriptor of a \%MIDI song.
X.Sh RETURN VALUES
X.Nm
Xdoes not return anything.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiread n ,
X.Xr midimake n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 534 -ne `wc -c <'tclmidi-2.0/man/midifree.n'`; then
echo shar: \"'tclmidi-2.0/man/midifree.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midifree.n'
fi
if test -f 'tclmidi-2.0/man/midimake.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midimake.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midimake.n'\" \(735 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midimake.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIMAKE N
X.Os
X.Sh NAME
X.Nm midimake
X.Nd "tclmidi command to create an empty MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that creates an empty \%MIDI song
Xfor use by other
X.Xr tclmidi 1
Xcommands.
XBy default the \%MIDI
Xsong is created with 0
Xtracks allocated, the format is type zero and the division
Xis 120.
XThese defaults can then be changed with
Xthe
X.Xr midiconfig n
Xcommand.
X.Pp
XSince
X.Nm
Xallocates space for the \%MIDI
Xsong,
X.Xr midifree n
Xshould be used
Xwhen the file is no longer needed.
X.Sh RETURN VALUES
X.Nm
Xreturns a
X\%MIDI song descriptor
Xfor use by other
X.Xr tclmidi 1
Xcommands.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiconfig n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 735 -ne `wc -c <'tclmidi-2.0/man/midimake.n'`; then
echo shar: \"'tclmidi-2.0/man/midimake.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midimake.n'
fi
if test -f 'tclmidi-2.0/man/midiplay.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiplay.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiplay.n'\" \(1150 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiplay.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIPLAY N
X.Os
X.Sh NAME
X.Nm midiplay
X.Nd "tclmidi command to play a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Ar MidiID
X.Op repeat
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that plays a \%MIDI
Xsong through the \%MIDI device
Xif possible.
XCurrently, only MPU-401 compatible cards in UART mode are
Xsupported.
XA device driver for the MPU-401 is included with this
Xrelease for the following architectures:
X.Bl -item -offset indent -compact
X.It
XBSD/386
X.It
X386BSD and variants
X.It
XSVR4
X.It
XLinux
X.El
X.Pp
XThe first argument to
X.Nm
Xis a \%MIDI song descriptor as returned by
X.Xr midimake n
Xor
X.Xr midiread n .
XThere may also be an optional second argument,
X``repeat.''
XIf ``repeat'' is specified, the song will replay once
Xthe end is reached.
X.Sh RETURN VALUES
X.Nm
Xreturns immediately with
Xthe value 1 if the song could be played
Xor 0 if there is no \%MIDI device available.
X.Xr midistop n
Xmust be used to stop playing of the song
Xand
X.Xr midiwait n
Xcan be used to block until the song reaches
Xthe end.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiread n ,
X.Xr midimake n ,
X.Xr midistop n ,
X.Xr midiwait n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1150 -ne `wc -c <'tclmidi-2.0/man/midiplay.n'`; then
echo shar: \"'tclmidi-2.0/man/midiplay.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiplay.n'
fi
if test -f 'tclmidi-2.0/man/midiput.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiput.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiput.n'\" \(692 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiput.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIPUT N
X.Os
X.Sh NAME
X.Nm midiput
X.Nd "tclmidi command to insert an event in a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Ar MidiID
X.Ar track
X.Ar event
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xinserts an event in a track
Xof a \%MIDI song.
XThe first argument is a \%MIDI song descriptor
Xas returned by
X.Xr midimake n
Xor
X.Xr midiread n .
XThe second argument is the track in the \%MIDI song.
XThe third argument is the event to insert.
XSee
X.Xr midievents n ,
Xfor a description of \%MIDI events.
X.Sh RETURN VALUES
X.Nm
Xreturns nothing.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiread n ,
X.Xr midimake n ,
X.Xr midiget n ,
X.Xr midievents n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 692 -ne `wc -c <'tclmidi-2.0/man/midiput.n'`; then
echo shar: \"'tclmidi-2.0/man/midiput.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiput.n'
fi
if test -f 'tclmidi-2.0/man/midiread.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiread.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiread.n'\" \(824 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiread.n' <<'END_OF_FILE'
X.Dd Januay 30, 1994
X.Dt MIDIREAD N
X.Os
X.Sh NAME
X.Nm midiread
X.Nd "tclmidi command to read a MIDI song from a Standard MIDI File"
X.Sh SYNOPSIS
X.Nm
X.Ar FileID
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that reads a Standard \%MIDI File
Xand converts it to a \%MIDI song for use by other
X.Xr tclmidi 1
Xcommands.
X.Pp
X.Nm
Xtakes one argument that specifies a file
Xdescriptor from which to read the Standard
X\%MIDI File.
XThis argument should be a value returned by
Xthe
X.Xr open n
Xtcl command, or
X``stdin.''
X.Pp
XSince
X.Nm
Xallocates space for the \%MIDI song,
X.Xr midifree n
Xshould be used when the file is no longer needed.
X.Sh RETURN VALUES
X.Nm
Xreturns a \%MIDI song descriptor that may be used
Xby other
X.Xr tclmidi 1
Xcommands.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr open n ,
X.Xr midifree n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 824 -ne `wc -c <'tclmidi-2.0/man/midiread.n'`; then
echo shar: \"'tclmidi-2.0/man/midiread.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiread.n'
fi
if test -f 'tclmidi-2.0/man/midirewind.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midirewind.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midirewind.n'\" \(810 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midirewind.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIREWIND N
X.Os
X.Sh NAME
X.Nm midirewind
X.Nd "tclmidi command to reset a MIDI song pointer to the beginning"
X.Sh SYNOPSIS
X.Nm
X.Ar mfileId
X.Op track
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xsets the internal place keeper of
Xa \%MIDI song to the beginning.
XThe first argument is a \%MIDI song descriptor
Xas returned by
X.Xr midimake n
Xor
X.Xr midiread n .
XAn optional second argument may also be specified to
Xrewind only a specific track.
XThis argument should be a track number.
XWithout a second argument, all tracks in the \%MIDI song
Xare rewound.
X.Pp
X.Nm
Xaffects all future calls to
X.Xr midiget n
Xfor the song.
X.Sh RETURN VALUES
X.Nm
Xdoes not return anything.
X.Sh SEE ALSO
X.Xr tclm 1 ,
X.Xr midiread n ,
X.Xr midimake n ,
X.Xr midiget n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 810 -ne `wc -c <'tclmidi-2.0/man/midirewind.n'`; then
echo shar: \"'tclmidi-2.0/man/midirewind.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midirewind.n'
fi
if test -f 'tclmidi-2.0/man/midisplit.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midisplit.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midisplit.n'\" \(1077 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midisplit.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDISPLIT N
X.Os
X.Sh NAME
X.Nm midisplit
X.Nd "tclmidi command to split a track into a meta track and an other track"
X.Sh SYNOPSIS
X.Nm
X.Pf { Ar srcMidiId srcTrack Ns }
X.Pf { Ar metaMidiID metaTrack Ns }
X.Pf { Ar otherMidiID otherTrack Ns }
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xsplits one track into two tracks.
XThe first of the resulting tracks will contain
Xonly meta events, while the second will
Xcontain all other events.
XBoth tracks will be terminated with a MetaEndOfTrack
Xevent.
X.Pp
XThe first argument is a list that contains the \%MIDI
Xsong descriptor of the source track and the track number
Xin that song.
XThe second argument is a similar list for the track where
Xmeta events should go, and the third argument is a list
Xdescribing where the remaining events should go.
X.Pp
XThe \%MIDI song descriptors
Xshould be values returned by either
X.Xr midiread n
Xor
X.Xr midimake n .
X.Sh RETURN VALUES
X.Nm
Xreturns nothing.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiread n ,
X.Xr midimake n ,
X.Xr midimerge n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1077 -ne `wc -c <'tclmidi-2.0/man/midisplit.n'`; then
echo shar: \"'tclmidi-2.0/man/midisplit.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midisplit.n'
fi
if test -f 'tclmidi-2.0/man/midistop.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midistop.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midistop.n'\" \(535 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midistop.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDISTOP N
X.Os
X.Sh NAME
X.Nm midistop
X.Nd "tclmidi command to stop playing or recording a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that stops the playing or
Xrecording of a \%MIDI song.
X.Nm
Xwill only work on files being played by calling
X.Xr midiplay n
Xor
X.Xr midirecord n .
X.Sh RETURN VALUES
X.Nm
Xreturns 1
Xif it could successfully
Xstop playing or recording, 0 otherwise.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiplay n ,
X.Xr midirecord n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 535 -ne `wc -c <'tclmidi-2.0/man/midistop.n'`; then
echo shar: \"'tclmidi-2.0/man/midistop.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midistop.n'
fi
if test -f 'tclmidi-2.0/man/midiversion.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiversion.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiversion.n'\" \(339 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiversion.n' <<'END_OF_FILE'
X.Dd February 15, 1994
X.Dt MIDIVERSION N
X.Os
X.Sh NAME
X.Nm midiversion
X.Nd "tclmidi command to report the version"
X.Sh SYNOPSIS
X.Nm
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that reports the version that
Xis running.
X.Sh RETURN VALUES
X.Nm
Xreturns the version number.
X.Sh SEE ALSO
X.Xr tclmidi 1
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 339 -ne `wc -c <'tclmidi-2.0/man/midiversion.n'`; then
echo shar: \"'tclmidi-2.0/man/midiversion.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiversion.n'
fi
if test -f 'tclmidi-2.0/man/midiwait.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiwait.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiwait.n'\" \(654 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiwait.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIWAIT N
X.Os
X.Sh NAME
X.Nm midiwait
X.Nd "tclmidi command to block until playing or recording a MIDI song finishes"
X.Sh SYNOPSIS
X.Nm
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that blocks until a \%MIDI song finishes
Xplaying.
X.Nm
Xwill only work on files being played by calling
X.Xr midirecord n
Xwith a play song
Xor
X.Xr midiplay n .
X.Sh RETURN VALUES
X.Nm
Xreturns 1
Xif it could successfully
Xstop playing or recording, 0 otherwise.
X.Sh BUGS
XCare should be taken to avoid calling
X.Nm
Xwhen a song is playing in repeat mode.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiplay n ,
X.Xr midirecord n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 654 -ne `wc -c <'tclmidi-2.0/man/midiwait.n'`; then
echo shar: \"'tclmidi-2.0/man/midiwait.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiwait.n'
fi
if test -f 'tclmidi-2.0/man/midiwrite.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiwrite.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiwrite.n'\" \(730 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiwrite.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIWRITE N
X.Os
X.Sh NAME
X.Nm midiwrite
X.Nd "tclmidi command to write a MIDI song as a Standard MIDI File"
X.Sh SYNOPSIS
X.Nm
X.Ar FileID
X.Ar MidiID
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that writes a \%MIDI song to
Xan open tcl file descriptor in the form of a Standard \%MIDI File.
XThis command takes two arguments.
XThe first is a tcl file descriptor as returned
Xby the
X.Nm tcl
Xcommand
X.Xr open n ,
Xthe string ``stdout'' or ``stderr.''
XThe second argument is a \%MIDI song descriptor
Xas returned by
X.Xr midimake n
Xor
X.Xr midiread n .
X.Sh RETURN VALUES
X.Nm
Xdoes not return anything.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr open n ,
X.Xr midiread n ,
X.Xr midimake n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 730 -ne `wc -c <'tclmidi-2.0/man/midiwrite.n'`; then
echo shar: \"'tclmidi-2.0/man/midiwrite.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiwrite.n'
fi
if test -f 'tclmidi-2.0/man/midtotcl.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midtotcl.1'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midtotcl.1'\" \(893 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midtotcl.1' <<'END_OF_FILE'
X.Dd June 8, 1994
X.Dt MIDTOTCL 1
X.Os
X.Sh NAME
X.Nm midtotcl
X.Nd "create the tclmidi commands that will generate a MIDI file"
X.Sh SYNOPSIS
X.Nm
X.Op Fl playable
X.Op filename
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xscript that prints out the tclmidi commands necessary
Xto reconstruct a \%MIDI file.
XThis is useful for editing existing \%MIDI files.
XBy default,
X.Nm
Xadds commands to print the \%MIDI to stdout in
Xthe form of a Standard Midi File.
XIf the
X.Fl playable
Xoption is specified,
X.Nm
Xwill add commands to automatically play the \%MIDI
Xsong after building it.
XThe file name may be specified on the command line
Xor read from stdin.
XSee
X.Xr midievents n
Xfor a discription of the different types of events
Xand their parameters.
XA similar script is the
X.Xr minfo 1
Xprogram that prints the data in a \%MIDI file.
X.Sh SEE ALSO
X.Xr midievents n
X.Xr minfo 1
X.Sh AUTHORS
XMike Durian - durian@boogie.com
END_OF_FILE
if test 893 -ne `wc -c <'tclmidi-2.0/man/midtotcl.1'`; then
echo shar: \"'tclmidi-2.0/man/midtotcl.1'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midtotcl.1'
fi
if test -f 'tclmidi-2.0/man/minfo.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/minfo.1'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/minfo.1'\" \(666 characters\)
sed "s/^X//" >'tclmidi-2.0/man/minfo.1' <<'END_OF_FILE'
X.Dd February 3, 1994
X.Dt MINFO 1
X.Os
X.Sh NAME
X.Nm minfo
X.Nd "a tclmidi script to print a MIDI file in human readible form"
X.Sh SYNOPSIS
X.Nm
X.Op filename
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xscript that prints a \%MIDI file
Xin a human readible form.
XThe file name may be specified on the command line
Xor read from stdin.
XIt prints out the header data for the \%MIDI file
X(tracks, division and format) and then lists the
Xevents for each track in the file.
XThe events are listed one line per event.
XSee
X.Xr midievents n
Xfor a discription of the different types of events
Xand their parameters.
X.Sh SEE ALSO
X.Xr midievents n
X.Sh AUTHORS
XMike Durian - durian@boogie.com
END_OF_FILE
if test 666 -ne `wc -c <'tclmidi-2.0/man/minfo.1'`; then
echo shar: \"'tclmidi-2.0/man/minfo.1'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/minfo.1'
fi
if test -f 'tclmidi-2.0/man/mplay.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/mplay.1'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/mplay.1'\" \(828 characters\)
sed "s/^X//" >'tclmidi-2.0/man/mplay.1' <<'END_OF_FILE'
X.Dd February 3, 1994
X.Dt MPLAY 1
X.Os
X.Sh NAME
X.Nm mplay
X.Nd "a tclmidi script to play a MIDI file"
X.Sh SYNOPSIS
X.Nm
X.Op Fl repeat
X.Op Fl quiet
X.Op file
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xscript that plays a \%MIDI file.
XThe file name may be specified on the command line
Xor read from stdin.
XThe options are as follows:
X.Bl -tag -width Fl repeat
X.It Fl repeat
XPlay the file repeatedly.
XIf not in quiet mode, the playing may be stopped
Xby pressing the return key.
XOtherwise the process
Xmust be killed.
X.It Fl quiet
XWith this option
X.Nm
Xwill not print out messages or ask for input.
X.El
X.Pp
XSince
X.Nm
Xmakes use of the
X.Xr midiplay n
X.Xr tclmidi 1
Xcommand,
Xthis program will only work
Xif
X.Xr tclmidi 1
Xwas compiled with a device
Xinterface.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiplay n
X.Sh AUTHORS
XMike Durian - durian@boogie.com
END_OF_FILE
if test 828 -ne `wc -c <'tclmidi-2.0/man/mplay.1'`; then
echo shar: \"'tclmidi-2.0/man/mplay.1'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/mplay.1'
fi
if test -f 'tclmidi-2.0/midtotcl' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/midtotcl'\"
else
echo shar: Extracting \"'tclmidi-2.0/midtotcl'\" \(1229 characters\)
sed "s/^X//" >'tclmidi-2.0/midtotcl' <<'END_OF_FILE'
X#!/usr/local/bin/tclmidi
Xproc Usage {} {
X puts stderr {Usage: midtotcl [-playable] [filename]}
X}
X
Xif {$argc > 3} {
X Usage
X exit 1
X}
X
Xset playable 0
Xset fname stdin
Xset f stdin
X
Xfor {set i 0} {$i < $argc} {incr i} {
X switch -- [lindex $argv $i] {
X "-?" -
X "-h" -
X "-help" {
X Usage
X exit 1
X }
X "-playable" -
X "-p" {
X set playable 1
X }
X default {
X if {$fname != "stdin"} {
X Usage
X exit 1
X } else {
X set fname [lindex $argv $i]
X set f [open $fname r]
X }
X }
X }
X}
X
Xset mf [midiread $f]
Xmidirewind $mf
X
Xset config [midiconfig $mf tracks division format]
Xset tracks [lindex [lindex $config 0] 1]
Xset division [lindex [lindex $config 1] 1]
Xset format [lindex [lindex $config 2] 1]
X
Xputs {#!/usr/local/bin/tclmidi}
Xputs "\# tclmidi commands for midi file $fname"
Xputs ""
Xputs {set mf [midimake]}
Xputs "midiconfig \$mf {tracks $tracks} {division $division} {format $format}"
X
Xfor {set i 0} {$i < $tracks} {incr i} {
X puts ""
X puts "\# track $i"
X while {[set event [midiget $mf $i next]] != "EOT"} {
X puts "midiput \$mf $i {$event}"
X }
X}
Xputs ""
Xif {$playable} {
X puts {# play song}
X puts {midiplay $mf}
X puts {midiwait}
X puts {midistop}
X} else {
X puts {# write midi file}
X puts {midiwrite stdout $mf}
X}
Xmidifree $mf
Xclose $f
END_OF_FILE
if test 1229 -ne `wc -c <'tclmidi-2.0/midtotcl'`; then
echo shar: \"'tclmidi-2.0/midtotcl'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/midtotcl'
# end of 'tclmidi-2.0/midtotcl'
fi
if test -f 'tclmidi-2.0/minfo' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/minfo'\"
else
echo shar: Extracting \"'tclmidi-2.0/minfo'\" \(649 characters\)
sed "s/^X//" >'tclmidi-2.0/minfo' <<'END_OF_FILE'
X#!/usr/local/bin/tclmidi
Xif {$argc > 1} {
X puts stderr {Usage: minfo [filename]}
X exit 1
X}
X
Xif {$argc == 0} {
X set fname stdin
X set f stdin
X} else {
X set fname [lindex $argv 0]
X set f [open $fname r]
X}
Xset mf [midiread $f]
Xmidirewind $mf
X
Xset config [midiconfig $mf tracks division format]
Xset tracks [lindex [lindex $config 0] 1]
Xset division [lindex [lindex $config 1] 1]
Xset format [lindex [lindex $config 2] 1]
X
Xputs "File: $fname"
Xputs "Format: $format"
Xputs "Tracks: $tracks"
Xputs "Division: $division"
Xfor {set i 0} {$i < $tracks} {incr i} {
X puts ""
X puts "Track: $i"
X while {[set event [midiget $mf $i next]] != "EOT"} {
X puts $event
X }
X}
END_OF_FILE
if test 649 -ne `wc -c <'tclmidi-2.0/minfo'`; then
echo shar: \"'tclmidi-2.0/minfo'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/minfo'
# end of 'tclmidi-2.0/minfo'
fi
if test -f 'tclmidi-2.0/mplay' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/mplay'\"
else
echo shar: Extracting \"'tclmidi-2.0/mplay'\" \(919 characters\)
sed "s/^X//" >'tclmidi-2.0/mplay' <<'END_OF_FILE'
X#!/usr/local/bin/tclmidi
Xproc Usage {} {
X puts stderr {Usage: mplay [-quiet] [-repeat] [filename]}
X}
X
Xset repeat ""
Xset quiet 0
Xset fname stdin
Xset f stdin
X
Xfor {set i 0} {$i < $argc} {incr i} {
X switch -- [lindex $argv $i] {
X "-?" -
X "-h" -
X "-help" {
X Usage
X exit 1
X }
X "-repeat" {
X set repeat repeat
X }
X "-quiet" {
X set quiet 1
X }
X default {
X if {$fname != "stdin"} {
X Usage
X exit 1
X } else {
X set fname [lindex $argv $i]
X set f [open $fname r]
X }
X }
X }
X}
X
X# can't read key strokes if file is coming from stdin
Xif {$fname == "stdin"} {
X set quiet 1
X}
X
Xif {!$quiet} {
X puts "loading, please wait"
X}
Xset mf [midiread $f]
X
Xif {!$quiet} {
X puts "press return to begin playing"
X gets stdin
X}
Xif {![midiplay $mf $repeat]} {
X puts stderr "midiplay command not available"
X exit 1
X}
Xif {$repeat != "repeat" || $quiet} {
X midiwait
X midistop
X} else {
X puts "press return to stop playing"
X gets stdin
X midistop
X}
END_OF_FILE
if test 919 -ne `wc -c <'tclmidi-2.0/mplay'`; then
echo shar: \"'tclmidi-2.0/mplay'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/mplay'
# end of 'tclmidi-2.0/mplay'
fi
if test -f 'tclmidi-2.0/patchlevel.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/patchlevel.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/patchlevel.h'\" \(86 characters\)
sed "s/^X//" >'tclmidi-2.0/patchlevel.h' <<'END_OF_FILE'
X#ifndef PATCHLEVEL_H
X#define PATCHLEVEL_H
Xconst char *TCLMIDI_VERSION = "2.0";
X#endif
END_OF_FILE
if test 86 -ne `wc -c <'tclmidi-2.0/patchlevel.h'`; then
echo shar: \"'tclmidi-2.0/patchlevel.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/patchlevel.h'
fi
if test -f 'tclmidi-2.0/rb/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/rb/makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/rb/makefile'\" \(319 characters\)
sed "s/^X//" >'tclmidi-2.0/rb/makefile' <<'END_OF_FILE'
XCC = cc
XCFLAGS = -g
X
XOBJS = rb.o list.o
X
XMOBJS = librb.a
X
Xall: librb.a
X
Xlibrb.a: $(OBJS)
X ar ru librb.a $(OBJS)
X ranlib librb.a
X #rm *.o
X
Xdepend:
X makedep .
X
X.c.o:
X $(CC) -c $(CFLAGS) $*.c
X
Xclean:
X -rm *.o librb.a
X
X# +mkdep+
Xlist.o: \
X ./list.h \
X list.c
X
Xrb.o: \
X ./rb.h \
X rb.c
X
END_OF_FILE
if test 319 -ne `wc -c <'tclmidi-2.0/rb/makefile'`; then
echo shar: \"'tclmidi-2.0/rb/makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/rb/makefile'
fi
if test -f 'tclmidi-2.0/smf/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/smf/Makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/smf/Makefile'\" \(304 characters\)
sed "s/^X//" >'tclmidi-2.0/smf/Makefile' <<'END_OF_FILE'
XCXX = CC
XCXX = g++
XCFLAGS = -g
XINDIRS =
X
XSMFFILES = SMFUtils.o SMFHead.o SMFTrack.o
X
X.SUFFIXES: .C $(.SUFFIXES)
X
Xobjs: $(SMFFILES)
X touch objs
X
X.C.o:
X $(CXX) $(CFLAGS) $(INCDIRS) -c -o $@ $<
X
Xclean:
X -rm *.o objs
X
XSMFUtils.o: SMFUtils.h
XSMFHead.o: SMFHead.h SMFUtils.h
XSMFTrack.o: SMFTrack.h SMFUtils.h
END_OF_FILE
if test 304 -ne `wc -c <'tclmidi-2.0/smf/Makefile'`; then
echo shar: \"'tclmidi-2.0/smf/Makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/smf/Makefile'
fi
if test -f 'tclmidi-2.0/song/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/song/Makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/song/Makefile'\" \(622 characters\)
sed "s/^X//" >'tclmidi-2.0/song/Makefile' <<'END_OF_FILE'
XCXX = CC
XCXX = g++
XCFLAGS = -g
XINCDIRS = -I../rb -I../events -I../smf
X
XSONGFILES = EventTree.o Song.o
X
X.SUFFIXES: .C $(.SUFFIXES)
X
X.C.o:
X $(CXX) $(CFLAGS) $(INCDIRS) -c -o $@ $<
X
Xobjs: $(SONGFILES)
X touch objs
X
Xclean:
X -rm *.o objs
X
XEventTree.o: EventTree.h ../events/Event.h ../smf/SMFTrack.h \
X ../smf/SMFUtils.h ../events/Note.h ../events/NormalEvent.h \
X ../events/MetaEOT.h ../events/MetaEvent.h
XSong.o: Song.h ../events/EventUtil.h ../events/Event.h ../smf/SMFHead.h \
X ../smf/SMFUtils.h ../smf/SMFTrack.h EventTree.h ../events/Note.h \
X ../events/NormalEvent.h ../events/MetaEOT.h ../events/MetaEvent.h
END_OF_FILE
if test 622 -ne `wc -c <'tclmidi-2.0/song/Makefile'`; then
echo shar: \"'tclmidi-2.0/song/Makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/song/Makefile'
fi
if test -f 'tclmidi-2.0/song/TODO' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/song/TODO'\"
else
echo shar: Extracting \"'tclmidi-2.0/song/TODO'\" \(1 character\)
sed "s/^X//" >'tclmidi-2.0/song/TODO' <<'END_OF_FILE'
X
END_OF_FILE
if test 1 -ne `wc -c <'tclmidi-2.0/song/TODO'`; then
echo shar: \"'tclmidi-2.0/song/TODO'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/song/TODO'
fi
if test -f 'tclmidi-2.0/tclmAppInit.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tclmAppInit.C'\"
else
echo shar: Extracting \"'tclmidi-2.0/tclmAppInit.C'\" \(202 characters\)
sed "s/^X//" >'tclmidi-2.0/tclmAppInit.C' <<'END_OF_FILE'
Xextern "C" {
X#include <tcl.h>
X}
X#include <iostream.h>
X
X#include "tclmidi.h"
X
Xint
XTcl_AppInit(Tcl_Interp *interp)
X{
X
X if (Tcl_Init(interp) != TCL_OK)
X return (TCL_ERROR);
X return (Tclm_Init(interp));
X}
END_OF_FILE
if test 202 -ne `wc -c <'tclmidi-2.0/tclmAppInit.C'`; then
echo shar: \"'tclmidi-2.0/tclmAppInit.C'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/tclmAppInit.C'
fi
if test -f 'tclmidi-2.0/tclmidi.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tclmidi.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/tclmidi.h'\" \(433 characters\)
sed "s/^X//" >'tclmidi-2.0/tclmidi.h' <<'END_OF_FILE'
X#ifndef TCLM_H
X#define TCLM_H
X
X#include "TclmInterp.h"
X
Xextern int Tclm_Init(Tcl_Interp *interp);
Xextern int Tclm_PlayInit(Tcl_Interp *interp, TclmInterp *tclm_interp);
Xextern int Tcl_GetLong(Tcl_Interp *interp, const char *string, long *longPtr);
Xextern int Tclm_ParseDataByte(Tcl_Interp *interp, const char *str,
X unsigned char *val);
Xextern void Tclm_PrintData(ostream &buf, const unsigned char *data,
X long length);
X#endif
END_OF_FILE
if test 433 -ne `wc -c <'tclmidi-2.0/tclmidi.h'`; then
echo shar: \"'tclmidi-2.0/tclmidi.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/tclmidi.h'
fi
if test -f 'tclmidi-2.0/tests/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/README'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/README'\" \(437 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/README' <<'END_OF_FILE'
X Don't expect much from these tests. They're basically just for
Xmy benefit. I used them to test the tclmidi commands as I created
Xthem. They don't do anything useful like give you a success/failed
Xmessage. You must look at the code and figure out if they did the
Xright thing.
X The only reason I'm including them is so people can take a look
Xat the various syntax for the commands, and see simple examples of
Xhow to use them.
X
Xmike
END_OF_FILE
if test 437 -ne `wc -c <'tclmidi-2.0/tests/README'`; then
echo shar: \"'tclmidi-2.0/tests/README'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/tests/README'
fi
if test -f 'tclmidi-2.0/tests/copy.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/copy.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/copy.test'\" \(275 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/copy.test' <<'END_OF_FILE'
X#!../tclmidi
Xset mf [midimake]
Xmidiconfig $mf {tracks 1}
Xmidiput $mf 0 {0 NoteOff 0 1}
Xmidiput $mf 0 {4 Note 0 1 2 1}
Xmidiput $mf 0 {5 KeyPressure 0 1 2}
X
Xmidicopy "$mf 0" 10 "$mf 0" 0 10
X
Xmidirewind $mf
Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts stdout $event}
END_OF_FILE
if test 275 -ne `wc -c <'tclmidi-2.0/tests/copy.test'`; then
echo shar: \"'tclmidi-2.0/tests/copy.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/copy.test'
# end of 'tclmidi-2.0/tests/copy.test'
fi
if test -f 'tclmidi-2.0/tests/merge.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/merge.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/merge.test'\" \(433 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/merge.test' <<'END_OF_FILE'
X#!../tclmidi
Xset mf [midimake]
Xmidiconfig $mf {tracks 1}
Xmidiput $mf 0 {0 NoteOff 0 1}
Xmidiput $mf 0 {4 Note 0 1 2 1}
Xmidiput $mf 0 {5 KeyPressure 0 1 2}
X
Xset mf2 [midimake]
Xmidiconfig $mf2 {tracks 1} {division 480}
Xmidiput $mf2 0 {16 NoteOff 0 1}
Xmidiput $mf2 0 {24 Note 0 1 2 1}
Xmidiput $mf2 0 {4 KeyPressure 0 1 2}
X
Xmidimerge "$mf 0" "$mf2 0"
X
Xmidirewind $mf
Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts stdout $event}
END_OF_FILE
if test 433 -ne `wc -c <'tclmidi-2.0/tests/merge.test'`; then
echo shar: \"'tclmidi-2.0/tests/merge.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/merge.test'
# end of 'tclmidi-2.0/tests/merge.test'
fi
if test -f 'tclmidi-2.0/tests/move.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/move.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/move.test'\" \(520 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/move.test' <<'END_OF_FILE'
X#!../tclmidi
Xset mf [midimake]
Xmidiconfig $mf {tracks 1}
Xmidiput $mf 0 {0 NoteOff 0 1}
X# This next event sticks into the move range
Xmidiput $mf 0 {1 Note 0 1 2 5}
Xmidiput $mf 0 {4 Note 0 1 2 1}
Xmidiput $mf 0 {5 KeyPressure 1 1 2}
X# This next event sticks out of the move range
Xmidiput $mf 0 {6 Note 1 1 2 10}
X# notes in the dest range
Xmidiput $mf 0 {10 Note 0 1 2 5}
Xmidiput $mf 0 {15 Note 0 1 2 5}
X
Xmidimove "$mf 0" 10 "$mf 0" 5 10
X
Xmidirewind $mf
Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts stdout $event}
END_OF_FILE
if test 520 -ne `wc -c <'tclmidi-2.0/tests/move.test'`; then
echo shar: \"'tclmidi-2.0/tests/move.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/move.test'
# end of 'tclmidi-2.0/tests/move.test'
fi
if test -f 'tclmidi-2.0/tests/put.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/put.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/put.test'\" \(1169 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/put.test' <<'END_OF_FILE'
X#!../tclmidi
Xset mf [midimake]
Xmidiconfig $mf {tracks 1}
Xmidiput $mf 0 {0 NoteOff 0 1}
Xmidiput $mf 0 {1 NoteOff 0 1 2}
Xmidiput $mf 0 {3 NoteOn 0 1 2}
Xmidiput $mf 0 {4 Note 0 1 2 1}
Xmidiput $mf 0 {5 KeyPressure 0 1 2}
Xmidiput $mf 0 {6 Parameter 0 1 2}
Xmidiput $mf 0 {7 Program 0 1}
Xmidiput $mf 0 {8 ChannelPressure 0 1}
Xmidiput $mf 0 {9 PitchWheel 0 1}
Xmidiput $mf 0 {10 SystemExclusive {0x01 0x02 0x03}}
Xmidiput $mf 0 {11 MetaSequenceNumber 1}
Xmidiput $mf 0 {12 MetaText "MetaText"}
Xmidiput $mf 0 {13 MetaCopyright "MetaCopyright"}
Xmidiput $mf 0 {14 MetaSequenceName "MetaSequenceName"}
Xmidiput $mf 0 {15 MetaInstrumentName "MetaInstrumentName"}
Xmidiput $mf 0 {16 MetaLyric "MetaLyric"}
Xmidiput $mf 0 {17 MetaMarker "MetaMarker"}
Xmidiput $mf 0 {18 MetaCue "MetaCue"}
Xmidiput $mf 0 {19 MetaChannelPrefix {0x01 0x02 0x03}}
Xmidiput $mf 0 {20 MetaPortNumber 1}
Xmidiput $mf 0 {21 MetaEndOfTrack}
Xmidiput $mf 0 {22 MetaTempo 100}
Xmidiput $mf 0 {23 MetaSMPTE 1 2 3 4 5}
Xmidiput $mf 0 {24 MetaTime 3 4 24 8}
Xmidiput $mf 0 {25 MetaKey "E flat" minor}
Xmidiput $mf 0 {26 MetaSequencerSpecific {0x01 0x02 0x03}}
Xmidiput $mf 0 {27 MetaUnknown 0x60 {0x01 0x02 0x03}}
X
Xmidirewind $mf
END_OF_FILE
if test 1169 -ne `wc -c <'tclmidi-2.0/tests/put.test'`; then
echo shar: \"'tclmidi-2.0/tests/put.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/put.test'
# end of 'tclmidi-2.0/tests/put.test'
fi
if test -f 'tclmidi-2.0/tkmAppInit.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tkmAppInit.C'\"
else
echo shar: Extracting \"'tclmidi-2.0/tkmAppInit.C'\" \(321 characters\)
sed "s/^X//" >'tclmidi-2.0/tkmAppInit.C' <<'END_OF_FILE'
Xextern "C" {
X#include <tcl.h>
X#include <tk.h>
X}
X#include <iostream.h>
X
X#include "tclmidi.h"
X
Xint
XTcl_AppInit(Tcl_Interp *interp)
X{
X Tk_Window main;
X
X main = Tk_MainWindow(interp);
X
X if (Tcl_Init(interp) != TCL_OK)
X return (TCL_ERROR);
X if (Tk_Init(interp) != TCL_OK)
X return (TCL_ERROR);
X return (Tclm_Init(interp));
X}
END_OF_FILE
if test 321 -ne `wc -c <'tclmidi-2.0/tkmAppInit.C'`; then
echo shar: \"'tclmidi-2.0/tkmAppInit.C'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/tkmAppInit.C'
fi
echo shar: End of archive 14 \(of 14\).
cp /dev/null ark14isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 14 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...