home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume43
/
tclmidi
/
part13
< prev
next >
Wrap
Internet Message Format
|
1994-07-21
|
62KB
From: durian@boogie.com (Mike Durian)
Newsgroups: comp.sources.misc
Subject: v43i121: tclmidi - A language for manipulating MIDI files, v2.0, Part13/14
Date: 21 Jul 1994 19:28:24 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <30n3r8$79n@sparky.sterling.com>
X-Md4-Signature: 7d1acfb27b02652d4d0008fddf0c1daa
Submitted-by: durian@boogie.com (Mike Durian)
Posting-number: Volume 43, Issue 121
Archive-name: tclmidi/part13
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/INSTALL tclmidi-2.0/TclmInterp.h
# tclmidi-2.0/contrib/msplit tclmidi-2.0/drivers/LINUX/INSTALL
# tclmidi-2.0/drivers/LINUX/midi.patch
# tclmidi-2.0/drivers/SVR4/PROBLEMS tclmidi-2.0/events/MetaCue.C
# tclmidi-2.0/events/MetaEvent.C tclmidi-2.0/events/NoteOff.C
# tclmidi-2.0/events/NoteOn.C tclmidi-2.0/events/TODO
# tclmidi-2.0/man/Makefile tclmidi-2.0/man/midiconfig.n
# tclmidi-2.0/man/midicopy.n tclmidi-2.0/man/mididelete.n
# tclmidi-2.0/man/mididevice.n tclmidi-2.0/man/midimerge.n
# tclmidi-2.0/man/midimove.n tclmidi-2.0/man/miditrack.n
# tclmidi-2.0/man/mrec.1 tclmidi-2.0/rb/list.c tclmidi-2.0/rb/list.h
# tclmidi-2.0/rb/rb.h tclmidi-2.0/tests/drange.test
# tclmidi-2.0/tests/putget.test tclmidi-2.0/tests/rw.test
# tclmidi-2.0/tests/split.test
# Wrapped by kent@sparky on Thu Jul 21 19:05:18 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 13 (of 14)."'
if test -f 'tclmidi-2.0/INSTALL' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/INSTALL'\"
else
echo shar: Extracting \"'tclmidi-2.0/INSTALL'\" \(2136 characters\)
sed "s/^X//" >'tclmidi-2.0/INSTALL' <<'END_OF_FILE'
XINSTALLING THE MPU401 DRIVER
X Before installing tclmidi-2.0, you will need to decide if you
Xwish to install one of the MPU401 drivers I have supplied.
XCurrently, I have drivers with the same interface for BSD/386,
X386BSD and variants, Linux and SVR4 variants. If you wish to install
Xa driver, go to the drivers directory (cd drivers) and
Xthen to the proper subdirectory (BSD, LINUX or SVR4). Follow
Xthe instructions in the README or INSTALL file. Unfortunately, I did not
Xfind a tester for SVR4. The basic code is there, but it probably
Xwill not work.
X The man page for the driver is in drivers/man. You can install
Xit with "install man-cooked" or "install man-raw". The cooked
Xversion will install a preprocessed man page, while the raw version
Xwill install an unprocessed version.
X
XINSTALLING THE TCLMIDI PACKAGE
X You will need to edit the Makefile and set some definitions
Xnear the top. You will need to define your C and C++ compilers,
Xranlib if you have it and some paths for installation. There are
Xsome defines for CFLAGS that also must be set.
X If you wish to build in support for the MPU401 driver, you
Xwill need to define USE_MPU401 or USE_MPU401COPY. Without one of
Xthese definitions, you won't be able to play or record. If you
Xdefine one of these, you must also add a defintion for your system
Xtype (BSD, LINUX or SVR4). This definiton only controls where
Xthe midi device header file is found, and is not needed if
Xyou haven't also defined one of the USE_* flags.
X Once you have customized the Makefile, you need only type
X make
Xand then
X make install.
X To install the man pages use
X make install-man-cooked
Xor
X make install-man-raw
X
X The man pages are written using the newer mandoc macros instead of
Xthe man macros. "Cooking" the man pages involves running them
Xthrough groff (you can use nroff if you want by editing man/Makefile),
Xand then installing the processed man pages. The raw target installs
Xthe man sources without processing them.
X
X If you want a version of tclmidi that includes tk support type
X make tkmidi
Xand then
X make install-tkmidi
X
X That should be everything.
END_OF_FILE
if test 2136 -ne `wc -c <'tclmidi-2.0/INSTALL'`; then
echo shar: \"'tclmidi-2.0/INSTALL'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/INSTALL'
fi
if test -f 'tclmidi-2.0/TclmInterp.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/TclmInterp.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/TclmInterp.h'\" \(2319 characters\)
sed "s/^X//" >'tclmidi-2.0/TclmInterp.h' <<'END_OF_FILE'
X/*-
X * Copyright (c) 1993, 1994 Michael B. Durian. All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Michael B. Durian.
X * 4. The name of the the Author may be used to endorse or promote
X * products derived from this software without specific prior written
X * permission.
X *
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
X * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
X * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X#ifndef TCLMINTERP_H
X#define TCLMINTERP_H
X
X#include <iostream.h>
X#include "Song.h"
X#include "MidiDevice.h"
X
Xextern "C" {
X#include <tcl.h>
X}
X
Xclass TclmInterp {
Xpublic:
X TclmInterp();
X TclmInterp(const TclmInterp &ti);
X ~TclmInterp();
X
X Song *GetSong(const char *key) const;
X char *AddSong(const Song *song);
X int DeleteSong(const char *key);
X Event *GetNextEvent(void) const;
X void SetNextEvent(const Event *event);
X void SetMidiDevice(MidiDevice *dev);
X MidiDevice *GetMidiDevice(void) const;
X
X TclmInterp &operator=(const TclmInterp &ti);
Xprivate:
X Tcl_HashTable hash_table;
X int current_song;
X Event *next_event;
X MidiDevice *device;
X};
X#endif
END_OF_FILE
if test 2319 -ne `wc -c <'tclmidi-2.0/TclmInterp.h'`; then
echo shar: \"'tclmidi-2.0/TclmInterp.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/TclmInterp.h'
fi
if test -f 'tclmidi-2.0/contrib/msplit' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/contrib/msplit'\"
else
echo shar: Extracting \"'tclmidi-2.0/contrib/msplit'\" \(1300 characters\)
sed "s/^X//" >'tclmidi-2.0/contrib/msplit' <<'END_OF_FILE'
X#!/usr/local/bin/tclmidi
X#
X# msplit - type 0 to type 1 SMF conversion filter
X#
X# Copyright (c) 1994 by Luchezar Georgiev, Bulgaria <lucho@midi.tu-varna.bg>
X#
X# The resulting file contains 18 tracks:
X# track 0 contains meta events,
X# tracks 1...16 - events for channels 1...16,
X# track 17 - SysEx events.
X# If there are no suitable events for a track, it's left empty. Sorry! :-)
X#
Xif {$argc} {
X puts stderr {Usage: msplit < type0.mid > type1.mid}
X exit 1
X}
X
Xset imf [midiread stdin]
Xset config [midiconfig $imf]
X
Xif {[lindex [lindex $config 0] 1]} {
X puts stderr {Input must be type 0}
X exit -1
X}
Xset division [lindex $config 1]
Xset xmf [midimake]
Xmidiconfig $xmf "format 0" $division "tracks 1"
Xset omf [midimake]
Xmidiconfig $omf "format 1" $division "tracks 18"
X
Xmidisplit "$imf 0" "$omf 0" "$xmf 0"
Xmidirewind $xmf
Xset errMsg ""
X
Xwhile {[set event [midiget $xmf 0 next]] != "EOT"} {
X switch [lindex $event 1] {
X "MetaEndOfTrack" {continue}
X "SystemExclusive" {set trk 17}
X default {set trk [expr [lindex $event 2] + 1]}
X }
X catch {
X midiput $omf $trk $event
X } errMsg
X if {$errMsg != ""} {
X puts stderr "$errMsg \"$event\""
X }
X}
X
Xfor {set i 1} {$i < 18} {incr i} {
X midiput $omf $i "[miditrack $omf $i end] MetaEndOfTrack"
X}
X
Xmidiwrite stdout $omf
Xmidifree $imf
Xmidifree $xmf
Xmidifree $omf
END_OF_FILE
if test 1300 -ne `wc -c <'tclmidi-2.0/contrib/msplit'`; then
echo shar: \"'tclmidi-2.0/contrib/msplit'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/contrib/msplit'
# end of 'tclmidi-2.0/contrib/msplit'
fi
if test -f 'tclmidi-2.0/drivers/LINUX/INSTALL' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/LINUX/INSTALL'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/LINUX/INSTALL'\" \(2071 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/LINUX/INSTALL' <<'END_OF_FILE'
X-1) Decide if you want the midi driver to be part of the kernel, or
X a loadable module. If you want it to be part of the kernel follow
X the first set of instruction. If you want it to be a loadable
X module, follow the second set. The loadable module stuff hasn't
X been tested. I don't know if it will work.
X
XKERNEL BUILTIN
X0) All paths are relative to /usr/src/linux
X1) Put the files midi.c, midiconf.c, quad.c and quad.h in drivers/char
X2) Put midi.h in include/linux
X3) Edit midiconf.c for the correct setup for your MPU401s.
X4) Apply the patches in midi.patch from the /usr/src/linux directory
X patch -p < midi.patch
X5) make a major number for MIDI_MAJOR in include/linux/major.h
X Something like:
X #define MIDI_MAJOR 28
X6) make the midi devices in /dev. Feel free to make extras if you
X have more than 3 MPU401s. Having extra entries in /dev doesn't
X hurt anything. I've assumed that the MIDI_MAJOR number is 28,
X if it is something else, change the 28s in the following lines
X to the correct value.
X
X mknod /dev/midi0 c 28 0
X mknod /dev/midi1 c 28 1
X mknod /dev/midi2 c 28 2
X chmod 666 /dev/midi*
X
X7) reconfig "make config"
X8) rebuild and install the kernel normally
X9) you're done
X
XLOADABLE MODULE
X1) Put midi.h in <linux/midi.h>
X2) Edit midiconf.c for the correct setup for your MPU401s.
X3) make a major number for MIDI_MAJOR in <linux/major.h>
X Something like:
X #define MIDI_MAJOR 28
X4) make the midi devices in /dev. Feel free to make extras if you
X have more than 3 MPU401s. Having extra entries in /dev doesn't
X hurt anything. I've assumed that the MIDI_MAJOR number is 28,
X if it is something else, change the 28s in the following lines
X to the correct value.
X
X mknod /dev/midi0 c 28 0
X mknod /dev/midi1 c 28 1
X mknod /dev/midi2 c 28 2
X chmod 666 /dev/midi*
X
X5) Take a look at the Makefile, I don't think you'll need to make
X any changes, but you never know.
X6) make
X7) "insmod midimodule" to install module
X8) "rmmod midimodule" (or is that "rmmod midi"?) to remove module
X9) that's it
END_OF_FILE
if test 2071 -ne `wc -c <'tclmidi-2.0/drivers/LINUX/INSTALL'`; then
echo shar: \"'tclmidi-2.0/drivers/LINUX/INSTALL'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/LINUX/INSTALL'
fi
if test -f 'tclmidi-2.0/drivers/LINUX/midi.patch' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/LINUX/midi.patch'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/LINUX/midi.patch'\" \(1272 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/LINUX/midi.patch' <<'END_OF_FILE'
X*** drivers/char/Makefile.orig Mon Apr 11 15:06:38 1994
X--- drivers/char/Makefile Mon Apr 11 15:10:59 1994
X***************
X*** 63,68 ****
X--- 63,73 ----
X SRCS := $(SRCS) tpqic02.c
X endif
X
X+ ifdef CONFIG_MIDI
X+ OBJS := $(OBJS) midiconf.o midi.o quad.o
X+ SRCS := $(SRCS) midiconf.c midi.c quad.c
X+ endif
X+
X ifdef M
X OBJS := $(OBJS) mouse.o
X SRCS := $(SRCS) mouse.c
X*** drivers/char/mem.c.orig Mon Apr 11 15:07:44 1994
X--- drivers/char/mem.c Mon Apr 11 15:09:48 1994
X***************
X*** 15,20 ****
X--- 15,22 ----
X #include <linux/tpqic02.h>
X #include <linux/malloc.h>
X #include <linux/mman.h>
X+ #include <linux/timer.h>
X+ #include <linux/midi.h>
X
X #include <asm/segment.h>
X #include <asm/io.h>
X***************
X*** 422,426 ****
X--- 424,431 ----
X NR_FTAPE_BUFFERS, ftape_big_buffer);
X mem_start = (long) ftape_big_buffer + NR_FTAPE_BUFFERS * 0x8000;
X #endif
X+ #ifdef CONFIG_MIDI
X+ mem_start = midiinit(mem_start);
X+ #endif
X return mem_start;
X }
X*** config.in.orig Sat Mar 12 17:17:37 1994
X--- config.in Mon Apr 11 15:06:11 1994
X***************
X*** 120,125 ****
X--- 120,126 ----
X if [ "$CONFIG_FTAPE" = "y" ]
X int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
X fi
X+ bool 'MIDI MPU401 UART device' CONFIG_MIDI n
X *
X * Sound
X *
END_OF_FILE
if test 1272 -ne `wc -c <'tclmidi-2.0/drivers/LINUX/midi.patch'`; then
echo shar: \"'tclmidi-2.0/drivers/LINUX/midi.patch'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/LINUX/midi.patch'
fi
if test -f 'tclmidi-2.0/drivers/SVR4/PROBLEMS' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/drivers/SVR4/PROBLEMS'\"
else
echo shar: Extracting \"'tclmidi-2.0/drivers/SVR4/PROBLEMS'\" \(1267 characters\)
sed "s/^X//" >'tclmidi-2.0/drivers/SVR4/PROBLEMS' <<'END_OF_FILE'
X I really don't understand how the polling should work, so that
Xstuff if probably incorrect. Look for comments containing XXXPOLL
X
X I don't know what the argument to midiintr is supposed to be
Xeither. I'm hoping it is a dev_t, but that's probably unlikely.
XLook for a comment containing XXXINTR.
X
X This driver should verify any pids set in the TIOCSPGRP ioctl.
XIf it doesn't verify them at the ioctl stage, the driver will
Xjust go ahead and try to kill whatever you set. This could be
Xany process at all (like init for example). A potential security
Xhole I think. Look for the XXXSIGNAL comments.
X
X For better timing accuracy, I now use long longs when converting
Xto/from smf ticks and kernel ticks. I don't know if the default
XSVR4 compiler supports long longs. I know GCC does. But, if you
Xuse GCC, you'll probably need to link in special math functions.
XThese are called __divdi3, __muldi3 etc. I've included the ones
Xthat are needed in quad.c and quad.h. These files are the versions
Xused with Linux. They'll probably need to be modified to work with
XSVR4. Look in the BSD directory to see what the unmodified files
Xlook like.
X I also don't know how to modify the makefile to compile multiple
Xfiles. You'll have to do figure it out on your own.
END_OF_FILE
if test 1267 -ne `wc -c <'tclmidi-2.0/drivers/SVR4/PROBLEMS'`; then
echo shar: \"'tclmidi-2.0/drivers/SVR4/PROBLEMS'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/drivers/SVR4/PROBLEMS'
fi
if test -f 'tclmidi-2.0/events/MetaCue.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/MetaCue.C'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/MetaCue.C'\" \(2286 characters\)
sed "s/^X//" >'tclmidi-2.0/events/MetaCue.C' <<'END_OF_FILE'
X/*-
X * Copyright (c) 1993, 1994 Michael B. Durian. All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Michael B. Durian.
X * 4. The name of the the Author may be used to endorse or promote
X * products derived from this software without specific prior written
X * permission.
X *
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
X * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
X * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X#include "MetaCue.h"
X
XMetaCueEvent::MetaCueEvent()
X{
X}
X
XMetaCueEvent::MetaCueEvent(unsigned long t, const char *str) :
X MetaTextEvent(t, str)
X{
X}
X
XMetaCueEvent::MetaCueEvent(const MetaCueEvent &e) :
X MetaTextEvent(e)
X{
X}
X
XMetaCueEvent::~MetaCueEvent()
X{
X}
X
XMetaCueEvent &
XMetaCueEvent::operator=(const MetaCueEvent &e)
X{
X
X (MetaTextEvent)*this = (MetaTextEvent)e;
X return (*this);
X}
X
Xchar *
XMetaCueEvent::GetEventStr(void) const
X{
X
X return (MetaTextEvent::GetEventStr());
X}
X
Xostream &
Xoperator<<(ostream &os, const MetaCueEvent &e)
X{
X char *str;
X
X os << (str = e.GetEventStr());
X delete str;
X return (os);
X}
END_OF_FILE
if test 2286 -ne `wc -c <'tclmidi-2.0/events/MetaCue.C'`; then
echo shar: \"'tclmidi-2.0/events/MetaCue.C'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/MetaCue.C'
fi
if test -f 'tclmidi-2.0/events/MetaEvent.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/MetaEvent.C'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/MetaEvent.C'\" \(2147 characters\)
sed "s/^X//" >'tclmidi-2.0/events/MetaEvent.C' <<'END_OF_FILE'
X/*-
X * Copyright (c) 1993, 1994 Michael B. Durian. All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Michael B. Durian.
X * 4. The name of the the Author may be used to endorse or promote
X * products derived from this software without specific prior written
X * permission.
X *
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
X * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
X * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X#include "MetaEvent.h"
X
XMetaEvent::MetaEvent()
X{
X}
X
XMetaEvent::MetaEvent(unsigned long t) : Event(t)
X{
X}
X
XMetaEvent::MetaEvent(const MetaEvent &e) : Event(e)
X{
X}
X
XMetaEvent &
XMetaEvent::operator=(const MetaEvent &e)
X{
X
X (Event)*this = (Event)e;
X return (*this);
X}
X
Xchar *
XMetaEvent::GetEventStr(void) const
X{
X
X return (Event::GetEventStr());
X}
X
Xostream &
Xoperator<<(ostream &os, const MetaEvent &e)
X{
X char *str;
X
X os << (str = e.GetEventStr());
X delete str;
X return (os);
X}
END_OF_FILE
if test 2147 -ne `wc -c <'tclmidi-2.0/events/MetaEvent.C'`; then
echo shar: \"'tclmidi-2.0/events/MetaEvent.C'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/MetaEvent.C'
fi
if test -f 'tclmidi-2.0/events/NoteOff.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/NoteOff.C'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/NoteOff.C'\" \(2308 characters\)
sed "s/^X//" >'tclmidi-2.0/events/NoteOff.C' <<'END_OF_FILE'
X/*-
X * Copyright (c) 1993, 1994 Michael B. Durian. All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Michael B. Durian.
X * 4. The name of the the Author may be used to endorse or promote
X * products derived from this software without specific prior written
X * permission.
X *
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
X * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
X * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X#include "NoteOff.h"
X
XNoteOffEvent::NoteOffEvent()
X{
X}
X
XNoteOffEvent::NoteOffEvent(unsigned long t, unsigned char chan,
X unsigned char pit, unsigned char vel, const NoteEvent *np) :
X NoteEvent(t, chan, pit, vel, np)
X{
X}
X
XNoteOffEvent::NoteOffEvent(const NoteOffEvent &e) : NoteEvent(e)
X{
X}
X
XNoteOffEvent &
XNoteOffEvent::operator=(const NoteOffEvent &e)
X{
X
X (NoteEvent)*this = (NoteEvent)e;
X return (*this);
X}
X
Xchar *
XNoteOffEvent::GetEventStr(void) const
X{
X
X return (NoteEvent::GetEventStr());
X}
X
Xostream &
Xoperator<<(ostream &os, const NoteOffEvent &e)
X{
X char *str;
X
X os << (str = e.GetEventStr());
X delete str;
X return (os);
X}
END_OF_FILE
if test 2308 -ne `wc -c <'tclmidi-2.0/events/NoteOff.C'`; then
echo shar: \"'tclmidi-2.0/events/NoteOff.C'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/NoteOff.C'
fi
if test -f 'tclmidi-2.0/events/NoteOn.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/NoteOn.C'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/NoteOn.C'\" \(2295 characters\)
sed "s/^X//" >'tclmidi-2.0/events/NoteOn.C' <<'END_OF_FILE'
X/*-
X * Copyright (c) 1993, 1994 Michael B. Durian. All rights reserved.
X *
X * Redistribution and use in source and binary forms, with or without
X * modification, are permitted provided that the following conditions
X * are met:
X * 1. Redistributions of source code must retain the above copyright
X * notice, this list of conditions and the following disclaimer.
X * 2. Redistributions in binary form must reproduce the above copyright
X * notice, this list of conditions and the following disclaimer in the
X * documentation and/or other materials provided with the distribution.
X * 3. All advertising materials mentioning features or use of this software
X * must display the following acknowledgement:
X * This product includes software developed by Michael B. Durian.
X * 4. The name of the the Author may be used to endorse or promote
X * products derived from this software without specific prior written
X * permission.
X *
X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
X * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
X * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X * SUCH DAMAGE.
X */
X#include "NoteOn.h"
X
XNoteOnEvent::NoteOnEvent()
X{
X}
X
XNoteOnEvent::NoteOnEvent(unsigned long t, unsigned char chan,
X unsigned char pit, unsigned char vel, const NoteEvent *np) :
X NoteEvent(t, chan, pit, vel, np)
X{
X}
X
XNoteOnEvent::NoteOnEvent(const NoteOnEvent &e) : NoteEvent(e)
X{
X}
X
XNoteOnEvent &
XNoteOnEvent::operator=(const NoteOnEvent &e)
X{
X
X (NoteEvent)*this = (NoteEvent)e;
X return (*this);
X}
X
Xchar *
XNoteOnEvent::GetEventStr(void) const
X{
X
X return (NoteEvent::GetEventStr());
X}
X
Xostream &
Xoperator<<(ostream &os, const NoteOnEvent &e)
X{
X char *str;
X
X os << (str = e.GetEventStr());
X delete str;
X return (os);
X}
END_OF_FILE
if test 2295 -ne `wc -c <'tclmidi-2.0/events/NoteOn.C'`; then
echo shar: \"'tclmidi-2.0/events/NoteOn.C'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/NoteOn.C'
fi
if test -f 'tclmidi-2.0/events/TODO' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/events/TODO'\"
else
echo shar: Extracting \"'tclmidi-2.0/events/TODO'\" \(1 character\)
sed "s/^X//" >'tclmidi-2.0/events/TODO' <<'END_OF_FILE'
X
END_OF_FILE
if test 1 -ne `wc -c <'tclmidi-2.0/events/TODO'`; then
echo shar: \"'tclmidi-2.0/events/TODO'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/events/TODO'
fi
if test -f 'tclmidi-2.0/man/Makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/Makefile'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/Makefile'\" \(1220 characters\)
sed "s/^X//" >'tclmidi-2.0/man/Makefile' <<'END_OF_FILE'
X#
X# This is the command to format the man pages
X#
XROFF = groff -mandoc -Tascii
X
X#
X# This is where you want the man pages to go
X#
XMANPATH = /usr/local/man
X
X#
X# These are the ownships of the man pages
X#
XMANOWN = bin
XMANGRP = bin
X
XMANN = midiconfig.n midievents.n midifree.n midiget.n midimake.n \
X midimerge.n midiplay.n midiput.n midiread.n midirecord.n \
X midirewind.n midisplit.n midistop.n midiwait.n midiwrite.n \
X midiversion.n midimove.n midicopy.n mididelete.n miditrack.n \
X mididevice.n
XMAN1 = mplay.1 mrec.1 tclmidi.1 minfo.1 midtotcl.1
X
XMANNCOOKED = midiconfig.0 midievents.0 midifree.0 midiget.0 midimake.0 \
X midimerge.0 midiplay.0 midiput.0 midiread.0 midirecord.0 \
X midirewind.0 midisplit.0 midistop.0 midiwait.0 midiwrite.0 \
X midiversion.0 midimove.0 midicopy.0 mididelete.0 miditrack.0 \
X mididevice.0
XMAN1COOKED = mplay.0 mrec.0 tclmidi.0 minfo.0 midtotcl.0
X
X.SUFFIXES: .0 .1 .n
X
Xinstall-raw:
X cp $(MANN) $(MANPATH)/mann
X cp $(MAN1) $(MANPATH)/man1
X
Xinstall-cooked: $(MANNCOOKED) $(MAN1COOKED)
X cp $(MANNCOOKED) $(MANPATH)/catn
X cp $(MAN1COOKED) $(MANPATH)/cat1
X
Xclean:
X rm -f $(MANNCOOKED) $(MAN1COOKED)
X
X.1.0:
X $(ROFF) $< > $@
X
X.n.0:
X $(ROFF) $< > $@
END_OF_FILE
if test 1220 -ne `wc -c <'tclmidi-2.0/man/Makefile'`; then
echo shar: \"'tclmidi-2.0/man/Makefile'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/Makefile'
fi
if test -f 'tclmidi-2.0/man/midiconfig.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midiconfig.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midiconfig.n'\" \(2112 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midiconfig.n' <<'END_OF_FILE'
X.Dd January 14, 1994
X.Dt MIDICONFIG N
X.Os
X.Sh NAME
X.Nm midiconfig
X.Nd "tclmidi command to get or modify the configuration values of a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Ar mfileId
X.Op format Op value
X.Op division Op value
X.Op tracks Op value
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xgets or modifies the configurations
Xvalues of
Xa \%MIDI song.
X.Pp
XWithout arguments
X.Nm
Xreports all three configuration values.
XIt can also take up to three optional arguments.
XAll arguments should be lists consisting of the parameter
Xname followed by an optional value.
XIf a value for a parameter is not specified then the current
Xsetting is reported.
XIf a value is specified then the song parameter is changed.
X.Pp
XmfileId is a valid \%MIDI song identifier as returned by
X.Xr midimake n
Xor
X.Xr midiread n .
X.Pp
XThe different parameters are:
X.Bl -tag -width division
X.It format
XThis option determines the song type.
XThere are three valid values: 0, 1 and 2.
XA format 0 song has only one track which
Xintermixes meta and normal events.
XA format 1 song can have many tracks, but
Xtrack 0 always contains most of the meta events,
Xspecifically MetaTempo events.
XA format 2 song is similar to format 1, but
Xeach track can be played separately instead
Xof playing them all in parallel.
X.It division
XThis specifies the resolution of the timing
Xfor the song.
XIf the unit of quanta for a song is is clock
Xtick, there will be
X.Em value
Xclock ticks per
Xbeat.
X.It tracks
XThis option specifies the number of tracks
Xin the song.
XThese will by dynamically created and freed
Xautomatically.
XThe tracks are numbered 0 through
X.Em value
X- 1 including.
XA format 0 song should have only one track.
X.El
X.Sh RETURN VALUES
XIf parameters are being set,
X.Nm
Xwill return nothing.
XIf parameters are being queried,
Xa list of lists will be returned.
XEach sublist will contain the parameter
Xname and its associated value.
XThe parameters are returned in the order
Xspecified or in the order
X.Em format, division, tracks
Xif
X.Nm
Xis called without arguments.
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 2112 -ne `wc -c <'tclmidi-2.0/man/midiconfig.n'`; then
echo shar: \"'tclmidi-2.0/man/midiconfig.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midiconfig.n'
fi
if test -f 'tclmidi-2.0/man/midicopy.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midicopy.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midicopy.n'\" \(1766 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midicopy.n' <<'END_OF_FILE'
X.Dd April 13, 1994
X.Dt MIDICOPY N
X.Os
X.Sh NAME
X.Nm midicopy
X.Nd "tclmidi command to copy a range of events in a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Pf { Ar destMidiID destTrack Ns }
X.Ar destStartTime
X.Pf { Ar srcMidiID srcTrack Ns }
X.Ar srcStartTime
X.Ar srcEndTime
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xcopies a range of events.
XThese events can be copied from one track to another,
Xor copied within the same track.
XThe source range may overlap with the destination.
X.Pp
XThe first argument is a list specifying a particular track
Xin a \%MIDI song.
XThe first element of this list is a \%MIDI song identifier
Xas returned by
X.Xr midimake n ,
Xor
X.Xr midinew n .
XThe second element is a valid track number in the \%MIDI song.
XThis list specifies the destination track for the copy.
X.Pp
XThe third argument is the time to start depositing the
Xevents specified in the source range.
XNote, the first event might not be placed at exactly the
Xrequested time if an event does not occur at the start
Xtime for the source range.
XThe offset between the first event and the destination start
Xtime will be the same as the offset between the first event
Xfound in the source range and the start time of the source range.
X.Pp
XThe fourth argument is another list identical in form to
Xthe list identifying the destination track.
XThis list specified the source track.
X.Pp
XThe fifth and last arguments specify the range of events to
Xbe copied.
XThey determine the start and end times of the range.
XAll events found at time
X.Ar srcStartTime
Xup to, but not including events found at time
X.Ar srcEndTime
Xwill be copied.
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.Xr midimove n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1766 -ne `wc -c <'tclmidi-2.0/man/midicopy.n'`; then
echo shar: \"'tclmidi-2.0/man/midicopy.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midicopy.n'
fi
if test -f 'tclmidi-2.0/man/mididelete.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/mididelete.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/mididelete.n'\" \(1197 characters\)
sed "s/^X//" >'tclmidi-2.0/man/mididelete.n' <<'END_OF_FILE'
X.Dd April 13, 1994
X.Dt MIDIDELETE N
X.Os
X.Sh NAME
X.Nm mididelete
X.Nd "tclmidi command to delete an event or events in a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Ar MidiID
X.Ar track
X.Ar event
X.br
X.Nm
X.Ar MidiID
X.Ar track
X.Ar Dq range
X.Ar start
X.Ar end
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xdeletes one or more events from a specified
Xtrack in 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.
XIn the first form, the third argument is a specific event
Xto remove.
XFor formatting of events, see
X.Xr midievents n .
X.Pp
XIn the second form, the third argument is the string
X.Dq range .
XThe fourth argument is then the start time of events
Xto be delete and the last argument is the end time of
Xthe range.
XAll events starting at time
X.Ar start
Xup to but not including events at time
X.Ar end
Xare then deleted.
X.Sh RETURN VALUES
X.Nm
Xreturns a 1 if the event or events were successfully removed,
Xor 0 if, in the first case, the event could not be found.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiread n ,
X.Xr midimake n ,
X.Xr midiput n ,
X.Xr midievents n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1197 -ne `wc -c <'tclmidi-2.0/man/mididelete.n'`; then
echo shar: \"'tclmidi-2.0/man/mididelete.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/mididelete.n'
fi
if test -f 'tclmidi-2.0/man/mididevice.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/mididevice.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/mididevice.n'\" \(1615 characters\)
sed "s/^X//" >'tclmidi-2.0/man/mididevice.n' <<'END_OF_FILE'
X.Dd July 11, 1994
X.Dt MIDIDEVICE N
X.Os
X.Sh NAME
X.Nm mididevice
X.Nd "tclmidi command to get or modify MIDI device configuration values"
X.Sh SYNOPSIS
X.Nm
X.Op name Op value
X.Op midithru Op value
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xgets or modifies the configurations
Xvalues for a MIDI device.
XCurrently, only two configuration values are support, though
Xmore might be added in the future.
X.Pp
XWithout arguments
X.Nm
Xreports all configuration values.
XIt can also take option arguments.
XAll arguments should be lists consisting of the parameter
Xname followed by an optional value.
XIf a value for a parameter is not specified then the current
Xsetting is reported.
XIf a value is specified then that parameter is changed.
X.Pp
XThe different parameters are:
X.Bl -tag -width division
X.It name
XThis controls the device interface name.
XThe default value is
X.Dq /dev/midi0 .
X.It midithru
XThis paramter controls if data arriving at the \%MIDI IN
Xport is passed to the \%MIDI OUT port.
XBy default it is not.
XThe parameter is a boolean value and should be one of
X.Dq yes ,
X.Dq on ,
X.Dq true ,
X.Dq 1 ,
X.Dq no ,
X.Dq off ,
X.Dq false
Xor
X.Dq 0 .
X.El
X.Sh RETURN VALUES
XIf parameters are being set,
X.Nm
Xwill return nothing.
XIf parameters are being queried,
Xa list of lists will be returned.
XEach sublist will contain the parameter
Xname and its associated value.
XThe parameters are returned in the order
Xspecified or in the order
X.Em name, midithru
Xif
X.Nm
Xis called without arguments.
X.Pp
XIf there is no device configured with tclmidi,
X.Nm
Xwill return 0.
X.Sh SEE ALSO
X.Xr tclmidi 1
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1615 -ne `wc -c <'tclmidi-2.0/man/mididevice.n'`; then
echo shar: \"'tclmidi-2.0/man/mididevice.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/mididevice.n'
fi
if test -f 'tclmidi-2.0/man/midimerge.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midimerge.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midimerge.n'\" \(1287 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midimerge.n' <<'END_OF_FILE'
X.Dd January 30, 1994
X.Dt MIDIMERGE N
X.Os
X.Sh NAME
X.Nm midimerge
X.Nd "tclmdi command to merge multiple tracks of MIDI songs to one track"
X.Sh SYNOPSIS
X.Nm
X.Pf { Ar destMidiID destTrack Ns }
X.Pf { Ar srcMidiID srcTrack Ns }
X.Op { Ar srcMidiID srcTrack Ns } ...
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xmerges one or more source tracks to a single destination track
Xof a \%MIDI song.
XThe first option is a list that designates output track.
XThe first element of that list is the \%MIDI song descriptor
Xfor the track, and the second argument of the list is the
Xtrack in that \%MIDI song.
X.Pp
XThe second, and optional remaining arguments, are lists specifying
Xthe source tracks.
XThe form of the source lists is the same as that for the destination
Xtrack.
X.Pp
XThe times of events in a source track are adjusted as necessary to convert
Xfrom the division of the source track to the division of the
Xdestination track.
XSee
X.Xr midiconfig n
Xfor a description of the division song configuration option.
X.Pp
XAll \%MIDI song descriptors should be values returned from a
Xcall to
X.Xr midimake n
Xor
X.Xr midiread n .
X.Sh RETURN VALUES
X.Nm
Xreturns nothing.
X.Sh SEE ALSO
X.Xr tclm 1 ,
X.Xr midiconfig n ,
X.Xr midisplit n ,
X.Xr midimake n ,
X.Xr midiread n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1287 -ne `wc -c <'tclmidi-2.0/man/midimerge.n'`; then
echo shar: \"'tclmidi-2.0/man/midimerge.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midimerge.n'
fi
if test -f 'tclmidi-2.0/man/midimove.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/midimove.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/midimove.n'\" \(1761 characters\)
sed "s/^X//" >'tclmidi-2.0/man/midimove.n' <<'END_OF_FILE'
X.Dd April 13, 1994
X.Dt MIDIMOVE N
X.Os
X.Sh NAME
X.Nm midimove
X.Nd "tclmidi command to move a range of events in a MIDI song"
X.Sh SYNOPSIS
X.Nm
X.Pf { Ar destMidiID destTrack Ns }
X.Ar destStartTime
X.Pf { Ar srcMidiID srcTrack Ns }
X.Ar srcStartTime
X.Ar srcEndTime
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xmoves a range of events.
XThese events can be moved from one track to another,
Xor moved within the same track.
XThe source range may overlap with the destination.
X.Pp
XThe first argument is a list specifying a particular track
Xin a \%MIDI song.
XThe first element of this list is a \%MIDI song identifier
Xas returned by
X.Xr midimake n ,
Xor
X.Xr midinew n .
XThe second element is a valid track number in the \%MIDI song.
XThis list specifies the destination track for the move.
X.Pp
XThe third argument is the time to start depositing the
Xevents specified in the source range.
XNote, the first event might not be placed at exactly the
Xrequested time if an event does not occur at the start
Xtime for the source range.
XThe offset between the first event and the destination start
Xtime will be the same as the offset between the first event
Xfound in the source range and the start time of the source range.
X.Pp
XThe fourth argument is another list identical in form to
Xthe list identifying the destination track.
XThis list specified the source track.
X.Pp
XThe fifth and last arguments specify the range of events to
Xbe moved.
XThey determine the start and end times of the range.
XAll events found at time
X.Ar srcStartTime
Xup to, but not including events found at time
X.Ar srcEndTime
Xwill be moved.
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.Xr midicopy n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1761 -ne `wc -c <'tclmidi-2.0/man/midimove.n'`; then
echo shar: \"'tclmidi-2.0/man/midimove.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/midimove.n'
fi
if test -f 'tclmidi-2.0/man/miditrack.n' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/miditrack.n'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/miditrack.n'\" \(1281 characters\)
sed "s/^X//" >'tclmidi-2.0/man/miditrack.n' <<'END_OF_FILE'
X.Dd June 22, 1994
X.Dt MIDITRACK N
X.Os
X.Sh NAME
X.Nm miditrack
X.Nd "tclmidi command to get information about a MIDI track"
X.Sh SYNOPSIS
X.Nm
X.Ar mfileId
X.Ar track
X.Ar {start|end}
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xcommand that
Xgets information about a \%MIDI track.
XCurrently two types of information can be obtained.
XThese are the time of the first event found in
Xthe track, and the time of the last event in the track.
XThe time of the last event in the track might be different
Xthan that returned by a call to
X.Xr midiget
Xgetting the last event in a track.
XThis is because
X.Xr midiget
Xreturns NoteOn/NoteOff event pairs as a single Note
Xevent, and the Note event contains the time of the
XNoteOn event.
X.Nm
Xwill return the time of the last event in a file
Xincluding NoteOff halves of Note events.
X.Pp
XThe first argument to
X.Nm
Xis a \%MIDI song identifier.
XThe second argument is a track number of that song,
Xand the last argument is one of either
X.Dq start
Xor
X.Dq end Ns .
X.Sh RETURN VALUES
X.Nm
Xreturns the time of the first or last event in a track
Xfor the
X.Ar start
Xand
X.Ar end
Xoptions.
X.Sh NOTES
X.Nm
Xmight be expanded in the future to supply other types
Xof information about \%MIDI tracks.
X.Sh SEE ALSO
X.Xr tclmidi 1 ,
X.Xr midiget n
X.Sh AUTHOR
XMike Durian - durian@boogie.com
END_OF_FILE
if test 1281 -ne `wc -c <'tclmidi-2.0/man/miditrack.n'`; then
echo shar: \"'tclmidi-2.0/man/miditrack.n'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/miditrack.n'
fi
if test -f 'tclmidi-2.0/man/mrec.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/man/mrec.1'\"
else
echo shar: Extracting \"'tclmidi-2.0/man/mrec.1'\" \(2176 characters\)
sed "s/^X//" >'tclmidi-2.0/man/mrec.1' <<'END_OF_FILE'
X.Dd February 10, 1994
X.Dt MREC 1
X.Os
X.Sh NAME
X.Nm mrec
X.Nd "a tclmidi script to record a MIDI file"
X.Sh SYNOPSIS
X.Nm
X.Op Fl merge
X.Op Fl thru
X.Oo
X.Op Fl repeat
X.Fl play Ar play_filename
X.Oc
X.Op Fl tempo Ar tempo
X.Op rec_filename
X.Sh DESCRIPTION
X.Nm
Xis a
X.Xr tclmidi 1
Xscript that records a \%MIDI file while optionally
Xsimultaneously playing another \%MIDI file.
XIf a record filename is not specified, the recorded
X\%MIDI file will be written to stdout.
XBy default
X.Nm
Xcreates a format 0 \%MIDI file containing the recorded
Xevents and any meta events found in the optional play file.
XThe options are as follows:
X.Bl -tag -width Fl repeat
X.It Fl thru
XIf this flag is specified, data arriving at the \%MIDI IN
Xport will be passed to the \%MIDI OUT port.
XBy default, the data is not passed.
X.It Fl merge
XWith this option,
X.Nm
Xwill create a format 1 \%MIDI file from a combination
Xof the newly recorded events and the tracks contained
Xin the optional play file.
XIf the play file is a format 0 file, it will be split
Xinto a format 1 file.
XThe recorded events will appear as a new track after
Xall the tracks found in the play file.
X.It Fl repeat
XThis option specifies that the play file should be repeated
Xuntil recording is finished.
XIt is only valid with the
X.Fl play
Xoption.
X.It Fl play
XThis option specifies that another \%MIDI file should
Xbe played while recording.
X.It Fl tempo
XThis option specifies the tempo to use for recording.
XIt is only valid if a play file is not specified.
XIf a play file is specified, tempos are taken from
Xit instead.
XThe default tempo is 120 bpm.
X.El
X.Pp
XIf a play song is specified, a message will be printed saying
Xthe file is being loaded.
XOnce loaded, the program will wait for the return key
Xto be pressed before beginning to record.
XIf a play file is specified and is not playing in repeat mode,
Xrecording will stop when the play file ends.
XOtherwise, recording stops when a return key is pressed.
X.Pp
XSince
X.Nm
Xmakes use of the
X.Xr midirecord 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 midirecord n
X.Sh AUTHORS
XMike Durian - durian@boogie.com
END_OF_FILE
if test 2176 -ne `wc -c <'tclmidi-2.0/man/mrec.1'`; then
echo shar: \"'tclmidi-2.0/man/mrec.1'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/man/mrec.1'
fi
if test -f 'tclmidi-2.0/rb/list.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/rb/list.c'\"
else
echo shar: Extracting \"'tclmidi-2.0/rb/list.c'\" \(2221 characters\)
sed "s/^X//" >'tclmidi-2.0/rb/list.c' <<'END_OF_FILE'
X/*
X * /home/angeleys/durian/cvs/tclm2/rb/list.c,v
X * 1.2
X * 1994/06/23 21:50:27
X * durian
X */
X
X#include <stdio.h> /* Basic includes and definitions */
X#include <stdlib.h>
X#include "list.h"
X
X#define boolean int
X#define TRUE 1
X#define FALSE 0
X
X
X/*---------------------------------------------------------------------*
X * PROCEDURES FOR MANIPULATING DOUBLY LINKED LISTS
X * Each list contains a sentinal node, so that
X * the first item in list l is l->flink. If l is
X * empty, then l->flink = l->blink = l.
X * The sentinal contains extra information so that these operations
X * can work on lists of any size and type.
X * Memory management is done explicitly to avoid the slowness of
X * malloc and free. The node size and the free list are contained
X * in the sentinal node.
X *---------------------------------------------------------------------*/
X
Xtypedef struct int_list { /* Information held in the sentinal node */
X struct int_list *flink;
X struct int_list *blink;
X int size;
X List free_list;
X} *Int_list;
X
Xvoid
Xinsert(item, list) /* Inserts to the end of a list */
XList item;
XList list;
X{
X List last_node;
X
X last_node = list->blink;
X
X list->blink = item;
X last_node->flink = item;
X item->blink = last_node;
X item->flink = list;
X}
X
Xvoid
Xdelete_item(item) /* Deletes an arbitrary iterm */
XList item;
X{
X item->flink->blink = item->blink;
X item->blink->flink = item->flink;
X}
X
XList make_list(size) /* Creates a new list */
Xint size;
X{
X Int_list l;
X
X l = (Int_list) malloc(sizeof(struct int_list));
X l->flink = l;
X l->blink = l;
X l->size = size;
X l->free_list = (List) malloc (sizeof(struct list));
X l->free_list->flink = l->free_list;
X return (List) l;
X}
X
XList get_node(list) /* Allocates a node to be inserted into the list */
XList list;
X{
X Int_list l;
X List to_return;
X
X l = (Int_list) list;
X if (l->free_list->flink == l->free_list) {
X return (List) malloc(l->size);
X } else {
X to_return = l->free_list;
X l->free_list = to_return->flink;
X return to_return;
X }
X}
X
Xvoid
Xfree_node(node, list) /* Deallocates a node from the list */
XList node;
XList list;
X{
X Int_list l;
X
X l = (Int_list) list;
X node->flink = l->free_list;
X l->free_list = node;
X}
END_OF_FILE
if test 2221 -ne `wc -c <'tclmidi-2.0/rb/list.c'`; then
echo shar: \"'tclmidi-2.0/rb/list.c'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/rb/list.c'
fi
if test -f 'tclmidi-2.0/rb/list.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/rb/list.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/rb/list.h'\" \(1330 characters\)
sed "s/^X//" >'tclmidi-2.0/rb/list.h' <<'END_OF_FILE'
X/*
X * /home/angeleys/durian/cvs/tclm2/rb/list.h,v
X * 1.2
X * 1994/06/23 21:50:28
X * durian
X */
X
X/* This is the header file for the list manipulation routines in list.c.
X * Any struct can be turned into a list as long as its first two fields are
X * flink and blink. */
X
Xtypedef struct list {
X struct list *flink;
X struct list *blink;
X} *List;
X
X/* Nil, first, next, and prev are macro expansions for list traversal
X * primitives. */
X
X#ifndef nil
X#define nil(l) (l)
X#endif
X#define first(l) (l->flink)
X#define last(l) (l->blink)
X#define next(n) (n->flink)
X#define prev(n) (n->blink)
X
X#define mklist(t) ((t *) make_list (sizeof(t)))
X
X/* These are the routines for manipluating lists */
X
X/* void insert(node list); Inserts a node to the end of a list */
X/* void delete_item(node); Deletes an arbitrary node */
X/* List make_list(node_size); Creates a new list */
X/* List get_node(list); Allocates a node to be inserted into the list */
X/* void free_node(node, list); Deallocates a node from the list */
X
X#ifndef __P
X#if defined(__STDC__) || defined(__cplusplus)
X#define __P(protos) protos
X#else
X#define __P(protos) ()
X#endif
X#endif
X
Xextern void insert __P((List, List));
Xextern void delete_item __P((List));
Xextern List make_list __P((int));
Xextern List get_node __P((List));
Xextern void free_node __P((List, List));
END_OF_FILE
if test 1330 -ne `wc -c <'tclmidi-2.0/rb/list.h'`; then
echo shar: \"'tclmidi-2.0/rb/list.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/rb/list.h'
fi
if test -f 'tclmidi-2.0/rb/rb.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/rb/rb.h'\"
else
echo shar: Extracting \"'tclmidi-2.0/rb/rb.h'\" \(2401 characters\)
sed "s/^X//" >'tclmidi-2.0/rb/rb.h' <<'END_OF_FILE'
Xtypedef struct {
X unsigned red : 1 ;
X unsigned internal : 1 ;
X unsigned left : 1 ;
X unsigned root : 1 ;
X unsigned head : 1 ;
X} status;
X
Xtypedef struct rb_node {
X union {
X struct {
X struct rb_node *flink;
X struct rb_node *blink;
X } list;
X struct {
X struct rb_node *left;
X struct rb_node *right;
X } child;
X } c;
X union {
X struct rb_node *parent;
X struct rb_node *root;
X } p;
X status s;
X union {
X unsigned long ukey;
X int ikey;
X char *key;
X struct rb_node *lext;
X } k;
X union {
X char *val;
X struct rb_node *rext;
X } v;
X} *Rb_node;
X
X#ifndef __P
X#if defined(__STDC__) || defined(__cplusplus)
X#define __P(protos) protos
X#else
X#define __P(protos) ()
X#endif
X#endif
X
Xextern Rb_node make_rb __P(());
Xextern Rb_node rb_insert_b __P((Rb_node node, char *key, char *value));
X
Xextern Rb_node rb_find_key __P((Rb_node tree, char *key));
Xextern Rb_node rb_find_ikey __P((Rb_node tree, int ikey));
Xextern Rb_node rb_find_ukey __P((Rb_node tree, unsigned long ukey));
Xextern Rb_node rb_find_gkey __P((Rb_node tree, char *key, int (*fxn)()));
X
Xextern Rb_node rb_find_key_n __P((Rb_node tree, char *key, int *found));
Xextern Rb_node rb_find_ikey_n __P((Rb_node tree, int ikey, int *found));
Xextern Rb_node rb_find_ukey_n __P((Rb_node tree, unsigned long ukey,
X int *found));
Xextern Rb_node rb_find_gkey_n __P((Rb_node tree, char *key, int (*fxn)(),
X int *found));
Xextern void rb_delete_node __P((Rb_node node));
Xextern void rb_free_tree __P((Rb_node node)); /* Deletes and frees an entire tree */
Xextern char *rb_val __P((Rb_node node)); /* Returns node->v.val
X (this is to shut lint up */
X
X#define rb_insert_a(n, k, v) rb_insert_b(n->c.list.flink, k, v)
X#define rb_insert(t, k, v) rb_insert_b(rb_find_key(t, k), k, v)
X#define rb_inserti(t, k, v) rb_insert_b(rb_find_ikey(t, k), (char *) k, v)
X#define rb_insertu(t, k, v) rb_insert_b(rb_find_ukey(t, k), (char *) k, v)
X#define rb_insertg(t, k, v, f) rb_insert_b(rb_find_gkey(t, k, f), k, v)
X#define rb_first(n) (n->c.list.flink)
X#define rb_last(n) (n->c.list.blink)
X#define rb_next(n) (n->c.list.flink)
X#define rb_prev(n) (n->c.list.blink)
X#define rb_empty(t) (t->c.list.flink == t)
X#ifndef nil
X#define nil(t) (t)
X#endif
X
X#define rb_traverse(ptr, lst) \
X for(ptr = rb_first(lst); ptr != nil(lst); ptr = rb_next(ptr))
X
Xextern void recolor __P(());
Xextern void single_rotate __P(());
END_OF_FILE
if test 2401 -ne `wc -c <'tclmidi-2.0/rb/rb.h'`; then
echo shar: \"'tclmidi-2.0/rb/rb.h'\" unpacked with wrong size!
fi
# end of 'tclmidi-2.0/rb/rb.h'
fi
if test -f 'tclmidi-2.0/tests/drange.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/drange.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/drange.test'\" \(1220 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/drange.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 MetaEndOfTrack}
Xmidiput $mf 0 {21 MetaTempo 100}
Xmidiput $mf 0 {22 MetaSMPTE 1 2 3 4 5}
Xmidiput $mf 0 {23 MetaTime 3 4 24 8}
Xmidiput $mf 0 {24 MetaKey "E flat" minor}
Xmidiput $mf 0 {25 MetaSequencerSpecific {0x01 0x02 0x03}}
Xmidiput $mf 0 {26 MetaUnknown 0x60 {0x01 0x02 0x03}}
X
Xmididelete $mf 0 range 10 15
X
Xmidirewind $mf
X
Xwhile {[set e [midiget $mf 0 next]] != "EOT"} {puts $e}
END_OF_FILE
if test 1220 -ne `wc -c <'tclmidi-2.0/tests/drange.test'`; then
echo shar: \"'tclmidi-2.0/tests/drange.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/drange.test'
# end of 'tclmidi-2.0/tests/drange.test'
fi
if test -f 'tclmidi-2.0/tests/putget.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/putget.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/putget.test'\" \(1243 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/putget.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
Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {
X puts stdout $event
X}
END_OF_FILE
if test 1243 -ne `wc -c <'tclmidi-2.0/tests/putget.test'`; then
echo shar: \"'tclmidi-2.0/tests/putget.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/putget.test'
# end of 'tclmidi-2.0/tests/putget.test'
fi
if test -f 'tclmidi-2.0/tests/rw.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/rw.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/rw.test'\" \(1408 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/rw.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 {10 SystemExclusive continued {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 MetaEndOfTrack}
Xmidiput $mf 0 {21 MetaTempo 100}
Xmidiput $mf 0 {22 MetaSMPTE 1 2 3 4 5}
Xmidiput $mf 0 {23 MetaTime 3 4 24 8}
Xmidiput $mf 0 {24 MetaKey "E flat" minor}
X#midiput $mf 0 {24 MetaKey "C" minor}
Xmidiput $mf 0 {25 MetaSequencerSpecific {0x01 0x02 0x03}}
Xmidiput $mf 0 {26 MetaUnknown 0x60 {0x01 0x02 0x03}}
X
Xset f [open test.mid "w"]
Xmidiwrite $f $mf
Xmidifree $mf
Xclose $f
X
Xset f [open test.mid r]
Xset mf [midiread $f]
Xmidirewind $mf
Xwhile {[set event [midiget $mf 0 next]] != "EOT"} {puts $event}
END_OF_FILE
if test 1408 -ne `wc -c <'tclmidi-2.0/tests/rw.test'`; then
echo shar: \"'tclmidi-2.0/tests/rw.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/rw.test'
# end of 'tclmidi-2.0/tests/rw.test'
fi
if test -f 'tclmidi-2.0/tests/split.test' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'tclmidi-2.0/tests/split.test'\"
else
echo shar: Extracting \"'tclmidi-2.0/tests/split.test'\" \(1478 characters\)
sed "s/^X//" >'tclmidi-2.0/tests/split.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 MetaEndOfTrack}
Xmidiput $mf 0 {21 MetaTempo 100}
Xmidiput $mf 0 {22 MetaSMPTE 1 2 3 4 5}
Xmidiput $mf 0 {23 MetaTime 3 4 24 8}
Xmidiput $mf 0 {24 MetaKey "E flat" minor}
Xmidiput $mf 0 {25 MetaSequencerSpecific {0x01 0x02 0x03}}
Xmidiput $mf 0 {26 MetaUnknown 0x60 {0x01 0x02 0x03}}
X
Xset mfmeta [midimake]
Xmidiconfig $mfmeta {tracks 1}
Xset mfnormal [midimake]
Xmidiconfig $mfnormal {tracks 1} {division 480}
X
Xmidisplit "$mf 0" "$mfmeta 0" "$mfnormal 0"
Xmidirewind $mfmeta
Xmidirewind $mfnormal
Xwhile {[set e [midiget $mfmeta 0 next]] != "EOT"} {puts stdout $e}
Xputs stdout ""
Xwhile {[set e [midiget $mfnormal 0 next]] != "EOT"} {puts stdout $e}
X
END_OF_FILE
if test 1478 -ne `wc -c <'tclmidi-2.0/tests/split.test'`; then
echo shar: \"'tclmidi-2.0/tests/split.test'\" unpacked with wrong size!
fi
chmod +x 'tclmidi-2.0/tests/split.test'
# end of 'tclmidi-2.0/tests/split.test'
fi
echo shar: End of archive 13 \(of 14\).
cp /dev/null ark13isdone
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...