allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) (05/22/89)
Posting-number: Volume 6, Issue 114 Submitted-by: lee%uhccux.bitnet@cunyvm.cuny.edu (Greg Lee) Archive-name: glib/part02 It appears that a net.line.eater decided to snack on the bottom half of glib/part02 (volume 6, issue 103). This posting supersedes it and overwrites its archive entry. Archive maintainers take note. ++Brandon ------------------ #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 2 (of 15)." # Contents: CHANGES DX-README ctomenu.l cz.h d10tva.mnu d10tvf.mnu # d10wfg.mnu k1single.mnu pc-mach.h st-mach.c # Wrapped by lee@uhccux on Sun May 7 00:40:09 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'CHANGES' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'CHANGES'\" else echo shar: Extracting \"'CHANGES'\" \(4379 characters\) sed "s/^X//" >'CHANGES' <<'END_OF_FILE' X X3/15/89 Makefile changed K5 to KAWAIK5 (fix from Jessica Koeppel) X list.c changed K5 to KAWAIK5; restored cvtanum() value X to editinfo arrays X glib.h restored cvtanum() to editinfo declaration X glib.c restored cvtanum() use (for Kawai K1 and K5 now); X restored some other things from Thompson's more X recent version X k1multi.mnu now number of single patch is always shown, even X when the name is shown X glib.1 added paragraph about display of single names X when editing multi patches for the K1 X---------------------------- Xabove changes posted as patch1. X---------------------------- X3/16/89 glib.c mistake in last patch lost code in gotoparm() X required for arrow key use -- put it back; X remove "Voices" from screen title of synth bank X glib.1 documented `N' command for entering voice name. X glib.h, X unix-mach.c revised ctl() macro and calls as suggested by X Mac Michaels for sake of Turbo C X amigmach.c Alan Bland's comp.sources.amiga distribution X increases a buffer size -- made that change here X---------------------------- Xabove changes posted as patch2. X---------------------------- X3/20/89 glib.man now corresponds with glib.1 X patchlevel.h new, to keep track of patchlevel X CHANGES new, this file X MANIFEST includes above, and this changes file X3/30/89 k1multi.mnu changed data from row order to column order X k1vis.c in vismute() changed sense of 'mute' and 'on' X---------------------------- Xabove changes posted as patch3. X---------------------------- Xchanges of 4/19/89 by Scott Snyder: X4/19/89 glib.c enhance showstr(); pass the 'eras' parameter X to the vis routine in showparam(); speed up X paramat() and parmindex(); added special X processing in readall() for DX7 and DX7s X banks. X list.c added DX7 and DX7s. X pc-mach.h added definitions for graphics chars. X pc-tcc.mak revised along the lines of the unix makefile. X menutoc.l expanded the number of acceptable %'s and #'s; X changed the type of the temp vars it generates X from 'unsigned char' to 'unsigned'; allowed X specification of input and output files as X parameters in order to work with TMAKE. X fixed bug with zero offsets. X menutoc.c see menutoc.l X patchlevel.h keep track of revisions. X4/22/89 Makefile updated for dx7; change to prevent deleting X menutoc.c automatically by make X MANIFEST reflects new dx7 files X dx7.mnu joined 2 quotes split across lines not accepted X by pcc; had to comment out #pragma dir. in 2 places X dx7s.mnu added #define of SEEK_CUR X list.c termination of editinfo was missing a 0 X glib.1,glib.man,README X minor changes X---------------------------- Xabove changes made in patch4 (3 parts) X---------------------------- X4/23/89 glib.c,glib.h,unix-mach.c X new U and D commands for unix: upload and download X file instead of synth X glib.1,glib.man document above X k1multi.mnu disabled k1sedit proc (don't know how to do this) X k1multi.mnu,k1single.mnu X should not include machdep.h X yama_com.c,tx81p.mnu X gbulk: read and discard 0xf0 when download from file; X sbulk: returns 0 X patchlevel.h now level 5 X---------------------------- Xabove changes posted as patch5 X---------------------------- X4/24/89 k1multi.mnu upload and download multi-voice dumps instead of X doing one voice at a time X4/25/89 X -- started to use RCS; add $Id: CHANGES,v 1.6 89/05/06 17:13:05 lee Exp $, $Author: lee $, $Log: CHANGES,v $ X# Revision 1.6 89/05/06 17:13:05 lee X# rel. to comp.sources.misc X# X# Revision 1.6 89/04/26 10:34:18 lee X# none X# to most files --- X4/25/89 merging in Mark Rinfret's CZ1 support X Makefile version for CZ1 X list.c ditto X cz.h MR file X cz1.mnu derived from MR cz1.c; removed '&' 2nd arg X to getwaveform call; stuck in some conditionals X for up/download file; compacted menu spec X amigadir.c,amigadir.h,AmiAztec-make,ReadMe.CZ1 X MR files X amigmach.c incorporated all of MR's changes X glib.c must not reset 8th bit for CZ file data X glib.1,glib.man note MR did CZ1 X4/28/89 glib.c MR change makes nested ifdef's ok for Aztec C X ReadMe.CZ1 MR change X AmiAztec-make MR update X pc-tcc.mak added defs for CZ1 X4/30/89 menutoc.l,menutoc.c X MR changes: subst. for strtol and remove vmin decl. X glib.1,glib.man rewrite X5/5/89 amigmach.c use arp file requester, Dave Weiler, sent by Ed Wilts X README.arp doc on Dave Weiler's arp modification X5/7/89 [many] tried to get rid of lint -- some is left END_OF_FILE if test 4379 -ne `wc -c <'CHANGES'`; then echo shar: \"'CHANGES'\" unpacked with wrong size! fi # end of 'CHANGES' fi if test -f 'DX-README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'DX-README'\" else echo shar: Extracting \"'DX-README'\" \(4285 characters\) sed "s/^X//" >'DX-README' <<'END_OF_FILE' X$Id: DX-README,v 1.6 89/05/06 17:13:05 lee Exp $ XScott Snyder X$Log: DX-README,v $ X# Revision 1.6 89/05/06 17:13:05 lee X# rel. to comp.sources.misc X# X X This posting adds support for the Yamaha DX7 and DX7s synths to the glib Xpatch editor. The generic glib code is not included, so you'll need a copy Xof the earlier glib posting. I have only tested the code on a PC using XTurbo C V2.0; however, it shouldn't be hard to make it work in other Xenvironments. I have also sped up glib in a couple of places, in order Xto make it work tolerably fast on a PC. X X The following files are included: X X DX-README this file X dx7.mnu DX7 synth module X dx7s.mnu DX7s synth module (requires dx7.mnu) X pc-tcc.mak makefile for Turbo C X n001.dx7 sample DX7 bank (from Glenn Scott's DX7 patch archive) X rom1.d7s sample DX7s bank (downloaded from the Yamaha ROM X cartridge) X patches patches to the existing glib code X X[Notes (gl): file patches is not here -- the changes are incorporated; X For the TURBO-C and the DX7 version, one must uncomment #pragma X directives in two places in file dx7.mnu.] X XCompiling the editor: X X Mess-Dos/Turbo C: feed 'patches' into patch, rename 'pc-tcc.mak' to X 'makefile', and type 'make'. This will produce a version of glib which X recognizes the DX7 and DX7s. To enable support for other synths, uncomment X the appropriate lines in the makefile. X X Other systems: feed 'patches' into patch. Then adjust your makefile X appropriately: 'dx7.mnu' and 'dx7s.mnu' should be passed through X menutoc and linked in with glib. glib.c and list.c should be compiled X with the preprossesor symbols 'DX7' and 'DX7S' defined. To enable the X faster code in glib.c, define the symbol 'SSS'. X XUsing the editors: X X The DX7 editor works just like other glib-based editors, and shouldn't X present any problems. However, I was unable to fit all the DX7s parameters X on one screen, so I used a trick: some of the parameters are 'multiplexed'. X On the DX7s screen, move the cursor to the 'Modulation Wheel' legend, then X 'increment' and 'decrement' this field: the fields below it will cycle X through the 'Modulation Wheel', 'Aftertouch', 'Breath Control', 'Foot X Control', and 'MIDI Control' parameters. X X Since the DX7 banks are exactly 4096 bytes long, I chose not to add X a DataID byte to the front, to avoid wasting disk space. glib will X identify a DX7 bank by examining the file length. DX7 banks can be read X in DX7s mode and vice versa; the additional DX7s data will be discarded X or replaced with appropriate defaults. X XImplementation notes: X X In order to draw the pictures for the DX7 algorithms, I modified the X showstr() function to use the PC line-drawing characters. If you are X using another system which has such special characters, you should tell X glib about them by adding the appropriate definitions to your machdep.h X file (see the definitions at the end of pc-mach.h for an example of X how this should be done). If this is not done, the graphics characaters X will be approximated (badly) by standard ASCII characters. X X In addition to the basic cursor motion escapes (~u, ~d, ~r, ~l), showstr() X now recognizes the following additional escapes: X X ~| : a vertical line X ~- : a horizontal line X ~+ : a vertical line crossing a horizontal line X ~T : a 'T' X ~^ : an upside-down 'T' X ~< : a 'T' on its right side X ~> : a 'T' on its left side X ~{ : the upper-left corner of a box X ~} : the upper-right corner of a box X ~[ : the lower-left corner of a box X ~] : the lower-right corner of a box X ~r : 'carriage return' - the cursor returns to the leftmost column X it has been in in this call to showstr() X X In addition, a repeat count can be specified with an escape in the form X '~nc', where n is a sequence of digits and c is a character. X XCaveats: X X Again, this code has only been tested on a PC-clone using TC V2.0. X In addition, I don't have a Roland MPU; I tested the MIDI I/O using X a BYTE MIDI board. The high-level interface is the same though, so it X should work with the MPU. (By the way, if anyone is interested in BYTE X board support for glib or the CMT, drop me a line.) X X Scott Snyder - ssnyder@citjulie.bitnet, ssnyder@juliet.caltech.edu X (addresses valid until mid-June) END_OF_FILE if test 4285 -ne `wc -c <'DX-README'`; then echo shar: \"'DX-README'\" unpacked with wrong size! fi # end of 'DX-README' fi if test -f 'ctomenu.l' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ctomenu.l'\" else echo shar: Extracting \"'ctomenu.l'\" \(5609 characters\) sed "s/^X//" >'ctomenu.l' <<'END_OF_FILE' X%{ X/* $Id: ctomenu.l,v 1.6 89/05/06 17:13:13 lee Exp $ X * Greg Lee, lee@uhccux.uhcc.hawaii.edu, 3/7/89 X * X * Ctomenu helps translate a synthesizer-specific C file into .menu X * form by generating the '#MENU ... #END' part for the labelinfo X * array and the '#O' lines for the paraminfo array. X * X * $Log: ctomenu.l,v $ X * Revision 1.6 89/05/06 17:13:13 lee X * rel. to comp.sources.misc X * X */ X#include <string.h> X X#define SCOLS 81 X#define SROWS 24 X#define MAXPARAM 300 X X int i, j, offset, reservesize = 20; X int row = -2, col = -2 , coord; X char labelname[30]; X char paramname[30]; X char temps[30]; X char *screen; X char paraml[MAXPARAM][30]; X char paramv[MAXPARAM][20]; X int paramcoord[MAXPARAM][6]; X int paramno = 0, pcount = 0; X int havename = 0; X char paramtemps[80]; X int paramtemplen; X%} X X%s A B C D E Xwh [ \t\n]* X X%% X X<A>^"#define"[ \t]+"RESERVESIZE"[ \t]*[0-9]+ { X for (i=0; yytext[i] != 'Z'; i++) ; X reservesize = atoi(yytext+i+2); X}; X X<A>^"struct labelinfo".*\n { X for (i=0; i < 30 && yytext[i+16] != '{'; i++) X labelname[i] = yytext[i+16]; X labelname[i] = 0; X BEGIN(B); X}; X X<C>^"struct paraminfo".*\n { X for (i=0; i < 30 && yytext[i+16] != '{'; i++) X paramname[i] = yytext[i+16]; X paramname[i] = 0; X havename = 0; X BEGIN(D); X}; X X<B,D>{wh} ; X<B,D>"," ; X<D>"-1" ; X<D>"NULL" ; X X<B,D>[0-9]+ { X coord = atoi(yytext); X if (row == -2) row = coord; X else if (col == -2) col = coord; X else { X fprintf(stderr, "coordinate mixup\n"); X exit(1); X } X X if (havename == 2 && row != -2 && col != -2) { X strncpy(screen+(row*SCOLS)+col,paramtemps,paramtemplen); X row = col = -2; X havename = 0; X } X}; X X<B>\"[^\"\n]*\" { X if (row == -2 || col == -2) { X fprintf(stderr, "missing coord before %s\n", yytext); X exit(1); X } X X strncpy(screen+(row*SCOLS)+col, yytext+1, yyleng-2); X row = col = -2; X}; X X<D>\"[^\"\n]*\" { X if (!havename) { X strncpy(paraml[paramno], yytext+1, yyleng-2); X paraml[paramno][yyleng-2] = 0; X havename = 1; X } else { X strncpy(paramtemps, yytext+1, yyleng-2); X paramtemplen = yyleng - 2; X havename = 2; X } X}; X X<D>"vis"[0-9A-Za-z_]+ { X if (row == -2 || col == -2) { X fprintf(stderr, "missing coord before %s\n", yytext); X fprintf(stderr, "param no. %d, havename %d\n", X paramno, havename); X exit(1); X } X strncpy(paramv[paramno], yytext+3, yyleng-3); X paramcoord[paramno][0] = row; X paramcoord[paramno][1] = col; X row = col = -2; X BEGIN(E); X}; X X<D>^"NULL".*\n ; X X<E>[ \t,] ; X X<E>[0-9]+ { X if (pcount > 3) { X fprintf(stderr, "extra value\n"); X exit(1); X } X paramcoord[paramno][2 + pcount++] = atoi(yytext); X}; X X<E>\n { X pcount = 0; X paramno++; X if (paramno > MAXPARAM) { X fprintf(stderr, "too many parameters\n"); X exit(1); X } X havename = 0; X BEGIN(D); X}; X X<B>.*"NULL".*\n ; X X<B,D>^"};" { X BEGIN(C); X}; X X<C>^[ \t]*"data[RESERVESIZE"[ \+]*[0-9]+"]"[ \t]*"="[ \t]*"getval(".*\n { X for (i=0; yytext[i] != '+'; i++) ; X offset = atoi(yytext+i+1); X while (yytext[i++] != '"') ; X for (j=0; yytext[i] != '"'; i++,j++) X temps[j] = yytext[i]; X temps[j] = 0; X for (i=0; i<paramno; i++) X if (strcmp(temps, paraml[i]) == 0) break; X if (i < paramno) X paramcoord[i][5] = offset + reservesize; X /* else error ? */ X}; X X X<C>^[ \t]*"data["[0-9]+"]"[ \t]*"="[ \t]*"getval(".*\n { X for (i=0; yytext[i] != '['; i++) ; X offset = atoi(yytext+i+1); X if (offset < reservesize) { X fprintf(stderr, "offset < RESERVESIZE\n"); X exit(1); X } X while (yytext[i++] != '"') ; X for (j=0; yytext[i] != '"'; i++,j++) X temps[j] = yytext[i]; X temps[j] = 0; X for (i=0; i<paramno; i++) X if (strcmp(temps, paraml[i]) == 0) break; X if (i < paramno) X paramcoord[i][5] = offset; X /* else error ? */ X}; X X<A,C>.|\n ; X X%% Xmain() X{ int i; X char *s; X char *malloc(); X X if ( (screen = malloc(SROWS * SCOLS)) == NULL) { X fprintf(stderr, "not enough memory\n"); X exit(1); X } X s = screen; X for (i=0; i < SROWS*SCOLS; i++) *s++ = ' '; X X BEGIN(A); X yylex(); X X printf("\n#define RESERVESIZE %d\n\n", reservesize); X menudump(); X paramdump(); X} X Xmenudump() X{ int i, j; X X for (i=0; i<paramno; i++) { X row = paramcoord[i][0]; X col = paramcoord[i][1]; X if (row >= SROWS || col >= SCOLS) { X fprintf(stderr, "bad coords\n"); X exit(1); X } X screen[row*SCOLS + col] = '%'; X } X X printf("struct labelinfo %s {\n", labelname); X printf("#MENU\n"); X for (i=0; i<SROWS; i++) { X for (j=SCOLS-1; j>=0 && screen[i*SCOLS+j] == ' '; j--) X screen[i*SCOLS+j] = 0; X printf("%s\n", screen+i*SCOLS); X } X printf("#END\n"); X printf("-1,-1,NULL\n};\n\n"); X} X Xparamdump() X{ int i, j, notdone, colmin, rowmin; X char *fmt; X X printf("struct paraminfo %s {\n", paramname); X printf("/*\nNAME\t\tTYPE\t\tPOS\tMAX\tOFFSET\tMASK\tSHIFT\tADHOC\n"); X printf(" */\n"); X X notdone = 1; X while (notdone) { X colmin = rowmin = 1000; X for (i = 0; i < paramno; i++) X if (paramcoord[i][0] < rowmin) X rowmin = paramcoord[i][0]; X if (rowmin < 1000) { X for (i = 0; i < paramno; i++) X if (paramcoord[i][0] == rowmin) { X if (paramcoord[i][1] < colmin) { X colmin = paramcoord[i][0]; X j = i; X } X } X if (colmin < 1000) { X fmt = "#O %s\t%s\t%%%%\t%d\t%d"; X if (strlen(paraml[j]) < 5) X fmt = "#O %s\t\t%s\t%%%%\t%d\t%d"; X if (paramcoord[j][4]) X paramcoord[j][5] = reservesize-paramcoord[j][4]; X printf(fmt, X paraml[j], paramv[j], X paramcoord[j][3], X paramcoord[j][5] - reservesize); X if (paramcoord[j][2] == 1) X printf("\t*5"); X printf("\n"); X paramcoord[j][0] = 1000; X paramcoord[j][1] = 1000; X } X } else notdone = 0; X } X X printf("NULL,NULL,-1,-1,-1,-1,visnum,0,0,0,0\n};\n\n"); X} END_OF_FILE if test 5609 -ne `wc -c <'ctomenu.l'`; then echo shar: \"'ctomenu.l'\" unpacked with wrong size! fi # end of 'ctomenu.l' fi if test -f 'cz.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'cz.h'\" else echo shar: Extracting \"'cz.h'\" \(4332 characters\) sed "s/^X//" >'cz.h' <<'END_OF_FILE' X/* $Id: cz.h,v 1.6 89/05/06 17:13:13 lee Exp $ X * CZ Synthesizer Family Parameter Definitions X * X * Filename: cz.h X * Date: 03/25/89, Mark R. Rinfret X * X * X * Note: One of the preprocessor flags, CZ1 or CZ101, must be defined X * by the source file including this package. X * $Log: cz.h,v $ X * Revision 1.6 89/05/06 17:13:13 lee X * rel. to comp.sources.misc X * X */ X X#ifdef CZ101 X#define CZ_NAME "CZ-101" X#endif X X X#ifdef CZ1 X#ifdef CZ_NAME X#include "You may not define CZ1 and CZ101 in the same compile!" X#endif X#define CZ_NAME "CZ-1" X#endif X X#ifndef CZ_NAME X#include "You MUST define either CZ1 or CZ101!" X#endif X X#ifndef UBYTE X#define UBYTE unsigned char X#define USHORT unsigned short X#endif X X#define ENVELOPESIZE 16 /* 8 rate/level pairs */ X#define END_SYSTEM_EXCLUSIVE 0xF7 X X/* MIDI note-on and note-off commands */ X X#define MIDI_NOTE_ON 0x90 X#define MIDI_NOTE_OFF 0x80 X X#define MIDI_STATUS_MASK 0x80 X X X#ifdef CZ101 Xstruct ToneData { X UBYTE lineselect_octave; X X UBYTE detune_sign; X UBYTE detune_fine; X UBYTE detune_course; X X UBYTE vibrato_wave; X UBYTE vibrato_time[3]; X UBYTE vibrato_rate[3]; X UBYTE vibrato_depth[3]; X X UBYTE DCO1_wave_form[2]; X UBYTE DCA1_key_follow[2]; X UBYTE DCW1_key_follow[2]; X UBYTE DCA1_end_step; X UBYTE DCA1_envelope[ENVELOPESIZE]; X UBYTE DCW1_end_step; X UBYTE DCW1_envelope[ENVELOPESIZE]; X UBYTE DCO1_end_step; X UBYTE DCO1_envelope[ENVELOPESIZE]; X X UBYTE DCO2_wave_form[2]; X UBYTE DCA2_key_follow[2]; X UBYTE DCW2_Key_follow[2]; X UBYTE DCA2_end_step; X UBYTE DCA2_envelope[ENVELOPESIZE]; X UBYTE DWA2_end_step; X UBYTE DWA2_envelope[ENVELOPESIZE]; X UBYTE DCO2_end_step; X UBYTE DCO2_envelope[ENVELOPESIZE]; X}; X#endif X X#ifdef CZ1 X X#define MIDI_CHANNEL_MASK 0x0f X#define MIDI_FUNCTION_MASK 0xf0 X X/* Misc. MIDI status definitions */ X X#define MIDI_PITCH_BEND 0xe0 X X/* MIDI note-on and note-off commands */ X X#define MIDI_NOTE_ON 0x90 X#define MIDI_NOTE_OFF 0x80 X X#define MIDI_STATUS_MASK 0x80 X X#define FIRST_INTERNAL 0x00 X#define LAST_INTERNAL 0x3F X#define FIRST_CARTRIDGE 0x40 X#define LAST_CARTRIDGE 0x4F X#define SOUND_DATA 0x60 X X/* CZ-1 Tone Data Structure. X * The only major difference between this and CZ101 is the addition of X * the "name" field. X */ X Xstruct ToneData { X UBYTE lineAndOctave; X X UBYTE detuneSign; X UBYTE detuneFine; X UBYTE detuneCoarse; X X UBYTE vibratoWave; X UBYTE vibratoTime[3]; X UBYTE vibratoRate[3]; X UBYTE vibratoDepth[3]; X X/* What follows is a very unfortunate KLUDGE! Though we would like to X * represent the two sets of waveform data as a two-item array, the MANX X * compiler forces word alignment (somewhere), giving us a total structure X * size of 146 bytes when what we really want is 144 bytes. ARGH! X */ X X UBYTE waveForms1[2]; /* ugly, packed format */ X X /* NOTE: The key follow entries actually comprise a two-byte X word but, again, the compiler won't let us do that. The X top 4 bits of the first byte (d) represents the level value, X using the formula d = 15 - level. The bottom 4 bits of the X first byte represents the "visual" key follow value, in the X range 0 - 9. The second byte is some magic mapping of the X visual value to an internal value. */ X UBYTE DCA1_KeyFollow[2]; X UBYTE DCW1_KeyFollow[2]; X UBYTE DCA_EndStep1; /* DCA velocity */ X UBYTE DCA_Envelope1[ENVELOPESIZE]; X UBYTE DCW_EndStep1; /* DCW velocity */ X UBYTE DCW_Envelope1[ENVELOPESIZE]; X UBYTE DCO_EndStep1; /* DCO1 velocity */ X UBYTE DCO_Envelope1[ENVELOPESIZE]; X X UBYTE waveForms2[2]; /* slightly different than waveForms1! */ X UBYTE DCA2_KeyFollow[2]; X UBYTE DCW2_KeyFollow[2]; X UBYTE DCA_EndStep2; /* DCA velocity */ X UBYTE DCA_Envelope2[ENVELOPESIZE]; X UBYTE DCW_EndStep2; /* DCW velocity */ X UBYTE DCW_Envelope2[ENVELOPESIZE]; X UBYTE DCO_EndStep2; /* DCO1 velocity */ X UBYTE DCO_Envelope2[ENVELOPESIZE]; X X UBYTE name[16]; X}; X#endif X END_OF_FILE if test 4332 -ne `wc -c <'cz.h'`; then echo shar: \"'cz.h'\" unpacked with wrong size! fi # end of 'cz.h' fi if test -f 'd10tva.mnu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'d10tva.mnu'\" else echo shar: Extracting \"'d10tva.mnu'\" \(4686 characters\) sed "s/^X//" >'d10tva.mnu' <<'END_OF_FILE' X/* $Id: d10tva.mnu,v 1.6 89/05/06 17:13:18 lee Exp $ X * GLIB - a Generic LIBrarian and editor for synths X * X * D10 Tone Amplifier Librarian X * X * Code started 24 JAN 89 -- Michael R. Kesti mrk@gvgspd.GVG.TEK.COM X * modified by Greg Lee X * $Log: d10tva.mnu,v $ X * Revision 1.6 89/05/06 17:13:18 lee X * rel. to comp.sources.misc X * X */ X X#include "glib.h" X#include "vis.h" X X#define D10TONSIZE 246 X#define RESERVESIZE 20 X Xchar *visnum(); X X/* This array contains arbitrary screen labels */ Xstruct labelinfo Ldtva[] = { X#MENU X X X XCOMMON AMPLIFIER 1 2 3 4 X----------------- ------------------------------------- X Level % % % % X Structures % % Vel Sens % % % % X Partial Ena % Bias Pnt 1 % % % % X Env Mode % Bias Lev 1 % % % % X Bias Pnt 2 % % % % X Bias Lev 2 % % % % X Time KF % % % % X Time Vel Fol % % % % X Attack % % % % X Decay % % % % X Recover % % % % X Release % % % % X Attack Lev % % % % X Decay Lev % % % % X Sustain Lev % % % % X X X X Press SPACE BAR to sound note % at volume % for duration % on channel % . X#END X-1,-1,NULL X}; X Xstruct paraminfo Pdtva[] = { X/* XNAME TYPE POS MAX OFFSET MASK SHIFT ADHOC X */ X#O tva_level1 num %% 100 55 X#O tva_level2 num %% 100 113 X#O tva_level3 num %% 100 171 X#O tva_level4 num %% 100 229 X#O struct12 struct %% 12 10 X#O struct34 struct %% 12 11 X#O tva_vel_sens1 envlev %% 100 56 X#O tva_vel_sens2 envlev %% 100 114 X#O tva_vel_sens3 envlev %% 100 172 X#O tva_vel_sens4 envlev %% 100 230 X#O parmute pmute %% 15 12 X#O tva_bias_pnt_11 biaspd %% 127 57 X#O tva_bias_pnt_12 biaspd %% 127 115 X#O tva_bias_pnt_13 biaspd %% 127 173 X#O tva_bias_pnt_14 biaspd %% 127 231 X#O envmode envmode %% 1 13 X#O tva_bias_lev_11 tvablev %% 12 58 X#O tva_bias_lev_12 tvablev %% 12 116 X#O tva_bias_lev_13 tvablev %% 12 174 X#O tva_bias_lev_14 tvablev %% 12 232 X#O tva_bias_pnt_21 biaspd %% 127 59 X#O tva_bias_pnt_22 biaspd %% 127 117 X#O tva_bias_pnt_23 biaspd %% 127 175 X#O tva_bias_pnt_24 biaspd %% 127 233 X#O tva_bias_lev_21 tvablev %% 12 60 X#O tva_bias_lev_22 tvablev %% 12 118 X#O tva_bias_lev_23 tvablev %% 12 176 X#O tva_bias_lev_24 tvablev %% 12 234 X#O tva_time_kf1 num %% 4 61 X#O tva_time_kf2 num %% 4 119 X#O tva_time_kf3 num %% 4 177 X#O tva_time_kf4 num %% 4 235 X#O tva_time_vel_fol1 num %% 4 62 X#O tva_time_vel_fol2 num %% 4 120 X#O tva_time_vel_fol3 num %% 4 178 X#O tva_time_vel_fol4 num %% 4 236 X#O tva_attack1 num %% 100 63 X#O tva_attack2 num %% 100 121 X#O tva_attack3 num %% 100 179 X#O tva_attack4 num %% 100 237 X#O tva_decay1 num %% 100 64 X#O tva_decay2 num %% 100 122 X#O tva_decay3 num %% 100 180 X#O tva_decay4 num %% 100 238 X#O tva_recover1 num %% 100 65 X#O tva_recover2 num %% 100 123 X#O tva_recover3 num %% 100 181 X#O tva_recover4 num %% 100 239 X#O tva_release1 num %% 100 67 X#O tva_release2 num %% 100 125 X#O tva_release3 num %% 100 183 X#O tva_release4 num %% 100 241 X#O tva_attack_lev1 num %% 100 68 X#O tva_attack_lev2 num %% 100 126 X#O tva_attack_lev3 num %% 100 184 X#O tva_attack_lev4 num %% 100 242 X#O tva_decay_lev1 num %% 100 69 X#O tva_decay_lev2 num %% 100 127 X#O tva_decay_lev3 num %% 100 185 X#O tva_decay_lev4 num %% 100 243 X#O tva_sustain_lev1 num %% 100 71 X#O tva_sustain_lev2 num %% 100 129 X#O tva_sustain_lev3 num %% 100 187 X#O tva_sustain_lev4 num %% 100 245 X#O autopitch num %% 127 -60 X#O autovol num %% 127 -63 X#O autodur num %% 20 -5 *5 X#O autochan num %% 16 -1 *5 XNULL,NULL,-1,-1,-1,-1,visnum,0,0,0,0 X}; X X X/* X * dtvadin X * X * Take library bank 'data' and stuff values in the P array, by using X * the setval function. X */ X Xdtvadin(data) Xchar *data; X{ X /* The first RESERVESIZE bytes are reserved (arbitrarily) for the voice name */ X#SETVAL X} X X/* X * dtvadout X * X * Take (possibly changed) parameters values out of the P array and X * put them back into the library bank 'data'. X */ X Xdtvadout(data) Xchar *data; X{ X#GETVAL X} X X/* end */ END_OF_FILE if test 4686 -ne `wc -c <'d10tva.mnu'`; then echo shar: \"'d10tva.mnu'\" unpacked with wrong size! fi # end of 'd10tva.mnu' fi if test -f 'd10tvf.mnu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'d10tvf.mnu'\" else echo shar: Extracting \"'d10tvf.mnu'\" \(4831 characters\) sed "s/^X//" >'d10tvf.mnu' <<'END_OF_FILE' X/* $Id: d10tvf.mnu,v 1.6 89/05/06 17:13:18 lee Exp $ X * GLIB - a Generic LIBrarian and editor for synths X * X * D10 Tone Filter Librarian X * X * Code started 24 JAN 89 -- Michael R. Kesti mrk@gvgspd.GVG.TEK.COM X * modified by Greg Lee X * $Log: d10tvf.mnu,v $ X * Revision 1.6 89/05/06 17:13:18 lee X * rel. to comp.sources.misc X * X */ X X#include "glib.h" X#include "vis.h" X X#define D10TONSIZE 246 X#define RESERVESIZE 20 X Xchar *visnum(); X X/* This array contains arbitrary screen labels */ Xstruct labelinfo Ldtvf[] = { X#MENU X X X XCOMMON FILTER 1 2 3 4 X----------------- ------------------------------------- X Cutoff Freq % % % % X Structures % % Resonance % % % % X Partial Ena % Freq KF % % % % X Env Mode % Bias Pnt/Dir % % % % X Bias Lev % % % % X Depth % % % % X Vel Sens % % % % X Depth KF % % % % X Time KF % % % % X Attack % % % % X Decay % % % % X Recover % % % % X Release % % % % X Attack Lev % % % % X Decay Lev % % % % X Sustain Lev % % % % X X X Press SPACE BAR to sound note % at volume % for duration % on channel % . X#END X-1,-1,NULL X}; X Xstruct paraminfo Pdtvf[] = { X/* XNAME TYPE POS MAX OFFSET MASK SHIFT ADHOC X */ X#O tvf_cutoff_freq1 num %% 100 37 X#O tvf_cutoff_freq2 num %% 100 95 X#O tvf_cutoff_freq3 num %% 100 153 X#O tvf_cutoff_freq4 num %% 100 211 X#O struct12 struct %% 12 10 X#O struct34 struct %% 12 11 X#O tvf_resonance1 num %% 30 38 X#O tvf_resonance2 num %% 30 96 X#O tvf_resonance3 num %% 30 154 X#O tvf_resonance4 num %% 30 212 X#O parmute pmute %% 15 12 X#O tvf_freq_kf1 tkeyfol %% 14 39 X#O tvf_freq_kf2 tkeyfol %% 14 97 X#O tvf_freq_kf3 tkeyfol %% 14 155 X#O tvf_freq_kf4 tkeyfol %% 14 213 X#O envmode envmode %% 1 13 X#O tvf_bias_pntdir1 biaspd %% 127 40 X#O tvf_bias_pntdir2 biaspd %% 127 98 X#O tvf_bias_pntdir3 biaspd %% 127 156 X#O tvf_bias_pntdir4 biaspd %% 127 214 X#O tvf_bias_lev1 biaslev %% 14 41 X#O tvf_bias_lev2 biaslev %% 14 99 X#O tvf_bias_lev3 biaslev %% 14 157 X#O tvf_bias_lev4 biaslev %% 14 215 X#O tvf_depth1 num %% 100 42 X#O tvf_depth2 num %% 100 100 X#O tvf_depth3 num %% 100 158 X#O tvf_depth4 num %% 100 216 X#O tvf_vel_sens1 num %% 100 43 X#O tvf_vel_sens2 num %% 100 101 X#O tvf_vel_sens3 num %% 100 159 X#O tvf_vel_sens4 num %% 100 217 X#O tvf_depth_kf1 num %% 4 44 X#O tvf_depth_kf2 num %% 4 102 X#O tvf_depth_kf3 num %% 4 160 X#O tvf_depth_kf4 num %% 4 218 X#O tvf_time_kf1 num %% 4 45 X#O tvf_time_kf2 num %% 4 103 X#O tvf_time_kf3 num %% 4 161 X#O tvf_time_kf4 num %% 4 219 X#O tvf_attack1 num %% 100 46 X#O tvf_attack2 num %% 100 104 X#O tvf_attack3 num %% 100 162 X#O tvf_attack4 num %% 100 219 X#O tvf_decay1 num %% 100 47 X#O tvf_decay2 num %% 100 105 X#O tvf_decay3 num %% 100 163 X#O tvf_decay4 num %% 100 220 X#O tvf_recover1 num %% 100 48 X#O tvf_recover2 num %% 100 106 X#O tvf_recover3 num %% 100 164 X#O tvf_recover4 num %% 100 221 X#O tvf_release1 num %% 100 50 X#O tvf_release2 num %% 100 108 X#O tvf_release3 num %% 100 166 X#O tvf_release4 num %% 100 223 X#O tvf_attack_lev1 num %% 100 51 X#O tvf_attack_lev2 num %% 100 109 X#O tvf_attack_lev3 num %% 100 167 X#O tvf_attack_lev4 num %% 100 224 X#O tvf_decay_lev1 num %% 100 52 X#O tvf_decay_lev2 num %% 100 110 X#O tvf_decay_lev3 num %% 100 168 X#O tvf_decay_lev4 num %% 100 225 X#O tvf_sustain_lev1 num %% 100 54 X#O tvf_sustain_lev2 num %% 100 112 X#O tvf_sustain_lev3 num %% 100 170 X#O tvf_sustain_lev4 num %% 100 227 X#O autopitch num %% 127 -60 X#O autovol num %% 127 -63 X#O autodur num %% 20 -5 *5 X#O autochan num %% 16 -1 *5 XNULL,NULL,-1,-1,-1,-1,visnum,0,0,0,0 X}; X X X/* X * dtvfdin X * X * Take library bank 'data' and stuff values in the P array, by using X * the setval function. X */ X Xdtvfdin(data) Xchar *data; X{ X /* The first RESERVESIZE bytes are reserved (arbitrarily) for the voice name */ X#SETVAL X} X X/* X * dtvfdout X * X * Take (possibly changed) parameters values out of the P array and X * put them back into the library bank 'data'. X */ X Xdtvfdout(data) Xchar *data; X{ X#GETVAL X} X X/* end */ END_OF_FILE if test 4831 -ne `wc -c <'d10tvf.mnu'`; then echo shar: \"'d10tvf.mnu'\" unpacked with wrong size! fi # end of 'd10tvf.mnu' fi if test -f 'd10wfg.mnu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'d10wfg.mnu'\" else echo shar: Extracting \"'d10wfg.mnu'\" \(5670 characters\) sed "s/^X//" >'d10wfg.mnu' <<'END_OF_FILE' X/* $Id: d10wfg.mnu,v 1.6 89/05/06 17:13:19 lee Exp $ X * GLIB - a Generic LIBrarian and editor for synths X * X * D10 Tone Waveform Generator Librarian X * X * Code started 24 JAN 89 -- Michael R. Kesti mrk@gvgspd.GVG.TEK.COM X * modified by Greg Lee X * $Log: d10wfg.mnu,v $ X * Revision 1.6 89/05/06 17:13:19 lee X * rel. to comp.sources.misc X * X */ X X#include "glib.h" X#include "vis.h" X X#define D10TONSIZE 246 X#define RESERVESIZE 20 X Xchar *visnum(), *visonoff(); X X/* This array contains arbitrary screen labels */ Xstruct labelinfo Ldwfg[] = { X X#MENU for wfg X X X XCOMMON PITCH ENV 1 2 3 4 X----------------- ------------------------------------- X Depth @ @ @ @ X Structures % % Vel Sens @ @ @ @ X Partial Ena % Time KF @ @ @ @ X Env Mode % Attack @ @ @ @ X Decay @ @ @ @ XWAVEFORM GEN 1 2 3 4 Recover @ @ @ @ X------------------------------------- Release @ @ @ @ X Coarse Pitch % % % % Start Lev @ @ @ @ X Fine Pitch % % % % Attack Lev @ @ @ @ X Pitch KF % % % % Decay Lev @ @ @ @ X Bend Switch % % % % End Lev @ @ @ @ X Wave/PCMBank % % % % LFO Rate @ @ @ @ X PCM Number % % % % LFO Depth @ @ @ @ X Pulse Width % % % % Mod Sens @ @ @ @ X PW Vel Sens % % % % X X X X Press SPACE BAR to sound note @ at volume @ for duration @ on channel @ . X#END wfg menu X X-1,-1,NULL X}; X Xstruct paraminfo Pdwfg[] = { X X/*NAME TYPE POS MAX OFFSET MASK SHIFT ADHOC X*/ X X#O struct12 struct %% 12 10 X#O struct34 struct %% 12 11 X#O parmute pmute %% 15 12 X#O envmode envmode %% 1 13 X X#O wg_coarse_pitch1 cpitch %% 96 14 X#O wg_coarse_pitch2 cpitch %% 96 72 X#O wg_coarse_pitch3 cpitch %% 96 130 X#O wg_coarse_pitch4 cpitch %% 96 188 X#O wg_fine_pitch1 finetune %% 100 15 X#O wg_fine_pitch2 finetune %% 100 73 X#O wg_fine_pitch3 finetune %% 100 131 X#O wg_fine_pitch4 finetune %% 100 189 X#O wg_pitch_kf1 pkeyfol %% 16 16 X#O wg_pitch_kf2 pkeyfol %% 16 74 X#O wg_pitch_kf3 pkeyfol %% 16 132 X#O wg_pitch_kf4 pkeyfol %% 16 190 X#O wg_bend_switch1 onoff %% 1 17 X#O wg_bend_switch2 onoff %% 1 75 X#O wg_bend_switch3 onoff %% 1 133 X#O wg_bend_switch4 onoff %% 1 191 X#O wg_wave_bank1 wavebank %% 3 18 X#O wg_wave_bank2 wavebank %% 3 76 X#O wg_wave_bank3 wavebank %% 3 134 X#O wg_wave_bank4 wavebank %% 3 192 X#O wg_pcm_number1 pcmnum %% 127 19 X#O wg_pcm_number2 pcmnum %% 127 77 X#O wg_pcm_number3 pcmnum %% 127 135 X#O wg_pcm_number4 pcmnum %% 127 193 X#O wg_pulse_width1 num %% 100 20 X#O wg_pulse_width2 num %% 100 78 X#O wg_pulse_width3 num %% 100 136 X#O wg_pulse_width4 num %% 100 194 X#O wg_pw_vel_sens1 velsens %% 14 21 X#O wg_pw_vel_sens2 velsens %% 14 79 X#O wg_pw_vel_sens3 velsens %% 14 137 X#O wg_pw_vel_sens4 velsens %% 14 195 X X#O penv_depth1 num @@ 10 22 X#O penv_depth2 num @@ 10 80 X#O penv_depth3 num @@ 10 138 X#O penv_depth4 num @@ 10 196 X#O penv_vel_sens1 num @@ 3 23 X#O penv_vel_sens2 num @@ 3 81 X#O penv_vel_sens3 num @@ 3 139 X#O penv_vel_sens4 num @@ 3 197 X#O penv_time_kf1 num @@ 4 24 X#O penv_time_kf2 num @@ 4 82 X#O penv_time_kf3 num @@ 4 140 X#O penv_time_kf4 num @@ 4 198 X#O penv_attack1 num @@ 100 25 X#O penv_attack2 num @@ 100 83 X#O penv_attack3 num @@ 100 141 X#O penv_attack4 num @@ 100 199 X#O penv_decay1 num @@ 100 26 X#O penv_decay2 num @@ 100 83 X#O penv_decay3 num @@ 100 142 X#O penv_decay4 num @@ 100 200 X#O penv_recover1 num @@ 100 27 X#O penv_recover2 num @@ 100 85 X#O penv_recover3 num @@ 100 143 X#O penv_recover4 num @@ 100 201 X#O penv_release1 num @@ 100 28 X#O penv_release2 num @@ 100 86 X#O penv_release3 num @@ 100 144 X#O penv_release4 num @@ 100 202 X#O penv_start_lev1 envlev @@ 100 29 X#O penv_start_lev2 envlev @@ 100 87 X#O penv_start_lev3 envlev @@ 100 145 X#O penv_start_lev4 envlev @@ 100 203 X#O penv_attack_lev1 envlev @@ 100 30 X#O penv_attack_lev2 envlev @@ 100 88 X#O penv_attack_lev3 envlev @@ 100 146 X#O penv_attack_lev4 envlev @@ 100 206 X#O penv_decay_lev1 envlev @@ 100 31 X#O penv_decay_lev2 envlev @@ 100 89 X#O penv_decay_lev3 envlev @@ 100 147 X#O penv_decay_lev4 envlev @@ 100 205 X X#O penv_end_lev1 envlev @@ 100 33 X#O penv_end_lev2 envlev @@ 100 91 X#O penv_end_lev3 envlev @@ 100 149 X#O penv_end_lev4 envlev @@ 100 207 X#O penv_lfo_rate1 num @@ 100 34 X#O penv_lfo_rate2 num @@ 100 92 X#O penv_lfo_rate3 num @@ 100 150 X#O penv_lfo_rate4 num @@ 100 208 X#O penv_lfo_depth1 num @@ 100 35 X#O penv_lfo_depth2 num @@ 100 93 X#O penv_lfo_depth3 num @@ 100 151 X#O penv_lfo_depth4 num @@ 100 209 X#O penv_mod_sens1 num @@ 100 36 X#O penv_mod_sens2 num @@ 100 94 X#O penv_mod_sens3 num @@ 100 152 X#O penv_mod_sens4 num @@ 100 210 X X X"autopitch", NULL, -1,-1, @@, visnum, 0, 127, 60, 0, X"autovol", NULL, -1,-1, @@, visnum, 0, 127, 63, 0, X"autodur", NULL, -1,-1, @@, visnum, 1, 20, 5, 0, X"autochan", NULL, -1,-1, @@, visnum, 1, 16, 1, 0, X XNULL, NULL, -1,-1, -1, -1, visnum, 0, 0, 0, 0 X}; X X X/* X * dwfgdin X * X * Take library bank 'data' and stuff values in the P array, by using X * the setval function. X */ X Xdwfgdin(data) Xchar *data; X{ X /* The first RESERVESIZE bytes are reserved (arbitrarily) for the voice name */ X#SETVAL X} X X/* X * dwfgdout X * X * Take (possibly changed) parameters values out of the P array and X * put them back into the library bank 'data'. X */ X Xdwfgdout(data) Xchar *data; X{ X#GETVAL X} X X/* end */ END_OF_FILE if test 5670 -ne `wc -c <'d10wfg.mnu'`; then echo shar: \"'d10wfg.mnu'\" unpacked with wrong size! fi # end of 'd10wfg.mnu' fi if test -f 'k1single.mnu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'k1single.mnu'\" else echo shar: Extracting \"'k1single.mnu'\" \(4279 characters\) sed "s/^X//" >'k1single.mnu' <<'END_OF_FILE' X/* $Id: k1single.mnu,v 1.6 89/05/06 17:13:28 lee Exp $ X * GLIB - a Generic LIBrarian and editor for synths X * X * K1 Tone Waveform Generator Librarian X * X * Adapted for K1 from Kesti's D10 version by Greg Lee X * $Log: k1single.mnu,v $ X * Revision 1.6 89/05/06 17:13:28 lee X * rel. to comp.sources.misc X * X */ X X#include "glib.h" X#include "k1vis.h" X X#define RESERVESIZE 0 X X/* This array contains arbitrary screen labels */ Xstruct labelinfo Lk1sng[] = { X X#MENU for single X volume % X WAVE X ---mute--select------------------am-- XCOMMON 1 @ @ X----------------- 2 @ @ @ X source % a.bend time % 3 @ @ X vibr depth % a.bend vel>dp % 4 @ @ @ X vibr speed % a.bend ks>tm % X vibr shape % prs->freq % ENVELOPE 1 2 3 4 X prs->depth % pitch bend % ------------------------------------- X vibr wheel % ks curve % level @ @ @ @ X a.bend depth % poly mode % delay @ @ @ @ X attack @ @ @ @ XFREQUENCY 1 2 3 4 decay @ @ @ @ X------------------------------------- sustain @ @ @ @ X key track % % % % release @ @ @ @ X fcoarse/fixk % % % % vel curve @ @ @ @ X fine pitch % % % % level mod vel @ @ @ @ X fm vib/a.bend % % % % level mod prs @ @ @ @ X fm md prs>fq % % % % level mod ks @ @ @ @ X ks->freq % % % % time mod vel @ @ @ @ X time mod ks @ @ @ @ X X Press SPACE BAR to sound note @ at volume @ for duration @ on channel @ . X#END single menu X X-1,-1,NULL X}; X Xstruct paraminfo Pk1sng[] = { X X/*NAME TYPE POS MAX OFFSET MASK SHIFT ADHOC*/ X X#O volume pnum %% 99 10 X X#O src_24 twofour %% 1 11 0x4 2 X#O ab_tim num %% 100 19 X#O vb_dep finetune %% 100 13 X#O abveld finetune %% 100 20 X#O ifo_sp num %% 100 16 X#O abksti finetune %% 100 21 X#O ifo_sh ifosh %% 3 17 0x3 X#O prs_fq finetune %% 100 12 X#O vb_prs finetune %% 100 14 X#O p_bend num %% 12 15 X#O vb_whl vbwh %% 1 17 0x60 5 X#O ks_crv crv %% 4 17 0x1C 2 X#O ab_dep finetune %% 100 18 X#O poly_m polym %% 2 11 0x3 X X#O ky_tk1 onoffk1 %% 1 35 0x2 1 X#O ky_tk2 onoffk2 %% 1 36 0x2 1 X#O ky_tk3 onoffk3 %% 1 37 0x2 1 X#O ky_tk4 onoffk4 %% 1 38 0x2 1 X#O csfn1 csfnk1 %% 127 27 X#O csfn2 csfnk2 %% 127 28 X#O csfn3 csfnk3 %% 127 29 X#O csfn4 csfnk4 %% 127 30 X#O 4fine finetune %% 100 23 X#O vb_ab1 onoff %% 1 35 0x4 2 X#O vb_ab2 onoff %% 1 36 0x4 2 X#O vb_ab3 onoff %% 1 37 0x4 2 X#O vb_ab4 onoff %% 1 38 0x4 2 X#O prsfq1 onoff %% 1 35 0x8 3 X#O prsfq2 onoff %% 1 36 0x8 3 X#O prsfq3 onoff %% 1 37 0x8 3 X#O prsfq4 onoff %% 1 38 0x8 3 X#O 4fksfq finetune %% 100 83 X X#O s1mute mute @@ 1 22 0x1 X#O wave1 wave @@ 255 31 *3 X#O wvmsb1 num -- 1 35 0x1 *4 X#O s2mute mute @@ 1 22 0x2 1 X#O wave2 wave @@ 255 32 *3 X#O wvmsb2 num -- 1 36 0x1 *4 X#O am_12 am1 @@ 2 11 0x18 3 X#O s3mute mute @@ 1 22 0x4 2 X#O wave3 wave @@ 255 33 *3 X#O wvmsb3 num -- 1 37 0x1 *4 X#O s4mute mute @@ 1 22 0x8 3 X#O wave4 wave @@ 255 34 *3 X#O wvmsb4 num -- 1 38 0x1 *4 X#O am_34 am3 @@ 2 11 0x60 5 X X#O 4envlv num @@ 100 39 X#O 4envdl num @@ 100 43 X#O 4envat num @@ 100 47 X#O 4envdc num @@ 100 51 X#O 4envsu num @@ 100 55 X#O 4envre num @@ 100 59 X#O vlcrv1 pnum @@ 7 35 0x70 4 X#O vlcrv2 pnum @@ 7 36 0x70 4 X#O vlcrv3 pnum @@ 7 37 0x70 4 X#O vlcrv4 pnum @@ 7 38 0x70 4 X#O 4lmvel finetune @@ 100 63 X#O 4lmprs finetune @@ 100 67 X#O 4lm_ks finetune @@ 100 71 X#O 4tmvel finetune @@ 100 75 X#O 4tm_ks finetune @@ 100 79 X X"autopitch", NULL, -1,-1, @@, visnum, 0, 127, 60, 0, X"autovol", NULL, -1,-1, @@, visnum, 0, 127, 63, 0, X"autodur", NULL, -1,-1, @@, visnum, 1, 20, 5, 0, X"autochan", NULL, -1,-1, @@, visnum, 1, 16, 1, 0, X XNULL, NULL, -1,-1, -1, -1, visnum, 0, 0, 0, 0 X}; X X X/* X * k1sdin X * X * Take library bank 'data' and stuff values in the P array, by using X * the setval function. X */ X Xk1sdin(data) Xchar *data; X{ X#SETVAL X} X X/* X * k1sdout X * X * Take (possibly changed) parameters values out of the P array and X * put them back into the library bank 'data'. X */ X Xk1sdout(data) Xchar *data; X{ X#GETVAL X} X X/* end */ END_OF_FILE if test 4279 -ne `wc -c <'k1single.mnu'`; then echo shar: \"'k1single.mnu'\" unpacked with wrong size! fi # end of 'k1single.mnu' fi if test -f 'pc-mach.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pc-mach.h'\" else echo shar: Extracting \"'pc-mach.h'\" \(4748 characters\) sed "s/^X//" >'pc-mach.h' <<'END_OF_FILE' X/* $Id: pc-mach.h,v 1.6 89/05/06 17:13:40 lee Exp $ X * X * Machine-dependent stuff for DOS. Has only been tested with Turbo C 2.0. X * $Log: pc-mach.h,v $ X * Revision 1.6 89/05/06 17:13:40 lee X * rel. to comp.sources.misc X * X */ X X#include <dos.h> X#include <dir.h> X#include <stdio.h> X#include <ctype.h> X#include <fcntl.h> X#include <errno.h> X#include <sys/stat.h> X X#define TURBOC X X#define MIDIABLE X X#define OPENBINFILE(f,name,mode) f=fopen(name,mode[0]=='r'?"rb":"wb") X#define OPENTEXTFILE(f,name,mode) f=fopen(name,mode[0]=='r'?"rt":"wt") X Xextern unsigned long hzcount; Xextern int wrt_index, rd_index; Xextern int Nextpcchar; X X#define INT16 int X X#define STATMIDI (wrt_index==rd_index?0:1) X#define STATCONSOLE (Nextpcchar!=EOF?1:(kbhit()?(Nextpcchar=getch(),1):0)) X#define RTSTART rtstart() X#define RTEND rtend() X#define KEYCHECK keycheck() X#define TTYISRAW X#define NEEDSECHO X X#define SEPARATOR "\\" X#define CORELEFT coreleft X/* fake ones for a fake signal() */ X#define SIGINT 1 X#define SIG_IGN 0 X X/* CLOCK DEFINES */ X X#define MASTER_CLOCK_RATE 96 /* 96 CLOCKS PER BEAT */ X#define MIDI_CLOCKS_PER_BEAT 24 X X/* MISC INTERNAL DEFINES */ X X#define REC_CTRL_ALL 1 X#define REC_CTRL_NO_BEND 0 X#define REC_CTRL_NO_PRESS 2 X X#define COMMAND_MSG 0 X#define READ_MSG 1 X#define WRITE_MSG 2 X X#define SHELL_USE_INTERNAL_CLOCK 0 X#define SHELL_USE_TAPE_CLOCK 1 X#define SHELL_USE_MIDI_CLOCK 2 X X/* CODES FOR THE COMMANDS THAT ARE SENT TO THE MIC */ X X#define PLAY_STOP 0x05 X#define PLAY_START 0x0A X#define REC_STOP 0x11 X#define OVERDUB_STOP 0x15 X#define RECORD_STANDBY 0x20 X#define REC_START 0x22 X#define OVERDUB_START 0x2A X#define NO_ALL_NOTES_OFF 0x30 X#define NO_REAL_TIME 0x32 X#define THRU_DEAD 0x33 X#define COMMON_TO_HOST 0x38 X#define REAL_TIME_IN 0x39 X#define UART 0x3f X#define SET_REFA 0x40 X#define USE_INTERNAL_CLOCK 0x80 X#define USE_TAPE_CLOCK 0x81 X#define USE_MIDI_CLOCK 0x82 X#define METRONOME_ON_NORMAL 0x83 X#define METRONOME_OFF 0x84 X#define METRONOME_ON_DOUBLE 0x85 X#define BENDER_OFF 0x86 X#define BENDER_ON 0x87 X#define THRU_OFF 0x88 X#define THRU_ON 0x89 X#define INHIBIT_MEASURE_END 0x8C X#define REQUEST_MEASURE_END 0x8D X#define CONDUCTOR_OFF 0x8e X#define CONDUCTOR_ON 0x8f X#define RTM_AFFECT_OFF 0x90 X#define RTM_AFFECT_ON 0x91 X#define FSK_TO_INT 0x92 X#define FSK_TO_MIDI 0x93 X#define CLOCK_TO_HOST_OFF 0x94 X#define CLOCK_TO_HOST_ON 0x95 X#define CREFA_OFF 0x98 X#define READ_RESET_RECORD_CTR 0xAB X#define TEMPO_REQUEST 0xAF X#define CLEAR_PLAY_COUNTERS 0xB8 X#define CLEAR_PLY 0xb9 X#define SET_CLOCK_RES 0xc2 X#define SEND_DATA (0xd0 + 7) /* send on track 7 */ X#define SEND_SYSTEM 0xdf X#define SET_TEMPO 0xE0 X#define CLOCKS_PER_BEAT 0xE4 X#define BEATS_PER_MEASURE 0xE6 X#define CLOCK_TO_HOST_RATE 0xe7 X#define ACTIVE_TRACKS 0xEC X#define ACCEPT_CHANNELS_LOW 0xEE X#define ACCEPT_CHANNELS_HIGH 0xEF X#define TIMING_OVERFLOW 0xF8 X#define SEND_NULL 0xF8 X#define MEASURE_END 0xf9 X#define DATA_END 0xfc X#define RESET 0xFF X X/* CODES FOR THE MESSAGES THAT ARE READ FROM THE MIC */ X X#define REQUEST_PLAY_DATA 0xF0 X#define TIMING_OVERFLOW 0xF8 X#define DATA_END_MARK 0xFC X#define ALL_END 0xFC X/* #define MEASURE_END 0xF9 avoid redefinition */ X#define CONDUCT_REQ 0xf9 X#define CLOCK_TO_HOST 0xFD X#define ACK 0Xfe X#define SYSTEM_MSG 0xff X X/* HARDWARE LEVEL ACCESS TO THE MIC, FROM 'C' */ X X#define BASE_ADDRESS_MIC 0X0330 X#define STATUS_PORT_MIC BASE_ADDRESS_MIC + 1 X#define COMMAND_PORT_MIC BASE_ADDRESS_MIC + 1 X#define DATA_OUT_PORT_MIC BASE_ADDRESS_MIC + 0 X#define DATA_IN_PORT_MIC BASE_ADDRESS_MIC + 0 X#define INT_MIC 2 X#define INT2 10 X#define DATA_READY_MIC_MASK 0x40 X#define DATA_AVAILABLE_MIC_MASK 0x80 X#define INT_RESET_PORT 0x20 X#define INT_RESET_CODE 0x20 X#define PC_INTERRUPT_MASK_REGISTER 0x21 X X X/* INPUT/OUTPUT LOW LEVEL MACROS */ X X#define NOT_READY_FOR_DATA_MIC() (inportb(STATUS_PORT_MIC) & \ X DATA_READY_MIC_MASK) X#define NOT_DATA_AVAILABLE_MIC() (inportb(STATUS_PORT_MIC) & \ X DATA_AVAILABLE_MIC_MASK) X#define COMMAND_OUT_MIC(com) outportb(COMMAND_PORT_MIC, com) X#define DATA_OUT_MIC(dat) outportb(DATA_OUT_PORT_MIC, dat) X#define READ_DATA_MIC() inportb(DATA_IN_PORT_MIC) X X/* define the graphics drawing characters for showstr */ X X#define DRAW_VERT 179 /* vertical line */ X#define DRAW_HORIZ 196 /* horizontal line */ X#define DRAW_CROSS 197 /* vertical line intersecting horizontal */ X#define DRAW_UPTEE 194 /* 'T' */ X#define DRAW_DOWNTEE 193 /* upside-down 'T' */ X#define DRAW_LEFTTEE 195 /* 'T' on its left side */ X#define DRAW_RIGHTTEE 180 /* 'T' on its right side */ X#define DRAW_UPLEFT 218 /* upper-left corner */ X#define DRAW_UPRIGHT 191 /* upper-right corner */ X#define DRAW_DOWNLEFT 192 /* lower-left corner */ X#define DRAW_DOWNRIGHT 217 /* lower-right corner */ END_OF_FILE if test 4748 -ne `wc -c <'pc-mach.h'`; then echo shar: \"'pc-mach.h'\" unpacked with wrong size! fi # end of 'pc-mach.h' fi if test -f 'st-mach.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'st-mach.c'\" else echo shar: Extracting \"'st-mach.c'\" \(5590 characters\) sed "s/^X//" >'st-mach.c' <<'END_OF_FILE' X/* $Id: st-mach.c,v 1.6 89/05/06 17:13:42 lee Exp $ X * X * GLIB - a Generic LIBrarian and editor for synths X * X * Machine dependent stuff. X * X */ X X#include "glib.h" X#include <ctype.h> X Xint Rows, Cols; X X#define EscSeq(x) Cconout('\033');Cconout(x); Xstruct iorecinfo { X char *ibuf; X int ibufsiz; X int ibufhd; X int ibuftl; X int ibuflow; X int ibufhigh; X}; X#define MIDIBUFSIZE 5000 Xchar *Origbuf; Xint Origsize; Xstruct iorecinfo *Ioptr; Xint work_in[12], work_out[60]; /* GEM & VDI stuff */ Xint intin[128], ptsin[128]; Xint intout[128], ptsout[128]; Xint contrl[12]; Xint Handle, Vhandle; X X/* These contain the raw voice data */ Xhello() X{ X int dummy, n; X X appl_init(); X X /* Get the Midi Iorec and put in a bigger buffer */ X flushmidi(); X Ioptr = (struct iorecinfo *)(Iorec(2)); X Origbuf = Ioptr->ibuf; X Origsize = Ioptr->ibufsiz; X Ioptr->ibuf = alloc(MIDIBUFSIZ); X Ioptr->ibufsiz = MIDIBUFSIZ; X Ioptr->ibuftl = Ioptr->ibufhd = 0; X Cursconf(2,0); /* set non-blinking block cursor */ X mouseon(); X} X Xbye() X{ X /* Restore the original Midi Iorec buffer */ X flushmidi(); X Ioptr->ibuf = Origbuf; X Ioptr->ibufsiz = Origsize; X Ioptr->ibuftl = Ioptr->ibufhd = 0; X mouseoff(); X appl_exit(); X X /* are these ever called? SAF */ X windgoto(23,0); X windrefresh(); X windexit(0); X} X X/* getmouse - get currect row and column of mouse */ Xgetmouse(amr,amc) Xint *amr; Xint *amc; X{ X#ifdef USEMOUSE X int button, ret, keycode, tmp1, tmp2; X char msgbuf[8]; X X graf_mkstate(amc,amr,&tmp1,&tmp2); X /* evnt_multi(MU_TIMER, X 0,0,0, X 0,0,0,0,0, X 0,0,0,0,0, X msgbuf, 0, 0, X amc, amr, &button, &ret, &keycode, &ret); */ X /* convert bitmap x,y coordinates to row,colum */ X *amr = (*amr)/16; X *amc = (*amc)/8; X#else X *amr = -1; X *amc = -1; X#endif X} X X/* statmouse - return mouse button state (0=nothing pressed,1=left,2=right) */ Xstatmouse() X{ X#ifdef USEMOUSE X int tmp1, tmp2, tmp3, buttons; X char msgbuf[8]; X X graf_mkstate(&tmp1,&tmp2,&buttons,&tmp3); X /* evnt_multi(MU_TIMER, X 0,0,0, X 0,0,0,0,0, X 0,0,0,0,0, X msgbuf, 0, 0, X &tmp1, &tmp1, &buttons, &tmp1, &tmp1, &tmp1); */ X return(buttons); X#else X return(-1); X#endif X} X Xint Mouseshown = 0; Xmouseon() X{ X#ifdef USEMOUSE X if ( Mouseshown == 0 ) { X Vsync(); /* wait until next VBI to ensure updating */ X Cursconf(1,0); /* show block cursor */ X Vsync(); /* wait until next VBI to ensure updating */ X graf_mouse(257,NULL); /* display mouse cursor */ X Mouseshown = 1; X Vsync(); X } X#endif X} Xmouseoff() X{ X#ifdef USEMOUSE X if ( Mouseshown == 1 ) { X Vsync(); /* wait until next VBI to ensure updating */ X graf_mouse(256,NULL); /* hide mouse cursor */ X Vsync(); /* wait until next VBI to ensure updating */ X Cursconf(0,0); /* hide block cursor */ X Mouseshown = 0; X Vsync(); X } X#endif X} X X/* Return when either a console key or mouse button is pressed. */ Xmouseorkey() X{ X#ifdef USEMOUSE X int evnt, ret, keycode, button, mx, my, tmp1, tmp2, tmp3; X char msgbuf[8]; X X mouseon(); X for ( ;; ) { X graf_mkstate(&tmp1,&tmp2,&button,&tmp3); X /* evnt = evnt_multi(MU_TIMER, X 0,0,0, X 0,0,0,0,0, X 0,0,0,0,0, X msgbuf, 0, 0, X &mx, &my, &button, &ret, &keycode, &ret); */ X if ( button != 0 ) { X return(MOUSE); X } X if ( statmouse() > 0 ) X return(MOUSE); X if ( statconsole() ) X return(getconsole()); X } X#else X return(getconsole()); X#endif X} X Xflushconsole() X{ X while ( statconsole() ) X getconsole(); X} X Xstatconsole() X{ X /* return(Bconstat(CONSOLE)); */ X return(Cconis()); X} X Xgetconsole() X{ X /* return(Bconin(CONSOLE)); */ X return(Crawcin()); X} X Xgetmidi() X{ X return(Bconin(MIDI)); X} X X/*ARGSUSED*/ Xsendmidi(c) X{ X Bconout(MIDI,c); X} X Xflushmidi() X{ X while ( STATMIDI ) X getmidi(); X} X Xlong milliclock() X{ X register long save_ssp=Super(0L); X register long uhz200= *(long *)0x4ba; X Super(save_ssp); X return(uhz200 * 5); X} X Xmillisleep(n) X{ X long first = milliclock(); X while ( milliclock() < (first+n) ) X ; X} X Xchar * Xalloc(n) X{ X char *p; X X if ( (p=malloc((unsigned)n)) == (char *)NULL ) { X printf("*** Whoops *** alloc has failed?!? No more memory!\n"); X fflush(stdout); X bye(); X } X return(p); X} X Xwindinit() X{ X Cols=80; X Rows=25; X Cursconf(1,NULL); X} X Xwindgoto(r,c) Xint r,c; X{ X mouseoff(); X EscSeq('Y'); X Cconout(r+040); X Cconout(c+040); X} X Xwindeeol() X{ X mouseoff(); X EscSeq('K'); X} X Xwinderaserow(r) X{ X windgoto(r,0); X windeeol(); X} X Xwindexit(r) Xint r; X{ X exit(r); X} X Xwindclear() X{ X mouseoff(); X EscSeq('H'); X EscSeq('J'); X} X X/* windgets - get a line of input from the console, handling backspaces */ Xwindgets(s) Xchar *s; X{ X char *origs = s; X int c; X X while ( (c=getconsole()) != '\n' && c!='\r' && c!= EOF ) { X if ( c == '\b' ) { X if ( s > origs ) { X windstr("\b \b"); X s--; X } X } X else { X windputc(c); X *s++ = c; X } X windrefresh(); X } X *s = '\0'; X} X Xwindstr(s) Xchar *s; X{ X int c; X X while ( (c=(*s++)) != '\0' ) X windputc(c); X} X Xwindputc(c) Xint c; X{ X mouseoff(); X Cconout(c); X} X Xwindrefresh() X{ X} X Xbeep() X{ X Cconout('\007'); X} X Xwindhigh() X{ X} X Xwindnorm() X{ X} X X/**************** X * openls(), nextls(), and closels() are used to scan the current directory. X ***************/ X Xchar Dtabuff[44]; Xlong Origdta; Xint Atarifirst = 0; X Xchar * Xopenls() X{ X int n, c; X X Origdta = Fgetdta(); X Fsetdta(Dtabuff); X Atarifirst = 1; X} Xchar * Xnextls() X{ X static char fname[17]; X int n, c; X X if ( Atarifirst ) { X if ( Fsfirst("*.*",0x10) < 0 ) X return(NULL); X } X else { X if ( Fsnext() < 0 ) X return(NULL); X } X Atarifirst = 0; X for ( n=0; n<14; n++ ) { X c = fname[n] = Dtabuff[30+n]; X /* ALL phrase names are lower case */ X if ( c >= 'A' && c <= 'Z' ) X fname[n] = c - 'A' + 'a'; X } X fname[14] = '\0'; X return(fname); X} Xclosels() X{ X Fsetdta((char *)Origdta); X} X END_OF_FILE if test 5590 -ne `wc -c <'st-mach.c'`; then echo shar: \"'st-mach.c'\" unpacked with wrong size! fi # end of 'st-mach.c' fi echo shar: End of archive 2 \(of 15\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 15 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0