Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

v97i013: PC Prefix [1.2] - Bars and Pipes Tool for prefixing a PC message, Part 01/01

5 views
Skip to first unread message

Richard Hagen

unread,
Nov 18, 1997, 3:00:00 AM11/18/97
to

Submitted-by: Richard Hagen <R.H...@mailbox.uq.edu.au>
Posting-number: Volume 97, Issue 13
Archive-name: music/PCPrefix-1.2/part01
URL: http://www.it.uq.edu.au/~richard/music/bars-and-pipes/index.html#programs

[ Executable (pcpre.ptool) included. ...zim ]

PC Prefix: A Bars and Pipes Tool for prefixing a PC message with a CC message.

PC Prefix is a normal tool. It can be used anywhere in Bars and Pipes.

#!/bin/sh
# This is music/PCPrefix-1.2, a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 11/18/1997 17:55 UTC by z...@ibx.com
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 1239 -rw------- dmakefile
# 2170 -rw------- myheader.h
# 11514 -rw------- pcpre.c
# 3016 -rw------- pcpre.ptool
# 1752 -rw------- pcpre.readme
#
if test -r _shar_seq_.tmp; then
echo 'Must unpack archives in sequence!'
echo Please unpack part `cat _shar_seq_.tmp` next
exit 1
fi
# ============= dmakefile ==============
if test -f 'dmakefile' -a X"$1" != X"-c"; then
echo 'x - skipping dmakefile (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting dmakefile (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'dmakefile' &&
#
# The name of the tool.
#
TOOL = pcpre
X
#
# The source files that you need to build the tool.
#
MYSRCS = pcpre.c
X
MYHDRS = myheader.h
X
#
# You might want to tinker with the compiler flags and libraries.
#
# -3.0 - Compile for a 3.0 system (optional)
# -mc - Small code model
# -md - Small data model
#
CFLAGS = -3.0 -mc -md
X
#
# Required libraries
#
# amiga30s.lib - The small code version of the Amiga library
# cs.lib - The small code version of the C library
#
LIBS = amiga30s.lib cs.lib
X
#
# You shouldn't have to touch anything below here.
#
# (FYI: (It's important that toolstart.c gets listed first... toolstart.o
# has to be the first thing mentioned when the tool is linked
# together.)
#
PTOOL = $(TOOL).ptool
README = $(TOOL).readme
ARCHIVE = $(TOOL).lha
X
SRCS = toolstart.c $(MYSRCS)
OBJS = $(SRCS:*.c:*.o)
X
all: $(PTOOL)
X
$(PTOOL): $(OBJS)
X dlink $(OBJS) $(LIBS) -o $(PTOOL)
X
$(OBJS): $(SRCS)
X dcc $(CFLAGS) -c %(right) -o %(left)
X
# I use emacs, so I tend to have a lot of backup files ending in ``!''
# lying around.
clean:
X delete $(OBJS) *!
X
clobber: clean
X delete $(PTOOL) $(ARCHIVE)
X
distribution: $(ARCHIVE)
X
$(ARCHIVE): clobber $(PTOOL) clean
X lha a $(ARCHIVE) dmakefile $(PTOOL) $(MYHDRS) $(MYSRCS) $(README)
X
X
X
SHAR_EOF
chmod 0600 dmakefile ||
echo 'restore of dmakefile failed'
Wc_c="`wc -c < 'dmakefile'`"
test 1239 -eq "$Wc_c" ||
echo 'dmakefile: original size 1239, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= myheader.h ==============
if test -f 'myheader.h' -a X"$1" != X"-c"; then
echo 'x - skipping myheader.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting myheader.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'myheader.h' &&
/*
X myheader.h - Useful #defines and typedefs for tool/accessory programs.
*/
X
#ifndef MYHEADER_H
#define MYHEADER_H
X
/* Length of tool/accessory id. */
#define ID_LEN 4
X
/* Make an id out of four characters. */
#define MAKE_ID(a, b, c, d) ((ULONG) ((((a << 8) + b << 8) + c << 8) + d))
X
/* Make an id out of a string. */
#define MAKE_IDS(s) (MAKE_ID(s[0], s[1], s[2], s[3]))
X
/* Split an id into four characters. */
#define SPLIT_ID(id, a, b, c, d) \
do { \
X a = (UBYTE) ((id >> 24) & 0xff); \
X b = (UBYTE) ((id >> 16) & 0xff); \
X c = (UBYTE) ((id >> 8) & 0xff); \
X d = (UBYTE) (id & 0xff); \
} while (0)
X
/* Split an id into a string. */
#define SPLIT_IDS(id, s) \
do { \
X SPLIT_ID(id, s[0], s[1], s[2], s[3]); \
} while (0)
X
/* Maximum MIDI note # */
#define MIDI_NOTE_MAX (127)
X
/* Number of MIDI notes. */
#define MIDI_NOTE_NUM (MIDI_NOTE_MAX + 1)
X
/* Maximum program change number. */
#define PC_CHANGE_MAX 127
X
/* Number of program changes. */
#define PC_CHANGE_NUM (PC_CHANGE_MAX + 1)
X
/* Flags for use in the BRB file requester. */
#define FILES_DELETE 1 /* Delete button */
#define FILES_OPEN 2 /* Open button */
#define FILES_SAVE 4 /* Save button */
#define FILES_TEST 8 /* ??? */
#define FILES_TYPE 16 /* Type string gadget */
#define FILES_PATH 32 /* Path string gadget */
X
/* Initial placement of tool/accessory windows. */
#define INITIAL_LEFT 50
#define INITIAL_TOP 50
X
/* Unprototyping cast. */
typedef __geta4 long (*no_prototype)();
X
/* Void cast. */
typedef __geta4 void (*void_prototype)();
X
/* Event *cast. */
typedef __geta4 struct Event *(*event_prototype)();
X
/* For non-stdio debugging messages. */
#define DEBUG(message) \
do { \
X struct EasyStruct es = { \
X sizeof(struct EasyStruct), \
X 0, \
X "Debugging information", \
X "Message: %s", \
X "OK" \
X }; \
X (void) EasyRequest(functions->window, &es, 0, message); \
} while (0)
X
#define NOTE_LENGTH(x) (768 >> (x))
X
#define MBC_STRING_LENGTH 12
X
#define CLOCKSPERMEASURE 768L
X
#define STREQ(x, y) (strcmp((x), (y)) == 0)
#define STREQN(x, y, n) (strncmp((x), (y), (n)) == 0)
X
#endif /* MYHEADER_H */
SHAR_EOF
chmod 0600 myheader.h ||
echo 'restore of myheader.h failed'
Wc_c="`wc -c < 'myheader.h'`"
test 2170 -eq "$Wc_c" ||
echo 'myheader.h: original size 2170, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= pcpre.c ==============
if test -f 'pcpre.c' -a X"$1" != X"-c"; then
echo 'x - skipping pcpre.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting pcpre.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'pcpre.c' &&
/*
X PCPre: A Bars and Pipes tool for adding fixed CC messages to program change
X messages.
X
X Copyright (C) 1997 Richard Hagen
X
X This code is released into the Public Domain, and may be freely
X distributed in its original form.
X
X It is supplied ``as is'', and comes with no warranty.
X This program code was released because it might be useful as a
X starting point for other programmers. However, if any damage arises
X from its use, the original author will not be held liable.
X
X You are free to use and modify this code to your heart's content,
X provided you acknowledge me as the original author in any code
X that you might distribute which is based largely on this code.
X
X I acknowledge that the design of this accessory is influenced
X strongly by the example code supplied with the Rules for Tools
X package. However, I have made substantial contributions of my
X own.
X
X Richard Hagen
X R.H...@mailbox.uq.edu.au
X
X History:
X 1.2 (29 September 1997)
X Bug fix.
X
X 1.1 (22 September 1997)
X Code improvement.
X
X 1.0 (22 September 1997)
X Initial release.
*/
X
#include "bars.h"
#include <libraries/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/graphics.h>
#include <exec/memory.h>
#include <string.h>
#include <intuition/intuition.h>
X
#include "myheader.h"
X
#define PCPRE_NAME "PC Prefix 1.0"
#define PCPRE_ID MAKE_IDS("PCPR")
#define PCPRE_TYPE (TOOL_NORMAL)
X
__chip static UWORD pcpre[] = {
X /*------ plane # 0: --------*/
X 0x0, 0x0,
X 0x3fff, 0xfc00,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x2000, 0x0400,
X 0x3fff, 0xfc00,
X 0x0, 0x0,
X
X /*------ plane # 1: --------*/
X 0x0, 0x0,
X 0x0, 0x0,
X 0x1fff, 0xfc00,
X 0x18c6, 0x1c00,
X 0xdb5a, 0xff00,
X 0xd8c6, 0x3f00,
X 0xdbd6, 0xff00,
X 0xdbda, 0xff00,
X 0x1bda, 0x1c00,
X 0x1fff, 0xfc00,
X 0x1fff, 0xfc00,
X 0x0, 0x0,
X
X /*------ plane # 2: --------*/
X 0x0, 0x0,
X 0x0, 0x0,
X 0x0, 0x0,
X 0x0739, 0xe000,
X 0x04a5, 0x0,
X 0x0739, 0xc000,
X 0x0429, 0x0,
X 0x0425, 0x0,
X 0x0425, 0xe000,
X 0x0, 0x0,
X 0x0, 0x0,
X 0x0, 0x0,
};
X
static struct Image pcpre_image = {
X 0,0,
X 24 , 12 , 3 ,
X &pcpre[0],
X 0x1f,0x00,
X NULL
};
X
struct PCPreTool {
X struct Tool tool;
X
X UBYTE output_cc; /* CC # to emit. */
X UBYTE output_value; /* Constant CC value. */
X UBYTE output_delay; /* Small delay in clocks. */
};
X
static void
pcpre_tool_init(struct PCPreTool *tool)
{
X tool->tool.touched = TOUCH_INIT;
X
X tool->output_cc = 1;
X tool->output_value = 0;
X tool->output_delay = 1;
}
X
static struct ToolMaster master;
X
extern struct Functions *functions;
X
__geta4 /* Callback. */
static struct Event *
processeventcode(struct Event *event)
{
X struct PCPreTool *tool = (struct PCPreTool *)event->tool;
X
X event->tool = event->tool->next;
X
X if (event->status == MIDI_PCHANGE)
X {
X if (!tool->tool.touched)
X {
X pcpre_tool_init(tool);
X }
X
X struct Event *new = (struct Event *)(*functions->allocevent)();
X if (new)
X {
X new->type = EVENT_VOICE;
X new->status = MIDI_CCHANGE;
X new->byte1 = tool->output_cc;
X new->byte2 = tool->output_value;
X new->time = event->time;
X new->tool = event->tool;
X new->next = event;
X
X event->time += tool->output_delay;
X event = new;
X }
X }
X
X return(event);
}
X
#define OUTPUT_CC_GADGET 1
#define OUTPUT_CCDOWN_GADGET 2
#define OUTPUT_CCUP_GADGET 3
X
#define OUTPUT_VALUE_GADGET 4
#define OUTPUT_VALUEDOWN_GADGET 5
#define OUTPUT_VALUEUP_GADGET 6
X
#define DELAY_GADGET 7
#define DELAYDOWN_GADGET 8
#define DELAYUP_GADGET 9
X
/* Output CC# gadget. */
struct PropInfo PCPrePCPreGadget2SInfo = {
X AUTOKNOB+FREEHORIZ,
X -16384, -1,
X 16384, -1,
};
X
struct Image PCPreImage2 = {
X 0,0,
X 102,6,
X 0,
X NULL,
X 0x0000,0x0000,
X NULL
};
X
struct IntuiText PCPreIText2 = {
X 2,0,JAM1,
X -96,1,
X NULL,
X "Output CC#:",
X NULL
};
X
struct Gadget PCPreGadget2 = {
X NULL,
X 103,14,
X 100,10,
X GFLG_GADGHBOX|GFLG_GADGHIMAGE,
X RELVERIFY|GADGIMMEDIATE,
X PROPGADGET,
X (APTR)&PCPreImage2,
X NULL,
X &PCPreIText2,
X NULL,
X (APTR)&PCPrePCPreGadget2SInfo,
X OUTPUT_CC_GADGET,
X NULL
};
X
/* Value gadget. */
struct PropInfo PCPrePCPreGadget3SInfo = {
X AUTOKNOB+FREEHORIZ,
X -16384, -1,
X 16384, -1,
};
X
struct Image PCPreImage3 = {
X 0,0,
X 102,6,
X 0,
X NULL,
X 0x0000,0x0000,
X NULL
};
X
struct IntuiText PCPreIText3 = {
X 2,0,JAM1,
X -96, 1,
X NULL,
X "Value:",
X NULL
};
X
struct Gadget PCPreGadget3 = {
X &PCPreGadget2,
X 103,26,
X 100,10,
X GFLG_GADGHBOX|GFLG_GADGHIMAGE,
X RELVERIFY|GADGIMMEDIATE,
X PROPGADGET,
X (APTR)&PCPreImage3,
X NULL,
X &PCPreIText3,
X NULL,
X (APTR)&PCPrePCPreGadget3SInfo,
X OUTPUT_VALUE_GADGET,
X NULL
};
X
/* Delay gadget. */
struct PropInfo PCPrePCPreGadget4SInfo = {
X AUTOKNOB+FREEHORIZ,
X -16384, -1,
X 16384, -1,
};
X
struct Image PCPreImage4 = {
X 0,0,
X 102,6,
X 0,
X NULL,
X 0x0000,0x0000,
X NULL
};
X
struct IntuiText PCPreIText4 = {
X 2,0,JAM1,
X -96, 1,
X NULL,
X "Delay:",
X NULL
};
X
struct Gadget PCPreGadget4 = {
X &PCPreGadget3,
X 103,38,
X 100,10,
X GFLG_GADGHBOX|GFLG_GADGHIMAGE,
X RELVERIFY|GADGIMMEDIATE,
X PROPGADGET,
X (APTR)&PCPreImage4,
X NULL,
X &PCPreIText4,
X NULL,
X (APTR)&PCPrePCPreGadget4SInfo,
X DELAY_GADGET,
X NULL
};
X
struct NewWindow PCPreNewWindowStructure1 = {
X 75,85,
X 248, 52,
X 0,6,
X GADGETDOWN+GADGETUP+CLOSEWINDOW,
X WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH,
X &PCPreGadget4,
X NULL,
X "PC Prefix",
X NULL,
X NULL,
X 5,5,
X -1,-1,
X CUSTOMSCREEN
};
X
/* Writes the value of a proportional slider. Thank goodness
X all the sliders are identical in range and behaviour! */
__geta4 /* Callback. */
long display_routine(struct Window *window, /* Window where the gadget lives. */
X struct Gadget *gadget, /* The gadget itself. */
X unsigned long value) /* The value to display. */
{
X char text[10];
X struct RastPort *rp = window->RPort;
X Move(rp, 215, 21 + ((gadget->GadgetID - 1) / 3) * 12);
X SetAPen(rp, 1);
X SetBPen(rp, 0);
X SetDrMd(rp, JAM2);
X sprintf(text, "%3ld", value);
X Text(rp, text, 3);
X return value;
}
X
static long
drag_embossed_prop(struct Window *window,
X short id,
X UBYTE min)
{
X long value = (*functions->DragEmbossedProp)(window, id);
X if (value < min)
X {
X value = min;
X (*functions->ModifyEmbossedProp)(window, id,
X value, 0, 0, 0, 0, 0);
X }
X (*functions->DrawEmbossedProp)(window, id);
X
X return value;
}
X
static long
shift_embossed_prop(struct Window *window,
X short id,
X short shift,
X UBYTE min)
{
X long value = (*functions->ShiftEmbossedProp)(window, id, shift, 0);
X if (value < min)
X {
X value = min;
X (*functions->ModifyEmbossedProp)(window, id,
X value, 0, 0, 0, 0, 0);
X }
X (*functions->DrawEmbossedProp)(window, id);
X
X return value;
}
X
__geta4
void
edittoolcode(struct PCPreTool *tool)
{
X struct IntuiMessage *message;
X struct Window *window;
X long class, code;
X struct Gadget *gadget;
X struct NewWindow *newwindow;
X PCPreNewWindowStructure1.Screen = functions->screen;
X
X if (tool->tool.touched & TOUCH_EDIT)
X {
X PCPreNewWindowStructure1.LeftEdge = tool->tool.left;
X PCPreNewWindowStructure1.TopEdge = tool->tool.top;
X PCPreNewWindowStructure1.Width = tool->tool.width;
X PCPreNewWindowStructure1.Height = tool->tool.height;
X }
X
X if (!tool->tool.touched)
X {
X pcpre_tool_init(tool);
X }
X
X newwindow = (struct NewWindow *)
X (*functions->DupeNewWindow)(&PCPreNewWindowStructure1);
X if (!newwindow)
X {
X return;
X }
X newwindow->Title = 0;
X newwindow->Flags |= BORDERLESS;
X newwindow->Flags &= ~0xF;
X newwindow->BlockPen = 0;
X newwindow->DetailPen = 0;
X
X window = (struct Window *) (*functions->FlashyOpenWindow)(newwindow);
X if (!window)
X {
X return;
X }
X
X tool->tool.window = window;
X (*functions->EmbossWindowOn)(window,WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG,
X PCPRE_NAME,(short)-1,(short)-1,0,0);
X
X
X for (short i = OUTPUT_CC_GADGET;
X i <= OUTPUT_VALUE_GADGET;
X i += 3)
X {
X (*functions->FatEmbossedPropOn)(window,i, i + 1, i + 2,
X (no_prototype) display_routine,
X 128, 1);
X }
X
X (*functions->FatEmbossedPropOn)(window,
X DELAY_GADGET,
X DELAYDOWN_GADGET,
X DELAYUP_GADGET,
X (no_prototype) display_routine,
X 9, 1);
X
X (*functions->ModifyEmbossedProp)(window, OUTPUT_CC_GADGET,
X tool->output_cc, 0, 0, 0, 0, 0);
X (*functions->ModifyEmbossedProp)(window, OUTPUT_VALUE_GADGET,
X tool->output_value, 0, 0, 0, 0, 0);
X (*functions->ModifyEmbossedProp)(window, DELAY_GADGET,
X tool->output_delay, 0, 0, 0, 0, 0);
X
X for (short i = OUTPUT_CC_GADGET;
X i <= DELAY_GADGET;
X i += 3)
X {
X (*functions->DrawEmbossedProp)(window, i);
X }
X
X for (;;)
X {
X message = (struct IntuiMessage *) (*functions->GetIntuiMessage)(window);
X class = message->Class;
X code = message->Code;
X gadget = (struct Gadget *) message->IAddress;
X class = (*functions->SystemGadgets)(window,class,gadget,code);
X
X ReplyMsg((struct Message *)message);
X if (class == CLOSEWINDOW)
X {
X break;
X }
X else if (class == GADGETDOWN)
X {
X const short id = gadget->GadgetID;
X
X switch (id)
X {
X case OUTPUT_CC_GADGET:
X tool->output_cc = (UBYTE) drag_embossed_prop(window,
X OUTPUT_CC_GADGET, 0);
X break;
X case OUTPUT_CCDOWN_GADGET:
X tool->output_cc = (UBYTE) shift_embossed_prop(window,
X OUTPUT_CC_GADGET, -1, 0);
X break;
X case OUTPUT_CCUP_GADGET:
X tool->output_cc = (UBYTE) shift_embossed_prop(window,
X OUTPUT_CC_GADGET, 1, 0);
X break;
X case OUTPUT_VALUE_GADGET:
X tool->output_value = (UBYTE) drag_embossed_prop(window,
X OUTPUT_VALUE_GADGET, 0);
X break;
X case OUTPUT_VALUEDOWN_GADGET:
X tool->output_value = (UBYTE) shift_embossed_prop(window,
X OUTPUT_VALUE_GADGET,
X -1, 0);
X break;
X case OUTPUT_VALUEUP_GADGET:
X tool->output_value = (UBYTE) shift_embossed_prop(window,
X OUTPUT_VALUE_GADGET, 1, 0);
X break;
X case DELAY_GADGET:
X tool->output_delay = (UBYTE) drag_embossed_prop(window, DELAY_GADGET, 1);
X break;
X case DELAYDOWN_GADGET:
X tool->output_delay = (UBYTE) shift_embossed_prop(window, DELAY_GADGET, -1, 1);
X break;
X case DELAYUP_GADGET:
X tool->output_delay = (UBYTE) shift_embossed_prop(window, DELAY_GADGET, 1, 1);
X break;
X }
X }
X else if (class == GADGETUP)
X {
X /* Nothing. */
X }
X }
X tool->tool.window = 0;
X tool->tool.left = window->LeftEdge;
X tool->tool.top = window->TopEdge;
X tool->tool.width = window->Width;
X tool->tool.height = window->Height;
X tool->tool.touched = TOUCH_INIT | TOUCH_EDIT;
X
X for (short i = OUTPUT_CC_GADGET;
X i <= DELAY_GADGET;
X i += 3)
X {
X (*functions->FatEmbossedPropOff)(window,i, i + 1, i + 2);
X }
X
X (*functions->EmbossWindowOff)(window);
X (*functions->FlashyCloseWindow)(window);
X (*functions->DeleteNewWindow)(newwindow);
}
X
struct ToolMaster *
inittoolmaster()
{
X memset((char *)&master,0,sizeof(struct ToolMaster));
X master.toolid = PCPRE_ID;
X master.image = &pcpre_image;
X strcpy(master.name, PCPRE_NAME);
X master.edittool = (void_prototype) edittoolcode;
X master.processevent = (event_prototype) processeventcode;
X master.tooltype = PCPRE_TYPE;
X master.toolsize = sizeof(struct PCPreTool);
X return(&master);
}
SHAR_EOF
chmod 0600 pcpre.c ||
echo 'restore of pcpre.c failed'
Wc_c="`wc -c < 'pcpre.c'`"
test 11514 -eq "$Wc_c" ||
echo 'pcpre.c: original size 11514, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= pcpre.ptool ==============
if test -f 'pcpre.ptool' -a X"$1" != X"-c"; then
echo 'x - skipping pcpre.ptool (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting pcpre.ptool (Binary)'
sed 's/^X//' << 'SHAR_EOF' > _shar_tmp_.tmp &&
begin 600 pcpre.ptool
<encoded_portion_removed>
end
SHAR_EOF
echo 'uudecoding file pcpre.ptool' &&
uudecode < _shar_tmp_.tmp && rm -f _shar_tmp_.tmp &&
chmod 0600 pcpre.ptool ||
echo 'restore of pcpre.ptool failed'
Wc_c="`wc -c < 'pcpre.ptool'`"
test 3016 -eq "$Wc_c" ||
echo 'pcpre.ptool: original size 3016, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= pcpre.readme ==============
if test -f 'pcpre.readme' -a X"$1" != X"-c"; then
echo 'x - skipping pcpre.readme (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting pcpre.readme (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'pcpre.readme' &&
Short: Bars & Pipes Tool for prefixing a PC message with a CC message.
Author: Richard Hagen (R.H...@mailbox.uq.edu.au)
Uploader: Richard Hagen (R.H...@mailbox.uq.edu.au)
Version: 1.2 (29 September 1997)
Type: mus/midi
Requires: Bars and Pipes Professional
Distribution: Freely distributable by anyone, anywhere.
URL: http://www.it.uq.edu.au/~richard/music/bars-and-pipes/index.html
X
PC Prefix: A Bars and Pipes Tool for prefixing a PC message with a CC message.
X
Version: 1.2 (29 September 1997)
X
Author: Richard Hagen
X R.H...@mailbox.uq.edu.au
X
Distribution: Freeware. See the copyright notice in pcpre.c.
X
Requirements for running:
X Bars and Pipes Professional
X
Requirements for recompiling:
X DICE (or some other C compiler)
X bars.h and toolstart.c from the Rules for Tools kit.
X
Usage:
X PC Prefix is a normal tool. It can be used anywhere in Bars and Pipes.
X
X Its operation is controlled by 3 gadgets:
X
X Output CC# (proportional gadget, range [0 .. 127])
X This is the control change number that CC Prefix will prefix
X the input program change message with.
X
X Value (proportional gadget, range [0 .. 127])
X This is the value of the control change message that CC Prefix
X generates.
X
X Delay (proportional gadget, range [1 .. 8])
X This specifies a small delay (in clock ticks) between the
X prefix control change message and the input message.
X
Useful for:
X Generating control change messages for controlling certain
X sorts of GM/GS devices. I think.
X
History:
X 1.2 (29 September 1997)
X Bug fix.
X
X 1.1 (22 September 1997)
X Code improvement.
X
X 1.0 (22 September 1997)
X Initial release.
X
If you like this tool, please drop me a line.
X
richard
R.H...@mailbox.uq.edu.au
29 September 1997
X
X
SHAR_EOF
chmod 0600 pcpre.readme ||
echo 'restore of pcpre.readme failed'
Wc_c="`wc -c < 'pcpre.readme'`"
test 1752 -eq "$Wc_c" ||
echo 'pcpre.readme: original size 1752, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
exit 0
--
Bill Zimmer - z...@ibx.com

0 new messages