playmidi-2.4.orig/0040755000175000017500000000000010003743013011717 5ustar dsdsplaymidi-2.4.orig/playmidi.c0100644000175000017500000003272106337613270013715 0ustar dsds/************************************************************************ playmidi.c -- last change: 1 Jan 96 Plays a MIDI file to any supported synth (including midi) device Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #ifndef __FreeBSD__ #include #endif #include #include #include #include #include "playmidi.h" SEQ_DEFINEBUF(SEQUENCERBLOCKSIZE); #ifdef PLAY_FM int play_fm = 0xffff, play_gus = 0, play_ext = 0, play_awe = 0; #endif #ifdef PLAY_GUS int play_fm = 0, play_gus = 0xffff, play_ext = 0, play_awe = 0; #endif #ifdef PLAY_MIDI int play_fm = 0, play_gus = 0, play_ext = 0xffff, play_awe = 0; #endif #ifdef PLAY_AWE32 int play_fm = 0, play_gus = 0, play_ext = 0, play_awe = 0xffff; #endif struct miditrack seq[MAXTRKS]; int verbose = 0, chanmask = 0xffff, perc = PERCUSSION; int dochan = 1, force8bit = 0, wantopl3 = FM_DEFAULT_MODE; int patchloaded[256], fmloaded[256], useprog[16], usevol[16]; int graphics = 0, reverb = 0, chorus = 0, nrsynths, nrmidis; int sb_dev = -1, gus_dev = -1, ext_dev = -1, awe_dev = 2, p_remap = 0; int seqfd, find_header = 0, MT32 = 0; FILE *mfd; int FORCE_EXT_DEV = DEFAULT_MIDI_DEV; unsigned long int default_tempo; char *filename; float skew = 1.0; extern int ntrks; extern char *gmvoice[256]; extern int mt32pgm[128]; extern int playevents(); extern int gus_load(int); extern int readmidi(unsigned char *, off_t); extern void loadfm(); extern void setup_show(int, char **); extern void close_show(int); struct synth_info card_info[MAX_CARDS]; void synth_setup() { #ifdef ULTRA_DRIVER gus_dev = 0; sb_dev = -1; ext_dev = -1; awe_dev = -1; play_ext = 0; play_fm = 0; play_gus = 0xffff; play_awe = 0; #else int i; if (ioctl(seqfd, SNDCTL_SEQ_NRSYNTHS, &nrsynths) == -1) { fprintf(stderr, "there is no soundcard\n"); exit(-1); } for (i = 0; i < nrsynths; i++) { card_info[i].device = i; if (ioctl(seqfd, SNDCTL_SYNTH_INFO, &card_info[i]) == -1) { fprintf(stderr, "cannot get info on soundcard\n"); perror(SEQUENCER_DEV); exit(-1); } if (card_info[i].synth_type == SYNTH_TYPE_SAMPLE && card_info[i].synth_subtype == SAMPLE_TYPE_GUS) gus_dev = i; else if (card_info[i].synth_type == SYNTH_TYPE_SAMPLE && card_info[i].synth_subtype == SAMPLE_TYPE_AWE32) awe_dev = i; else if (card_info[i].synth_type == SYNTH_TYPE_FM) { sb_dev = i; if (play_fm) loadfm(); if (wantopl3) card_info[i].nr_voices = 12; /* we have 12 with 4-op */ } } if (gus_dev >= 0) { if (ioctl(seqfd, SNDCTL_SEQ_RESETSAMPLES, &gus_dev) == -1) { perror("Sample reset"); exit(-1); } } if (ioctl(seqfd, SNDCTL_SEQ_NRMIDIS, &nrmidis) == -1) { fprintf(stderr, "can't get info about midi ports\n"); exit(-1); } if (nrmidis > 0) { if (FORCE_EXT_DEV >= 0) ext_dev = FORCE_EXT_DEV; else ext_dev = nrmidis - 1; } if (!play_gus) gus_dev = -1; if (!play_fm) sb_dev = -1; if (!play_ext) ext_dev = -1; if (!play_awe) awe_dev = -1; if (ext_dev < 0) play_ext = 0; if (sb_dev < 0) play_fm = 0; if (gus_dev < 0) play_gus = 0; if (awe_dev < 0) play_awe = 0; #endif } void seqbuf_dump() { if (_seqbufptr) if (write(seqfd, _seqbuf, _seqbufptr) == -1) { perror("write " SEQUENCER_DEV); exit(-1); } _seqbufptr = 0; } int hextoi(s) char *s; { int i, j, k, l; j = 0; k = strlen(s); for (i = 0; i < k; i++) { l = toupper(s[i]); if (l > 64 && l < 71) j += (l - 55) << ((k - i - 1) * 4); else if (l > 47 && l < 58) j += (l - 48) << ((k - i - 1) * 4); else if (l != 88) { fprintf(stderr, "invalid character in hexidecimal mask\n"); exit(1); } } if (j < 0 || j > 0xffff) { fprintf(stderr, "mask must be between 0 and ffff hexidecimal\n"); exit(1); } return j; } int main(argc, argv) int argc; char **argv; { extern char *optarg; extern int optind; int i, error = 0, j, newprog; char *extra; char *filebuf; struct stat info; int piped = 0; printf("%s Copyright (C) 1994-1997 Nathan I. Laredo," " AWE32 by Takashi Iwai\n" "This is free software with ABSOLUTELY NO WARRANTY.\n" "For details please see the file COPYING.\n", RELEASE); for (i = 0; i < 16; i++) useprog[i] = usevol[i] = 0; /* reset options */ while ((i = getopt(argc, argv, "48c:aA:C:dD:eE:fF:gh:G:i:IMp:P:rR:t:vV:x:z")) != -1) switch (i) { case '8': force8bit++; break; case 'x': j = atoi(optarg); if (j < 1 || j > 16) { fprintf(stderr, "option -x channel must be 1 - 16\n"); exit(1); } j = 1 << (j - 1); chanmask &= ~j; break; case 'c': if (chanmask == 0xffff) chanmask = hextoi(optarg); else chanmask |= hextoi(optarg); break; case 'D': FORCE_EXT_DEV = atoi(optarg); break; case 'e': play_ext = 0xffff; play_gus = play_fm = play_awe = 0; break; case 'g': play_gus = 0xffff; play_ext = play_fm = play_awe = 0; break; case 'a': play_awe = 0xffff; play_ext = play_fm = play_gus = 0; break; case 'h': find_header = atoi(optarg); if (find_header < 1) { fprintf(stderr, "option -h header must be > 0\n"); exit(1); } break; case 'f': case '4': play_fm = 0xffff; play_ext = play_gus = play_awe = 0; wantopl3 = (i == '4'); break; case 'I': { int k; printf("Gravis Ultrasound Program Info:"); for (j = 0; j < 128; j++) { extra = gmvoice[j]; printf("%c%3d %s", j % 6 ? ' ' : '\n', j + 1, extra); for (k = strlen(extra); k < 8; k++) putchar(' '); } putchar('\n'); exit(1); } break; case 'i': chanmask &= ~hextoi(optarg); break; case 'M': MT32++; break; case 'p': if (strchr(optarg, ',') == NULL) { /* set all channels */ newprog = atoi(optarg); if (newprog < 1 || newprog > 129) { fprintf(stderr, "option -p prog must be 1 - 129\n"); exit(1); } for (j = 0; j < 16; j++) useprog[j] = newprog; } else { /* set channels individually */ extra = optarg; while (extra != NULL) { j = atoi(extra); if (j < 1 || j > 16) { fprintf(stderr, "opton -p chan must be 1 - 16\n"); exit(1); } extra = strchr(extra, ','); if (extra == NULL) { fprintf(stderr, "option -p prog needed for chan %d\n", j); exit(1); } else extra++; newprog = atoi(extra); if (newprog < 1 || newprog > 129) { fprintf(stderr, "option -p prog must be 1 - 129\n"); fprintf(stderr, "DANGER: 129 may screw everything!\n"); exit(1); } useprog[j - 1] = newprog; extra = strchr(extra, ','); if (extra != NULL) extra++; } } break; case 'r': graphics++; break; case 't': if ((skew = atof(optarg)) < .25) { fprintf(stderr, "option -t skew under 0.25 unplayable\n"); exit(1); } break; case 'E': play_ext = hextoi(optarg); play_fm &= ~play_ext; play_gus &= ~play_ext; play_awe &= ~play_ext; break; case 'F': play_fm = hextoi(optarg); play_ext &= ~play_fm; play_gus &= ~play_fm; play_awe &= ~play_fm; break; case 'G': play_gus = hextoi(optarg); play_fm &= ~play_gus; play_ext &= ~play_gus; play_awe &= ~play_gus; break; case 'A': play_awe = hextoi(optarg); play_ext &= ~play_awe; play_fm &= ~play_awe; play_gus &= ~play_awe; break; case 'R': reverb = atoi(optarg); if (reverb < 0 || reverb > 127) { fprintf(stderr, "option -R reverb must be 0 - 127\n"); exit(1); } break; case 'C': chorus = atoi(optarg); if (chorus < 0 || chorus > 127) { fprintf(stderr, "option -C chorus must be 0 - 127\n"); exit(1); } break; case 'P': p_remap = atoi(optarg); if (p_remap < 1 || p_remap > 16) { fprintf(stderr, "option -P channel must be 1 - 16\n"); exit(1); } break; case 'v': verbose++; break; case 'V': extra = optarg; while (extra != NULL) { j = atoi(extra); if (j < 1 || j > 16) { fprintf(stderr, "opton -V chan must be 1 - 16\n"); exit(1); } extra = strchr(extra, ','); if (extra == NULL) { fprintf(stderr, "option -V volume needed for chan %d\n", j); exit(1); } extra++; newprog = atoi(extra); if (newprog < 1 || newprog > 127) { fprintf(stderr, "option -V volume must be 1 - 127\n"); exit(1); } usevol[j - 1] = newprog; extra = strchr(extra, ','); if (extra != NULL) extra++; } break; case 'z': dochan = 0; break; case 'd': chanmask &= ~perc; break; default: error++; break; } if (error || optind >= argc) { fprintf(stderr, "usage: %s [-options] file1 [file2 ...]\n", argv[0]); fprintf(stderr, " -v verbosity (additive)\n" " -i x ignore channels set in bitmask x (hex)\n" " -c x play only channels set in bitmask x (hex)\n" " -x x exclude channel x from playable bitmask\n" " -p [c,]x play program x on channel c (all if no c)\n" " -V [c,]x play channel c with volume x (all if no c)\n" " -t x skew tempo by x (float)\n" " -d don't play any percussion\n" " -P x play percussion on channel x\n" " -e output to external midi\n" " -D x output to midi device x\n" " -f output to fm (sb patches)\n" " -4 output to 4-op fm (opl/3 patches)\n" " -a output to awe32 wave synth\n" " -h x skip to header x in large archive\n" " -g output to gravis ultrasound\n" " -E x play channels in bitmask x external\n" " -F x play channels in bitmask x on fm\n" " -G x play channels in bitmask x on gus\n" " -A x play channels in bitmask x on awe32\n" " -z ignore channel of all events\n" " -8 force 8-bit samples on GUS\n" " -M enable MT-32 to GM translation mode\n" " -I show list of all GM programs (see -p)\n" " -R x set initial reverb to x (0-127)\n" " -C x set initial chorus to x (0-127)\n" " -r real-time playback graphics\n" " -k kill anything using /dev/sequencer\n" " -w wait for anything using /dev/sequencer\n"); exit(1); } if ((seqfd = open(SEQUENCER_DEV, O_WRONLY, 0)) < 0) { perror("open " SEQUENCER_DEV); exit(-1); } synth_setup(); if (!(play_gus || play_fm || play_ext || play_awe)) { fprintf(stderr, "%s: No playback device found.\n", argv[0]); exit(-1); } setup_show(argc, argv); /* play all filenames listed on command line */ for (i = optind; i < argc;) { filename = argv[i]; if (stat(filename, &info) == -1) { if ((extra = malloc(strlen(filename) + 4)) == NULL) close_show(-1); sprintf(extra, "%s.mid", filename); if (stat(extra, &info) == -1) close_show(-1); if ((mfd = fopen(extra, "r")) == NULL) close_show(-1); free(extra); } else { char *ext = strrchr(filename, '.'); if (ext && strcmp(ext, ".gz") == 0) { char temp[1024]; piped = 1; sprintf(temp, "gzip -l %s", filename); if ((mfd = popen(temp, "r")) == NULL) close_show(-1); fgets(temp, sizeof(temp), mfd); /* skip 1st line */ fgets(temp, sizeof(temp), mfd); strtok(temp, " "); /* compressed size */ info.st_size = atoi(strtok(NULL, " ")); /* original size */ pclose(mfd); sprintf(temp, "gzip -d -c %s", filename); if ((mfd = popen(temp, "r")) == NULL) close_show(-1); } else if ((mfd = fopen(filename, "r")) == NULL) close_show(-1); } if ((filebuf = malloc(info.st_size)) == NULL) close_show(-1); fread(filebuf, 1, info.st_size, mfd); if (piped) pclose(mfd); else fclose(mfd); do { if (play_gus) gus_load(-1); default_tempo = 500000; /* error holds number of tracks read */ error = readmidi(filebuf, info.st_size); if (play_gus && error > 0) { int i; /* need to keep other i safe */ #define CMD (seq[i].data[j] & 0xf0) #define CHN (seq[i].data[j] & 0x0f) #define PGM (seq[i].data[j + 1]) /* REALLY STUPID way to preload GUS, but it works */ for (i = 0; i < ntrks; i++) for (j = 0; j < seq[i].length - 5; j++) if (ISGUS(CHN) && !(PGM & 0x80) && ((CMD == MIDI_PGM_CHANGE && !ISPERC(CHN)) || (CMD == MIDI_NOTEON && ISPERC(CHN)))) gus_load(ISPERC(CHN) ? PGM + 128 : useprog[CHN] ? useprog[CHN] - 1 : MT32 ? mt32pgm[PGM] : PGM); /* make sure that some program was loaded to use */ for (j = 0; patchloaded[j] != 1 && j < 128; j++); if (j > 127) gus_load(0); } newprog = 1; /* if there's an error skip to next file */ if (error > 0) /* error holds number of tracks read */ while ((newprog = playevents()) == 0); if (find_header) /* play headers following selected */ find_header += newprog; } while (find_header); if ((i += newprog) < optind) i = optind; /* can't skip back past first file */ free(filebuf); } close(seqfd); close_show(0); exit(0); /* this statement is here to keep the compiler happy */ } /* end of file */ playmidi-2.4.orig/jazz.mid0100644000175000017500000006446006257346275013430 0ustar dsdsMThd ðMTrkÿYÿQR¥ÿXÿ/MTrk ]ÿPASSPORTÀ°r [F à@‡2  ž "u>uDwFv DF">„&"v>uDvFuDF>"…VAtCt"vHv>vIAC> H#"S?wCt'tFv|FC? '„1'v=vCuFtCF='…:%uAvDv=uFt %#F A D ={ vO # uAu%A= DF %vl=tAvFt%Dt~%t DAF=;=uAuFuDu %T%vF4AD0%7=I vO # uAu%D?<+(t6(C(w>uDuGuC(>DG("v|AtDv=vh"\AD=q v6 :?tDtvAtDw"tHA>D" v‚T?vDw?w:?D{IFwD+Dn$F&CyDaC:wH?y :?D|cFwDCDo F"CwDtCp?y? :s;?z:? D{AFwD7DdF&Cy D{?x CG:z?ƒ`:ŠxFlRl7ll°@GlJlCl‚6CJG>8„gFlBlKl?l6l:l6F:KB ?‚<6l?lKlFlBl :l‚|BK?6:F…k°@ :lFl7l>lAlMlE7>:AFYMaDlKl?l8°@5<?D H KJFl7lJl>l:lAl°@‚*FA>J7:gÀ8°y[P… !‚4  õD={I{D:AC=ˆZ={IzFHzI{C|Fz>A>C F>{A{FzC|=l@WEs> F?vA@z?<:xCxDƒ C0>A:…Iz ={7IHz ={AzC|Fy‚#>F A CTAzC|Fz J|‚RJ F AClH|C|FzK{‚NHFKCVC{H|E{?{ M|‚+M EH?C…@J| M|R|O|hJM RO‚^R|I{M|O|wMRI OI{O|M|R|SRIOM‡)R|O|J|M|pROMJ‚`M|R|I{O|uMROIO|R|M|I{\MO I R‡R|J|M|O|eMORJ‚HO|M|R{I{~OMR I~I{R|O|M|[OIM Rƒ5M{JMMrJM M{BM M|DMOyCQyO6QR{JR M{EM M{EMMy?MMv@MKzDK JyFJFyIJ{FRKzJGKH{HKzHKKLzCLIyOL|IEL M|EM OzFOQzCQR{`R„*PxHyKzEz„4HEPKaFzCzJz MzŠET@E‰ FCJM„b°[ÿ/MTrk{ÿ MIDI HITSÁB±x @[M á@‡0‘,w 8vs2t?N=p>1o2z1=: :w=r 7x3r7r=:877u:p}:37:u=tM3u:7u=r7:r 7w32: :v=w 7:3s7w=J7 7u:r3g: 7:v=u|:L=^,o3oƒ-, 31t5uƒ(51 8r 4v^848w3v<83 5w,x‚f,75,vÁB±x <[A ‘:}.ue,”V:.‚:zH:?|? D{tFwDDj!FC|DzCk?|2:z?3:?{?D{mFwDDsF C}DuC‚:zI:?}'?D{xFwDDdFCzDkCi?|:y?*:?}? D{cFv DDl'FCzD C ?{T:x?…:¸6v*tM,l*68i ,8:o.m?.=u :1x}1:m .q=B.:;l/m/=t1l;B=?w 13t‚,?3b3x?|E3?3t?w3? ?s3uK?3 3x?y‚ 3?!?m3t"? 3Ay5wK5A 3s?uC35s?AuA5Bx6w‡B6z.w:{R3u:.?qq? 3 6zB{F65y BAxA5?q3u??3 5xAw5ACw7y‡UC7FA{>z:w7s5s‚ 5:7>A'7v5xC|?|;{b?C75;?zDy8xAy;y ?AD;8 AvC{>{Fy:xƒ:FCA>=FyAz>zCz:xL>AC:FFq:GDv@{?z?FD@:?t@zFuDy:wHF:@?Dp8z?{<{FzC|R8 ?<FCÁ:±|[K…9‘.h± H ‘2f5g7hV275 .J.s2s7t5u32 .57!.h2g7o5n..527‚2u7u.u5v52.75ˆ`.j7j5i2iO725.Q.s2u5t7u7752 .'.j7k2k5k0.527t.t7u5u2u>2.75ˆN.j5k7j2jF2 . 75K.u7u5u2t32 .57.i2i7i5h).2 57v.u5u7u2u;2 .75ŠH"l.lƒ ".[.v"vƒ*."F"p.p‚."^.v"vW".‚2n7n5n .n`.275:.u2u5u7u>275.07n5n.n2n752.\.u7u5u2uM.257ˆ8.n7n5n2nm2 75.-.u2v7v5vD2.75.n 5m7l2n375 2.i.v7v5v2vS7.52ˆI.n 2n7n5nP725.J.v2v5v7vG27.5.n7n2o5o1.275n.w7w5w2wL27.5ŠO.p"pƒ ".C"x.xƒ6".9.r"o‚."r.y"x^. "¾v2w7u.u5vQ27.5.r2r7r5rI2.75c7y5y.w2va572.ˆ6.n2o7p5pn572.;.y2x7z5yI2 7.5.o2p7p5o?2.75l5x2x7y.u^.527ˆP.l7j2j5gj725.2.x2x5w7zX2.75.o2o7p5p;2.75T.x7x2w5xL2.7 5Š,.w"wŽI".…<)w?w0w9w„]0 )9?t7v:v5u>v“v:75>…±[ÿ/MTrk ýÿ Big Band Jazzÿ(Demo)Â8²~[F U â@C@žJ’HzYKyH^KPzZPK|QHxKH DzPD FzFHzcFzH{FDtZA{DUAF| FHzPH FvDr!F8AyDvA)AzdA >|H|‚3> HF| F HzRFy HCtFWAz CMAFvHwFSFwHCuFXC A|xA)Az\A D|=z:{OD=:hD|<|A{…MD <A‡ Dx<{A|RD<AlDyA|<|†%A,D <†#Dz?|<|d?D<=z:wDu†/= :D†5Dz :{=|OD:=zA{Dz<|†&AD<†BAzD|<|LAD<{Fv={ Az† A)F=†,=zDz AzYAD =dAyy;y8>D;2;z>zDz2> DD{>{; ;{T>D ;';{ D{>{<;D>D|=|:|QD=:A|=|D|l=DAjAz<|D{†CA*D<†!D|<| AzO<DA Dy<|A{†HAD<†#D{?z<|BD<?x=|Dz:w†@:$=D†-D{:w={RD=:yAs<|Dy†:&= D:u =w Dw(:=D;q>zD|N>;D9A| D{=|M=ADrD|A|<|‚bA><mD'Â8²x[Qi’RzKv² 0’OzHt8²@4’ORKH.QwPuKr²@’DlHhQOx P-²@#’OKDH²@q’DzKuHzA{dHDKADxAy?yHyiAD?HKwDzHzA{6²@5’DA HK0FyJ|C|Mx²@Q’FJCMD{HyKvOz²@=’HKDO PvIwLzEv²@ @%’ELPIHzKwDuOw²@@%’HKOD2DvHuKwAt²@@"’HAKD²@’HvAw?wDts?DAHr@x=uDuGx ²@I’@D G=FFt?uq:ns:7>A‚X:k?kq7s:pAlf:>7A‚t:n>o7sAl_:7>A‚a:opcA:>7‚v:o7r>lAnF:7 >A‚{l7qAlf:>7Aƒ:l7q>lAkc: 7>A‚d?k:kCnll:A7>‚p>n7r:oAle:A7>‚\?m:nCnn7rdA:>7ƒ7r:o>nAoZ:A>7‚i?l:nCnq7r:pAk`>A: 7‚}An>p7s:kk:7>A‚U:o?kCol7r:nf:7A>‚b:n7nAl>nh:A>7‚rAk>l7p:n`:7A>„sFlAl=nCl\=ACFAm=rFmClo=AFC|=rFmAnCl_=ACFxAp=rFnCl}AC=Fo?kBkFlkh>:A7:pAp>q7q_:7>A:kAk7k>kOA:>7:o>o7sAlk7:>Ae:k7k>kAkh>:7At:nAo>q7r{:7>As:k7kAk>k|:7>At:pAo>p7rO7:>A|Fk=kCkAk?AC=F!Ap=sFnClc=ACFuFk=kAkCkYA=CF =rFnClAngA=CFFk?kBkkd>:A7z:n7sAo>ox7:>Am?k:kk Akq:7>AWAm7s>q:o :7>AX:k7kAk>kf:7>A:o>l7qAkb:7 > AÙ²[ÿ/MTrk§ÿexcerpts from:Ã9³| @[X ã@p@ž%“3z,xg3,`3w7{† 37†a:{3wz3:W,u3z?,3,u3rU3,,t3vr,3,u3uI31x,5ws51 5x1pA511s5xi51(1u5{0154w43xu3v,u3zƒ~3,+Ã:³w[Kn“?x³ c“Fww:xAv7tC:A>78w?xx.t8x;x\8;.> 's7xs8p5p.nfF>A85.„U5nFqAp>s8n.o_>A8F5.…xFqAr>q8m5l.l.AAp=88m"5>./F8Aa:oFoCr=r3oRF3=:C„):nCq=q3pFsj:F=3C…WFqAp=p1l8nzF A=8s1,n)x;)7)p4)?)xN),.uu.4.u-.)y+);"y0"A.x+.+r2+)t3),'y5'F'y4'9"u"E"xD"7'y.'<'zA'0*w/*E'wG'0"x6"@"y;"-)y;)D)y&)>.w&.?)zF)1"w>",&yG&-'w,'A'w0':"s,";&y=&B'yK')z?)4*v/*?'wJ'-.t#.M.y7.>+w*+F+y=+2$w&$E$zH$%)y0)K)yq&)!"yE"!.z.5.z9. &zR&.z.1.w,.'z9'='z>'()z0)B)y>)7"y,"D"x@".&z2&G&z6&?'z1'K'zA'+)z%)G)z-)<"z'"G"z<"+&y*&C&y,&@'z0'E'y4'3)z!)I)z!)K"z"‡z„R"zŒd"†3"z"„9´[ÿ/MTrk€ÿ2. How High TheÿMoonÅ µv @[A¥U•"x8"„ "wF"…"w‚8"''y9'ƒy'y8'…*%w‚,%# yS !$yF$$'xA',)xn),vV,)up'u );'$xd$ uf $yf$'ud')yk) ,vd,)wp)'ul v'B %yj% )w^),tT,.ur1y .91 .vZ.,vp,)wp s)H $wR$'vj')x^),v^,)xs'v)e' $wp'v2$8'+y[+.wk+w.>+;'u>'(%tj% "tp"'qg p'? . rV %t<%4%su(u%W((wk'x(e''yo w'T $x[$'ug' )w>)4,rY,)vr'w )I'$yl u$f $we$'ud' )v\),tX,)wb) 'u$p'-$ se %yg%)xp),v_, .qX.!1wp.x61:,t .N,)vr u,)3 $uh's$R')x\),ue, )wp'u)T'$um'r$R' +vV+.xn+x.0+?'uX'%vz"p%m't"W o'm w pS %uA%0%u_% (t('y` x'„8$vÅ8µz• µ "!•$ƒZµ[X¨3ÅAµx[K„{ K¼•5y557yw7:z„d:]:y$:=y‚=:z,:5zU55w@57ys7:z„u:\:y':=y‚=:w-:5yU55wB7y5k7 :z„v:V:y": =z‚=:w+: Cz‚#C:w#: =z‚D:w=': Ax‚*A:w: :w„[:ˆ/F{cDqFCtD#BwCB ?w>wD>C{UC>y)> AzƒBA…^Iz‚Ep IDvE.CwDC FvMFBrB?wG?s=AxN>yA>vT>=tv=CFutF?u^Cu?zCFuwF‚Jwƒ>J=wV=‚Dv A D =uLAv={A Dv‚+D~vp>&=ub= Æ9¶z[A„t Z¨_ÆB¶y[O„z m¼–)w:) +u|+ .w„l.j.y 1w .s1$.w0.)vV))s=+t )q+.v„n.^.w0.1w‚1.u&.)vC)&)sB+t)+|.v„i.k.v&. 1v‚$1.t&.7v‚+.u7.1u‚@.s 1%5w.‚.t5..p„Z.ˆK:vR8n:7n8&6w76 3tB0s3(0.x„.…c.vP0s.>02uG27w]72v#25w‚{5†-=x\9l=98p(7r8 7:rR:6r63vN30tx0„-s.o- .-q.q-G.-s.n-'.-r.p-H.-s.m-.-s.p-Y.-p .f-.%1v 2v1p25qI2t520uJ0.x.Z)u@+s)f+ .x„R.~.s.1r.‚1%.t)u.M)-)s8)+t+.y„^.o.u#1t.‚1.v/.)v6)?)u6) +t+žR.sF.1w‚>1..vQ.)r‰)…R¶[ÿ/MTrk iÇC·w [N ç@e@†S—8vvT>=tv=*3U3{<3_#G3w#z*{ 3&z 3~03*#3{ & 33x #}&z*|&&U3f3{?3Y#*F3v#} *{3 3~&v)35#*3{"3 &3x#{*{3W3|o30#*K#y3u*| 3 &z 3{O3#&*;3|#{&y*|&353q# 3 * 3{#}&|H*| 3&A3y&u#&3*-3}&{ *| 3 &e*3w33y&|1u#}'3A3z *{&83W1#&z-&3y83W*i3| *|#33y33u 3*@&z3{ *{*3n&#3{#33u3*&z'&&*{3}83g&| #|3y&33s*3J*|3{73|3z#3 3r3*#v #)3}*|>3}3x&33rY37*&zB*|3|63x&3y3&s3t%&c3%*<&y*|3|)& 3U*%3x33t&z3[*{3|&$3r#y 3u&{&&*3W*|3|;3p3y$33x3&*Q3~*{&{=3z&3v3#3wd35*#u&y 3|#& 3*{%&z3{ #z&3'* 3{(33t*|3S3|3*L3{*|033z# 33u*3U3{*|03/3|/3|&{3z &*#z33w*|#53Y*3{+33v1u#|3K3| *{.33w33v*3T3|*|<31T3y#33w3 *K3|*{33~3x&33x*3U3|*{83t3v"33w3*P3} *|33h&z3y!&33v 3)*=3}*|-3r3t&33v3&z *&J3|*|.3v3{,33x30*83|*|X38*U3y:3,3z*{"33z*33xA3E*"3y&33v*|3^3|13w&z*3~#yA3 *{*3~&,3(*N3{*{#3t&z3}#3)* 3z&2*|h33&{C&3|&u%31&B*3|&y!3&*|&y3~ &(35*Ç8·{A \ƒ`[UÁ5—Hz0IuH&Ju I$JM{KMA{†oA„&Ht%It H)JxIJ MwPMA{†A„{Hu&It H/JxIJM{EM!F{…FFy*F Iz‚/FsI#M{F‚6Fv M FFw„'F½A}>AC|}Cÿ/MTrk É¹v™%v¹[K ™%e%v %e%v %e%v %Ÿk#y&v #&…B#y&x#&†T#x&x#&‚E#y&w#&…?#x&x #&†P#x&w#&J&w &j#w.o #.Y#x&v*p#&**o *9.p #w. #c#y&u*o&#**m *1.n .#x #]#x*o&v#*&*o *5.o .#x #S#w&w*o#&*"*o *..o #w. #Z#x&x*p#&* *o *3.o#w .#f#w&x*o#&* *p *?.o #w. #T#x&v#*p& **p *-.o .#w #`#x&v*o#&**n *7.o#x .#b#w&u*o#&**m *>.o .#w #d&u#w*o&#* *p *9#x.p#.a#w&u*o#&**o *..p .#w #X#x&v*o#&**n *=.n . #w #[#y &v#*o& * *o *<.n #w. #[#w&w*o#&**m *:.m#x.#g#v&w*p#&**n *>.o#w.#%x %M#w&w#*o&**n *9.m #y. #`#x&v *o#& **q *5.n #w. #c#w&v*o#&**n *8.n#w .#e#x&v*o#&**n *9.n #x. #d#w&w#*o&**n *?.m#x .#f#w&u*o#&**n *A.m .#w #d#t&t*o &#**m *;.n #x. #`#w&w*o#&**n *U#w.o#.&s &:&w*p *&k.p#w.#Z#t&u*p#&**n *5.n .#v #\#w&v*o#&**o *;.n #w. #W#w&v*o#&**n *=.n #w. #T#w #&v*o &**n *;.l#y.#]#w *o&v# *&*n *B.o#w.#`#x&w#*o& **n *;.p#w.#j#u*p&v#*&*o *9#x.p .#k&u#w*o&#* *p *F.o #x. #>#w #*p&v*&*n *=.q#y.#_*m#w&u*#&*n *8.p .#w #[#w&x*p#&**l *?.o#x .#i&v*p#w &*#*o *7.o .#w #W#w &v#*n& **l *).o .#x #g#w*m&v#*&*m *2.n #x. #p#w&w*n#&* *n *0.n .#x #]#x&v*q#&**o *:.p #w. #Z#w&v#*o&**p *;.n#x.#d#w&w#*o&**o *>.o#w.#a#x&v#*o&*}*o *J.o#x.#Y#w&v*p#&**q *A.n#w .#_&r#u*n&#**o *E.n#v .#]#w &u#*n&**q *N#w.o #.W#x&u# &*o **p *G.p #w. #&v &1&w*p&*d.p#y .à@™#­Tɹy[W‹+™,u1,4*p*D,u,0,r-,0*q *0,v,/,s.,B%s*r *L%\,v,-,r.,K*s*),u,/,r.,L%u*r *n%0,v,0,r-,U*t*,v,0,r,,\%t*r *O%:,v,0,r1,g*q*,v,0,r-,`%u*q *W%9,v,/,s/,`*p *,v,,,r0,\%t*r *`%9,v,0,r.,W*r *,r,.,r/,]%t*p *Z%@,v,-,r1,X*p *%,v,2,r.,L%t*q *%%x,t,+,r#x,#H#u%t*n *#%o,u,.,r#s, #F#v%t*r *##%Y,u,.,r#q,#I#p%t*p *#)%T,s,-,r#i,#H#i%t*o *!#-%Y,s,/,r #q", #D#v%s*r *#*%T,s,.,r#r,#H#q%t*p *#%%P,v,2,r#q,#D#w%t*p *"#*%^,u,3,r#o+,#D#u%s*o *"#'%Z,u,0,r #y!, #F#u%t*n *#*%Z,s,.,r#v,#D#s%t*n *#)%`,u,0,r#x&,#G#v%t*k * #'%c,t,.,r#u(,#G#s%t*s * #(%c,t,/,r#k',#E#r%t*q*!#(%X,s,,,r#u,#F#y%t*s *#&%Q,t,.,r#s,#H#w%t*p *#+%Y,u,,,r#s,#F#q%s*r *#(% #u3w3#E*w%t#v3w3 #&*%#p3v3#H#x%t*x3w3#&*%#x3u3#H#v%t*x3x3 #+%*#v3w 3 #C#s%t*x3x(3#**%#s3s,3#D#x%t*x3y!3#&*%#s3t3 #I#u%t*x3y3 #*%*#u3t3 #G#u%t*w3y 3 #**%#s3w3#G#w%s*w3w3 #(%*#v3u3#G#u%t*w3x3#&*%#n3u3#G#t%t*x3x3#**%#u3t3 #E%t#v3x*x3#+*%#q3u3#D#s%t*x3y3#)*%#s3v3#H#z%t*x3x3#'%*#J3t 3#G#w%s*w3x 3#,*%#p3w 3 #C#w%t*x3y3#,%*#v3t3#F#x%t*u3w3'#+*%^3y353s"3K&z*w 3x 3&&*1{#{#{ 3x# 1#3C&{*x3y3&*#{*v3y1{3#1*&{3y"3&}1{D#{ #L1i3w 3"&{*x3t3& *`3w3C3u3@&{*w3y 3& *#{#{1{#3r# 31/&{*v3y3&*#{3x1{3#1$*w&{ 3y23&*l1{0#{#1 3x 3%*w&{3r3"&*n3y353r"3A&{#{*x3w#3#& *3s1{#{3# 1+3y &{*w38&*3w#{1{3#153y&{#{*w3##&*V1{B3t313y343s&{*w 3!&'*V3w3<1{3v#y13#,3v*x%31*%3u"3C*w3v"3/*3w"3J*w3y!30*3x3J3x*w"3*50{ 0<-w->+y +I#|/#‚g1w&y(3w<#y3 &1j#ƒy1w&y3w%1#y3@&M3u3# ,r,'3u3!,r,3r33,s,-3w 3(,r, 3r3,r,&3r3 ,r,&3r3,r,3r3,r,3r3,r,3r3,r,3s3,r,3r3,r,3r3,r,!3r3,r,3r3,r,3r3,r,3r3,r,3r3,r,3r3,r,3r3,r,3r3,r,3r3,r,3r3,r,3u3,r,3s3,r,3r3,r,3r3,r, 3r 3‚20u 0-x -&{#{*v +x+1{ 1&*#… ¹[ÿ/MTrkÿ© 1991à@÷@@­T@ÿ/MTrk%ÿPassport Designà@÷@@­T@ÿ/MTrk ÿProd. By Music à@ƒ¥@ÿ/playmidi-2.4.orig/gmvoices.h0100644000175000017500000001345206257346275013737 0ustar dsds/******************************************************************** gmvoices.h -- List of GM voice filenames for GUS. Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. ********************************************************************/ char *gmvoice[256] = { /* [Melodic Patches] */ /* 000 */ "acpiano", /* 001 */ "britepno", /* 002 */ "synpiano", /* 003 */ "honky", /* 004 */ "epiano1", /* 005 */ "epiano2", /* 006 */ "hrpschrd", /* 007 */ "clavinet", /* 008 */ "celeste", /* 009 */ "glocken", /* 010 */ "musicbox", /* 011 */ "vibes", /* 012 */ "marimba", /* 013 */ "xylophon", /* 014 */ "tubebell", /* 015 */ "santur", /* 016 */ "homeorg", /* 017 */ "percorg", /* 018 */ "rockorg", /* 019 */ "church", /* 020 */ "reedorg", /* 021 */ "accordn", /* 022 */ "harmonca", /* 023 */ "concrtna", /* 024 */ "nyguitar", /* 025 */ "acguitar", /* 026 */ "jazzgtr", /* 027 */ "cleangtr", /* 028 */ "mutegtr", /* 029 */ "odguitar", /* 030 */ "distgtr", /* 031 */ "gtrharm", /* 032 */ "acbass", /* 033 */ "fngrbass", /* 034 */ "pickbass", /* 035 */ "fretless", /* 036 */ "slapbas1", /* 037 */ "slapbas2", /* 038 */ "synbass1", /* 039 */ "synbass2", /* 040 */ "violin", /* 041 */ "viola", /* 042 */ "cello", /* 043 */ "contraba", /* 044 */ "marcato", /* 045 */ "pizzcato", /* 046 */ "harp", /* 047 */ "timpani", /* 048 */ "marcato", /* 049 */ "slowstr", /* 050 */ "synstr1", /* 051 */ "synstr2", /* 052 */ "choir", /* 053 */ "doo", /* 054 */ "voices", /* 055 */ "orchhit", /* 056 */ "trumpet", /* 057 */ "trombone", /* 058 */ "tuba", /* 059 */ "mutetrum", /* 060 */ "frenchrn", /* 061 */ "hitbrass", /* 062 */ "synbras1", /* 063 */ "synbras2", /* 064 */ "sprnosax", /* 065 */ "altosax", /* 066 */ "tenorsax", /* 067 */ "barisax", /* 068 */ "oboe", /* 069 */ "englhorn", /* 070 */ "bassoon", /* 071 */ "clarinet", /* 072 */ "piccolo", /* 073 */ "flute", /* 074 */ "recorder", /* 075 */ "woodflut", /* 076 */ "bottle", /* 077 */ "shakazul", /* 078 */ "whistle", /* 079 */ "ocarina", /* 080 */ "sqrwave", /* 081 */ "sawwave", /* 082 */ "calliope", /* 083 */ "chiflead", /* 084 */ "charang", /* 085 */ "voxlead", /* 086 */ "lead5th", /* 087 */ "basslead", /* 088 */ "fantasia", /* 089 */ "warmpad", /* 090 */ "polysyn", /* 091 */ "ghostie", /* 092 */ "bowglass", /* 093 */ "metalpad", /* 094 */ "halopad", /* 095 */ "sweeper", /* 096 */ "aurora", /* 097 */ "soundtrk", /* 098 */ "crystal", /* 099 */ "atmosphr", /* 100 */ "freshair", /* 101 */ "unicorn", /* 102 */ "sweeper", /* 103 */ "startrak", /* 104 */ "sitar", /* 105 */ "banjo", /* 106 */ "shamisen", /* 107 */ "koto", /* 108 */ "kalimba", /* 109 */ "bagpipes", /* 110 */ "fiddle", /* 111 */ "shannai", /* 112 */ "carillon", /* 113 */ "agogo", /* 114 */ "steeldrm", /* 115 */ "woodblk", /* 116 */ "taiko", /* 117 */ "toms", /* 118 */ "syntom", /* 119 */ "revcym", /* 120 */ "fx-fret", /* 121 */ "fx-blow", /* 122 */ "seashore", /* 123 */ "jungle", /* 124 */ "telephon", /* 125 */ "helicptr", /* 126 */ "applause", /* 127 */ "ringwhsl", /* [Drum Patches] */ /* C 0 */ NULL, /* C#0 */ NULL, /* D 0 */ NULL, /* D#0 */ NULL, /* E 0 */ NULL, /* F 0 */ NULL, /* F#0 */ NULL, /* G 0 */ NULL, /* G#0 */ NULL, /* A 0 */ NULL, /* A#0 */ NULL, /* B 0 */ NULL, /* C 1 */ NULL, /* C#1 */ NULL, /* D 1 */ NULL, /* D#1 */ NULL, /* E 1 */ NULL, /* F 1 */ NULL, /* F#1 */ NULL, /* G 1 */ NULL, /* G#1 */ NULL, /* A 1 */ NULL, /* A#1 */ NULL, /* B 1 */ NULL, /* C 2 */ NULL, /* C#2 */ NULL, /* D 2 */ NULL, /* D#2 */ "highq", /* E 2 */ "slap", /* F 2 */ "scratch1", /* F#2 */ "scratch2", /* G 2 */ "sticks", /* G#2 */ "sqrclick", /* A 2 */ "metclick", /* A#2 */ "metbell", /* B 2 */ "kick1", /* C 3 */ "kick2", /* C#3 */ "stickrim", /* D 3 */ "snare1", /* D#3 */ "claps", /* E 3 */ "snare2", /* F 3 */ "tomlo2", /* F#3 */ "hihatcl", /* G 3 */ "tomlo1", /* G#3 */ "hihatpd", /* A 3 */ "tommid2", /* A#3 */ "hihatop", /* B 3 */ "tommid1", /* C 4 */ "tomhi2", /* C#4 */ "cymcrsh1", /* D 4 */ "tomhi1", /* D#4 */ "cymride1", /* E 4 */ "cymchina", /* F 4 */ "cymbell", /* F#4 */ "tamborin", /* G 4 */ "cymsplsh", /* G#4 */ "cowbell", /* A 4 */ "cymcrsh2", /* A#4 */ "vibslap", /* B 4 */ "cymride2", /* C 5 */ "bongohi", /* C#5 */ "bongolo", /* D 5 */ "congahi1", /* D#5 */ "congahi2", /* E 5 */ "congalo", /* F 5 */ "timbaleh", /* F#5 */ "timbalel", /* G 5 */ "agogohi", /* G#5 */ "agogolo", /* A 5 */ "cabasa", /* A#5 */ "maracas", /* B 5 */ "whistle1", /* C 6 */ "whistle2", /* C#6 */ "guiro1", /* D 6 */ "guiro2", /* D#6 */ "clave", /* E 6 */ "woodblk1", /* F 6 */ "woodblk2", /* F#6 */ "cuica1", /* G 6 */ "cuica2", /* G#6 */ "triangl1", /* A 6 */ "triangl2", /* A#6 */ "shaker", /* B 6 */ "jingles", /* C 7 */ "belltree", /* C#7 */ "castinet", /* D 7 */ "surdo1", /* D#7 */ "surdo2", /* E 7 */ NULL, /* F 7 */ NULL, /* F#7 */ NULL, /* G 7 */ NULL, /* G#7 */ NULL, /* A 7 */ NULL, /* A#7 */ NULL, /* B 7 */ NULL, /* C 8 */ NULL, /* C#8 */ NULL, /* D 8 */ NULL, /* D#8 */ NULL, /* E 8 */ NULL, /* F 8 */ NULL, /* F#8 */ NULL, /* G 8 */ NULL, /* G#8 */ NULL, /* A 8 */ NULL, /* A#8 */ NULL, /* B 8 */ NULL, /* C 9 */ NULL, /* C#9 */ NULL, /* D 9 */ NULL, /* D#9 */ NULL, /* E 9 */ NULL, /* F 9 */ NULL, /* F#9 */ NULL, /* G 9 */ NULL, /* G#9 */ NULL, /* A 9 */ NULL, /* A#9 */ NULL, /* B 9 */ NULL, /* C 10*/ NULL, /* C#10*/ NULL, /* D 10*/ NULL, /* D#10*/ NULL, /* E 10*/ NULL, /* F 10*/ NULL, /* F#10*/ NULL, /* G 10*/ NULL }; playmidi-2.4.orig/io_svgalib.c0100644000175000017500000001643606257346275014241 0ustar dsds/************************************************************************ io_svgalib.c -- shows midi events using svgalib Copyright (C) 1995-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #include #include #include #include /* following includes are for raw + nowait input mode */ #include #include #include char *drum3ch[11] = { "STD", "RM.", "PWR", "ELE", "808", "JAZ", "BRU", "ORC", "SFX", "PRG", "M32" }; #define SET(x) (x == 8 ? 1 : x >= 16 && x <= 23 ? 2 : x == 24 ? 3 : \ x == 25 ? 4 : x == 32 ? 5 : x >= 40 && x <= 47 ? 6 : \ x == 48 ? 7 : x == 56 ? 8 : x >= 96 && x <= 111 ? 9 : \ x == 127 ? 10 : 0) extern int graphics, verbose, perc, ntrks; extern int note_vel[16][128]; extern unsigned long int ticks; extern char *filename, *gmvoice[256]; extern float skew; extern void seq_reset(); extern struct chanstate channel[16]; extern struct timeval start_time; char textbuf[1024], **nn; int i, ytxt, mytty; void *font; struct termios newtty, oldtty; struct timeval now_time, want_time; int cdeltat(t1, t2) struct timeval *t1; struct timeval *t2; { int d1, d2; d1 = t1->tv_sec - t2->tv_sec; if ((d2 = t1->tv_usec - t2->tv_usec) < 0) (d2 += 1000000, d1 -= 1); d2 /= 10000; return (d2 + d1 * 100); } void close_show(error) int error; { vga_setmode(TEXT); tcsetattr(i, TCSANOW, &oldtty); exit(error); } #define CHN (cmd & 0xf) #define NOTE ((int)data[0]) #define VEL ((int)data[1]) int updatestatus() { char ch; int d1, d2; want_time.tv_sec = start_time.tv_sec + (ticks / 100); want_time.tv_usec = start_time.tv_usec + (ticks % 100) * 10000; if (want_time.tv_usec > 1000000) (want_time.tv_usec -= 1000000, want_time.tv_sec++); do { if (read(mytty, &ch, 1)) switch (ch) { case '.': case '>': if ((skew -= 0.01) < 0.25) skew = 0.25; sprintf(textbuf, "skew=%0.2f", skew); gl_write(512, 72, textbuf); break; case ',': case '<': if ((skew += 0.01) > 4) skew = 4.0; sprintf(textbuf, "skew=%0.2f", skew); gl_write(512, 72, textbuf); break; case 'p': case 'P': seq_reset(); return -1; break; case 'r': case '^': seq_reset(); return 0; break; case 3: case 27: case 'q': case 'Q': close_show(0); break; case 'n': case 'N': seq_reset(); return 1; default: break; } gettimeofday(&now_time, NULL); d1 = now_time.tv_sec - start_time.tv_sec; d2 = now_time.tv_usec - start_time.tv_usec; if (d2 < 0) (d2 += 1000000, d1 -= 1); sprintf(textbuf, "%02d:%02d.%d", d1 / 60, d1 % 60, d2 / 100000); gl_write(528, 0, textbuf); d1 = cdeltat(&want_time, &now_time); if (d1 > 15) usleep(100000); } while (d1 > 10); return NO_EXIT; } void draw_note(chn, note, vel) int chn, note, vel; { register int x, y, c, dy; x = 32 * chn; y = 400 - note * 3; c = vel / 4 + 32 * (chn % 8); dy = (channel[chn].bender - 8192); dy *= channel[chn].bender_range; dy /= 2048; gl_line(x, y, x + 12, y - dy, c); gl_line(x + 13, y - dy, x + 23, y, c); } void showevent(cmd, data, length) int cmd; unsigned char *data; int length; { if (cmd < 8 && cmd > 0) { int COLS = WIDTH / 8; if (ytxt == 10) /* clear text area */ gl_fillbox(512, 80, WIDTH - 1, HEIGHT - 1, 0); strncpy(textbuf, data, length < COLS - 66 ? length : COLS - 66); textbuf[length < COLS - 66 ? length : COLS - 66] = 0; gl_colorfont(8, 8, (cmd * 32) - 1, font); gl_write(512, ytxt * 8, textbuf); gl_colorfont(8, 8, 255, font); /* hope this isn't slow... */ if ((++ytxt) > (HEIGHT / 8) - 1) ytxt = 10; } else if (cmd & 0x80) switch (cmd & 0xf0) { case MIDI_KEY_PRESSURE: draw_note(CHN, NOTE, VEL); break; case MIDI_NOTEON: draw_note(CHN, NOTE, VEL); break; case MIDI_NOTEOFF: draw_note(CHN, NOTE, 0); break; case MIDI_CTL_CHANGE: /* future expansion */ break; case MIDI_CHN_PRESSURE: /* future expansion */ break; case MIDI_PITCH_BEND: /* erase all notes in channel to re-draw with new bend */ gl_fillbox(32 * CHN, 8, (32 * CHN) + 24, 400, 0); for (i = 0; i < 128; i++) if (note_vel[CHN][i]) draw_note(CHN, i, note_vel[CHN][i]); break; case MIDI_PGM_CHANGE: if (!ISPERC(CHN)) strncpy(textbuf, gmvoice[NOTE], 3); else strncpy(textbuf, drum3ch[SET(NOTE)], 3); textbuf[3] = 0; gl_write(CHN * 32, 0, textbuf); break; case 0xf0: case 0xf7: gl_fillbox(0, HEIGHT - 24, 511, HEIGHT - 1, 0); sprintf(textbuf, "Sysex(%2x)", cmd); gl_write(0, HEIGHT - 24, textbuf); for (i = 0; i < length && i < 26; i++) { sprintf(textbuf, "%02x", data[i]); gl_write(80 + i * 16, HEIGHT - 24, textbuf); } for (; i < length && i < 57; i++) { /* wrap to next line */ sprintf(textbuf, "%02x", data[i]); gl_write((i - 26) * 16, HEIGHT - 16, textbuf); } for (; i < length && i < 88; i++) { /* wrap to next line */ sprintf(textbuf, "%02x", data[i]); gl_write((i - 57) * 16, HEIGHT - 8, textbuf); } break; default: break; } } void init_show() { char *tmp; ytxt = 10; gl_clearscreen(0); gl_colorfont(8, 8, 244, font); /* hope this isn't slow... */ gl_write(0, 0, "ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch9 " "c10 c11 c12 c13 c14 c15 c16"); gl_write(512, 16, RELEASE); gl_write(560, 24, "by"); gl_write(512, 32, "Nathan Laredo"); tmp = strrchr(filename, '/'); strncpy(textbuf, (tmp == NULL ? filename : tmp + 1), 14); gl_write(512, 48, textbuf); sprintf(textbuf, "%d track%c", ntrks, ntrks > 1 ? 's' : ' '); gl_write(512, 56, textbuf); } void setup_show(argc, argv) int argc; char **argv; { int vgamode, i, j; graphics++; /* force -r option if not selected */ mytty = open("/dev/tty", O_RDONLY | O_NDELAY, 0); tcgetattr(mytty, &oldtty); tcgetattr(mytty, &newtty); newtty.c_lflag &= ~(ICANON | ECHO | ICRNL | ISIG); tcsetattr(mytty, TCSANOW, &newtty); vga_init(); if ((vgamode = vga_getdefaultmode()) == -1) vgamode = G640x480x256; if (!vga_hasmode(vgamode)) { fprintf(stderr, "\nRequested vga mode not available!\n"); close_show(-1); } gl_setwritemode(WRITEMODE_OVERWRITE); vga_setmode(vgamode); gl_setcontextvga(vgamode); for (i = 0; i < 32; i++) { j = i * 2; gl_setpalettecolor(i, j, 0, 0); gl_setpalettecolor(i + 32, 0, j, 0); gl_setpalettecolor(i + 64, j, j, 0); gl_setpalettecolor(i + 96, 0, 0, j); gl_setpalettecolor(i + 128, j, 0, j); gl_setpalettecolor(i + 160, 0, 0, j); gl_setpalettecolor(i + 192, 0, j, j); gl_setpalettecolor(i + 224, j, j, j); } font = malloc(256 * 8 * 8 * BYTESPERPIXEL); gl_expandfont(8, 8, 255, gl_font8x8, font); gl_setfont(8, 8, font); gl_enableclipping(); } playmidi-2.4.orig/XPlaymidi.ad0100644000175000017500000000077506257346275014164 0ustar dsds*foreground: #00627dea8 *background: #cccccc *meter01.background: #00f000 *meter02.background: #00e010 *meter03.background: #00d020 *meter04.background: #00c030 *meter05.background: #00b040 *meter06.background: #00a050 *meter07.background: #009060 *meter08.background: #008070 *meter09.background: #007080 *meter10.background: #006090 *meter11.background: #0050a0 *meter12.background: #0040b0 *meter13.background: #0030c0 *meter14.background: #0020d0 *meter15.background: #0010e0 *meter16.background: #0000f0 playmidi-2.4.orig/emumidi.c0100644000175000017500000002477406335435631013550 0ustar dsds/************************************************************************ emumidi.c -- emulation of midi device for FM/OPL3/GUS Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "emumidi.h" SEQ_USE_EXTBUF(); extern int seqfd, play_ext, play_gus, play_fm, play_awe; extern int gus_dev, sb_dev, ext_dev, awe_dev; extern struct synth_info card_info[MAX_CARDS]; extern int chanmask, perc, ticks, dochan, wantopl3, MT32; extern int patchloaded[256], fmloaded[256], useprog[16]; int note_vel[16][128]; struct voicestate voice[2][36]; struct chanstate channel[16]; #define C_GUS 0 #define C_FM 1 #define CN (ISGUS(chn) ? C_GUS : C_FM) #define CHANNEL (dochan ? chn : 0) void load_sysex(length, data, type) int length; unsigned char *data; int type; { unsigned long int i, j; /* * If the system exclusive is for roland, evaluate it. More than * roland could be evaluated here if i had documentation. Please * submit patches for any other hardware to laredo@gnu.ai.mit.edu * Complete emulation of all GS sysex messages in the works.... */ if (length > 7 && data[0] == 0x41 && data[2] == 0x42 && data[3] == 0x12) { /* GS DATA SET MESSAGES */ if (data[4] == 0x40 && (data[5] & 0xf0) == 0x10 && data[6] == 0x15) { /* USE RHYTHM PART */ if (!(i = (data[5] & 0xf))) i = 0x09; else if (i < 10) i--; i = 1< 127 || r - note < 0) return n_freq[note]; r = n_freq[note + r] - n_freq[note - r]; d = b * r; d /= 8192; return n_freq[note] + d; } extern int _seqbufptr; void seq_stop_note(dev, chn, note, vel) int dev, chn, note, vel; { int i, card = CN; note_vel[chn][note] = 0; if (ISMIDI(chn)) { SEQ_MIDIOUT(dev, MIDI_NOTEOFF + CHANNEL); SEQ_MIDIOUT(dev, note); SEQ_MIDIOUT(dev, vel); } else if (ISAWE(chn)) { SEQ_STOP_NOTE(dev, chn, note, vel); } else for (i = 0; i < card_info[dev].nr_voices; i++) if (voice[card][i].channel == chn && voice[card][i].note == note) { voice[card][i].dead = 1; voice[card][i].timestamp /= 2; if (!channel[chn].controller[CTL_SUSTAIN] && !ISPERC(chn)) SEQ_STOP_NOTE(dev, i, note, vel); } } void seq_key_pressure(dev, chn, note, vel) int dev, chn, note, vel; { int i, card = CN; if (ISMIDI(chn)) { SEQ_MIDIOUT(dev, MIDI_KEY_PRESSURE + CHANNEL); SEQ_MIDIOUT(dev, note); SEQ_MIDIOUT(dev, vel); } else if (ISAWE(chn)) { AWE_KEY_PRESSURE(dev, chn, note, vel); } else for (i = 0; i < card_info[dev].nr_voices; i++) if (voice[card][i].channel == chn && voice[card][i].note == note) SEQ_KEY_PRESSURE(dev, i, note, vel); } int new_voice(dev, chn) int dev, chn; { int i, oldest, last, card = CN; if (ISFM(chn) && fmloaded[channel[chn].program] == OPL3_PATCH) last = 6; /* 4-op voice can only use first six voices */ else last = card_info[dev].nr_voices; for (i = oldest = 0; i < last; i++) if (voice[card][i].timestamp < voice[card][oldest].timestamp) oldest = i; return oldest; } void seq_start_note(dev, chn, note, vel) int dev, chn, note, vel; { int v, c, card = CN; note_vel[chn][note] = vel; if (ISMIDI(chn)) { SEQ_MIDIOUT(dev, MIDI_NOTEON + CHANNEL); SEQ_MIDIOUT(dev, note); SEQ_MIDIOUT(dev, vel); } else if (vel == 0) seq_stop_note(dev, chn, note, 64); else if (ISAWE(chn)) { SEQ_START_NOTE(dev, chn, note, vel); } else { v = new_voice(dev, chn); SEQ_SET_PATCH(dev, v, channel[chn].program); SEQ_BENDER_RANGE(dev, v, (channel[chn].bender_range * 100)); SEQ_BENDER(dev, v, channel[chn].bender); SEQ_CONTROL(dev, v, CTL_PAN, channel[chn].controller[CTL_PAN]); SEQ_START_NOTE(dev, v, note, vel); voice[card][v].note = note; voice[card][v].channel = chn; voice[card][v].timestamp = ticks; voice[card][v].dead = 0; if ((c = channel[chn].controller[CTL_CHORUS_DEPTH] * 8)) { if (channel[chn].bender_range) c /= channel[chn].bender_range; v = new_voice(dev, chn); SEQ_SET_PATCH(dev, v, channel[chn].program); SEQ_BENDER_RANGE(dev, v, (channel[chn].bender_range * 100)); if (channel[chn].bender + c < 0x4000) { SEQ_BENDER(dev, v, channel[chn].bender + c); } else { SEQ_BENDER(dev, v, channel[chn].bender - c); } /* put chorus note on the "extreme" side */ c = channel[chn].controller[CTL_PAN]; if (c < 64) c = 0; else if (c > 64) c = 127; SEQ_CONTROL(dev, v, CTL_PAN, c); SEQ_START_NOTE(dev, v, note, vel); voice[card][v].note = note; voice[card][v].channel = chn; /* allow chorus note to be stolen very quickly */ voice[card][v].timestamp = ticks / 2; voice[card][v].dead = 0; } } } static int rpn1[16] = {127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127}; static int rpn2[16] = {127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127}; void seq_control(dev, chn, p1, p2) int dev, chn, p1, p2; { int i, card = CN; channel[chn].controller[p1] = p2; if (ISMIDI(chn)) { SEQ_MIDIOUT(dev, MIDI_CTL_CHANGE + CHANNEL); SEQ_MIDIOUT(dev, p1); SEQ_MIDIOUT(dev, p2); } if (p1 == 7 || p1 == 39) return; switch (p1) { case CTL_SUSTAIN: if (ISAWE(chn)) { SEQ_CONTROL(dev, chn, p1, p2); } else if (!ISMIDI(chn)) if (p1 == CTL_SUSTAIN && !p2) { for (i = 0; i < card_info[card].nr_voices; i++) if (voice[card][i].channel == chn && voice[card][i].dead) { SEQ_STOP_NOTE(dev, i, voice[card][i].note, 64); voice[card][i].dead = 0; } } break; case CTL_REGIST_PARM_NUM_MSB: rpn1[chn] = p2; break; case CTL_REGIST_PARM_NUM_LSB: rpn2[chn] = p2; break; case CTL_DATA_ENTRY: if (rpn1[chn] == 0 && rpn2[chn] == 0) { channel[chn].oldrange = channel[chn].bender_range; channel[chn].bender_range = p2; rpn1[chn] = rpn2[chn] = 127; if (ISAWE(chn)) { SEQ_BENDER_RANGE(dev, chn, p2 * 100); } else if (!ISMIDI(chn)) for (i = 0; i < card_info[card].nr_voices; i++) SEQ_BENDER_RANGE(dev, i, p2 * 100); } break; default: /* sent on the off chance the sound driver is enhanced */ if (ISAWE(chn)) { SEQ_CONTROL(dev, chn, p1, p2); } else if (!ISMIDI(chn) && (p1 < 0x10 || (p1 & 0xf0) == 0x50)) for (i = 0; i < card_info[card].nr_voices; i++) if (voice[card][i].channel == chn) SEQ_CONTROL(dev, i, p1, p2); break; } } void seq_chn_pressure(dev, chn, vel) int dev, chn, vel; { int card = CN, i; channel[chn].pressure = vel; if (ISMIDI(chn)) { SEQ_MIDIOUT(dev, MIDI_CHN_PRESSURE + CHANNEL); SEQ_MIDIOUT(dev, vel); } else if (ISAWE(chn)) { AWE_CHN_PRESSURE(dev, chn, vel); } else for (i = 0; i < card_info[dev].nr_voices; i++) if (voice[card][i].channel == chn) SEQ_KEY_PRESSURE(dev, i, voice[card][i].note, vel); } void seq_bender(dev, chn, p1, p2) int dev, chn, p1, p2; { int card = CN, i, val; val = (p2 << 7) + p1; channel[chn].oldbend = channel[chn].bender; channel[chn].bender = val; if (ISMIDI(chn)) { SEQ_MIDIOUT(dev, MIDI_PITCH_BEND + CHANNEL); SEQ_MIDIOUT(dev, p1); SEQ_MIDIOUT(dev, p2); } else if (ISAWE(chn)) { SEQ_BENDER(dev, chn, val); } else for (i = 0; i < card_info[dev].nr_voices; i++) if (voice[card][i].channel == chn) SEQ_BENDER(dev, i, val); } void seq_reset() { int i, j; _seqbufptr = ticks = 0; ioctl(seqfd, SNDCTL_SEQ_RESET); for (i = 0; i < 16; i++) { if (ISMIDI(i)) { seq_control(ext_dev,i,0,0); seq_control(ext_dev,i,32,0); } seq_set_patch(i, 0); for (j = 0; j < 128; j++) note_vel[i][j] = 0; channel[i].bender = channel[i].oldbend = 8192; channel[i].bender_range = channel[i].oldrange = 2; channel[i].controller[CTL_PAN] = 64; channel[i].controller[CTL_SUSTAIN] = 0; } if (play_gus) for (i = 0; i < card_info[gus_dev].nr_voices; i++) { SEQ_CONTROL(gus_dev, i, SEQ_VOLMODE, VOL_METHOD_LINEAR); if (voice[0][i].note) SEQ_STOP_NOTE(gus_dev, i, voice[0][i].note, 64); voice[0][i].dead = voice[0][i].timestamp = -1; } if (play_fm) { if (wantopl3) ioctl(seqfd, SNDCTL_FM_4OP_ENABLE, &sb_dev); for (i = 0; i < card_info[sb_dev].nr_voices; i++) { SEQ_CONTROL(sb_dev, i, SEQ_VOLMODE, VOL_METHOD_LINEAR); if (voice[1][i].note) SEQ_STOP_NOTE(sb_dev, i, voice[1][i].note, 64); voice[1][i].dead = voice[1][i].timestamp = -1; } } if (play_awe) { AWE_SET_CHANNEL_MODE(awe_dev, 1); AWE_DRUM_CHANNELS(awe_dev, perc); AWE_TERMINATE_ALL(awe_dev); for (i = 0; i < card_info[awe_dev].nr_voices; i++) { voice[0][i].dead = voice[0][i].timestamp = -1; } } SEQ_DUMPBUF(); } playmidi-2.4.orig/std.o30100644000175000017500000001700006257346275013000 0ustar dsds4OPAcoustic Grand L J@#ý„|õ]òô5õ4OPBright Acoustic ` J@}óóõõUòòõõ4OPElectric Grand Piano4.J@MûóUÅÎóóUÕ4OPHonky-tonk <0J@×óòõõÕóóõõ4OPRhodes Piano P0J@WÿóŠf +åⵆ4OPChorused Piano @,J@ _ôô‡†Ìòↆ4OPHarpsichord` J@"шãóy§"–òóy§4OPClavinet ` J@"œôó¦"—ôóæ4OPCelesta IâT2OPAcoustic BassP0J@!!äÓ¦??‚ògm4OPFinger Bass L0J@! òòI— öóç4OPPick Bass L4J@!òòI—öóç4OPFretless Bass T,J@ÈòÄj—‘òçm4OPSlap Bass 1 @@J@ ýúI‡óó·2OPSlap Bass 2??2OPAcoustic Bass <8JØ‚–f??2OPElectric Bass 14PJ òö—æ??2OPElectric Bass 2²1`uÒÕSBISplash Cymbal @@@O* sb±’SBICow Bell 4H@<÷Áÿó%SBICrash Cymbal 2 @@@<1qb±“SBIVibraslap @@@:àá è¥T•SBIRide Cymbal 2 @@@@<1 sıôSBIHigh Bongo @@@2 úöl†SBILow Bongo @@@- úöl…SBIMute High Conga 4@@, ©ÖEESBIOpen High Conga 4L@0 ©ÖDFSBILow Conga 4@@) ©ÖDESBIHigh Timbale @@@‘`rÒÕSBILow Timbale @@@‘`rÐÖSBIHigh Agogo 0H@3 úöl‡SBILow Agogo 4@@. úöl‡SBICabasa 4H@7²1`u¢ÖSBIMaracas 0H@UD„Ýõ„vSBIShort Whistle @@@G320_SBILong Whistle @@@ G$"doVSBIShort Guiro @@@4'"¥iÅSBILong Guiro @@@ 4'"¥iåSBIClaves 0L@E4GØõðvSBIHigh Wood Block 0H@?3HùõöuSBILow Wood Block 0H@:3GùõõuSBIMute Cuica @@@<ÀñüðSBIOpen Cuica 4L@< ËñüðSBIMute Triangle 4H@< ÀñüðSBIOpen Triangle 0H@< Ïñüð@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@playmidi-2.4.orig/pathname.sed0100644000175000017500000000007206257346275014236 0ustar dsds# escape '.' and '/' in pathnames s/\//\\\//g s/\./\\\./g playmidi-2.4.orig/patchload.c0100644000175000017500000002302606467105133014040 0ustar dsds/************************************************************************ patchload.c -- loads patches for playmidi package Some of this code was adapted from code written by Hannu Solovainen Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #ifdef linux #include #else #include #endif #include #include #include #include "gmvoices.h" SEQ_USE_EXTBUF(); extern int play_gus, play_sb, play_ext, playing, verbose, force8bit; extern int reverb, fmloaded[256], patchloaded[256]; extern int gus_dev, sb_dev, ext_dev, seqfd, wantopl3; extern struct synth_info card_info[MAX_CARDS]; extern void close_show(int); static int use8bit = 0; struct pat_header { char magic[12]; char version[10]; char description[60]; unsigned char instruments; char voices; char channels; unsigned short nr_waveforms; unsigned short master_volume; unsigned int data_size; }; struct sample_header { char name[7]; unsigned char fractions; int len; int loop_start; int loop_end; unsigned short base_freq; int low_note; int high_note; int base_note; short detune; unsigned char panning; unsigned char envelope_rate[6]; unsigned char envelope_offset[6]; unsigned char tremolo_sweep; unsigned char tremolo_rate; unsigned char tremolo_depth; unsigned char vibrato_sweep; unsigned char vibrato_rate; unsigned char vibrato_depth; char modes; short scale_frequency; unsigned short scale_factor; }; struct patch_info *patch; int spaceleft, totalspace; void gus_reload_8_bit(); void gus_load(pgm) int pgm; { int i, j, patfd, offset; struct pat_header header; struct sample_header sample; char buf[256], name[256]; struct stat info; if (pgm < 0) { use8bit = force8bit; GUS_NUMVOICES(gus_dev, (card_info[gus_dev].nr_voices = 32)); SEQ_DUMPBUF(); for (i = 0; i < 256; i++) patchloaded[i] = 0; if (ioctl(seqfd, SNDCTL_SEQ_RESETSAMPLES, &gus_dev) == -1) close_show(-1); spaceleft = gus_dev; ioctl(seqfd, SNDCTL_SYNTH_MEMAVL, &spaceleft); totalspace = spaceleft; } if (patchloaded[pgm] < 0) return; if (patchloaded[pgm] == 1) return; if (gmvoice[pgm] == NULL) { patchloaded[pgm] = -1; return; } sprintf(name, PATCH_PATH1 "/%s.pat", gmvoice[pgm]); if (stat(name, &info) == -1) { sprintf(name, PATCH_PATH2 "/%s.pat", gmvoice[pgm]); if (stat(name, &info) == -1) return; } if ((patfd = open(name, O_RDONLY, 0)) == -1) return; if (spaceleft < info.st_size) { if (!use8bit) gus_reload_8_bit(); if (use8bit) if (spaceleft < info.st_size / 2) { close(patfd); patchloaded[pgm] = -1; /* no space for patch */ return; } } if (read(patfd, buf, 0xef) != 0xef) { close(patfd); return; } memcpy((char *) &header, buf, sizeof(header)); if (strncmp(header.magic, "GF1PATCH110", 12)) { close(patfd); return; } if (strncmp(header.version, "ID#000002", 10)) { close(patfd); return; } header.nr_waveforms = *(unsigned short *) &buf[85]; header.master_volume = *(unsigned short *) &buf[87]; offset = 0xef; for (i = 0; i < header.nr_waveforms; i++) { if (lseek(patfd, offset, 0) == -1) { close(patfd); return; } if (read(patfd, &buf, sizeof(sample)) != sizeof(sample)) { close(patfd); return; } memcpy((char *) &sample, buf, sizeof(sample)); /* * Since some fields of the patch record are not 32bit aligned, we must * handle them specially. */ sample.low_note = *(int *) &buf[22]; sample.high_note = *(int *) &buf[26]; sample.base_note = *(int *) &buf[30]; sample.detune = *(short *) &buf[34]; sample.panning = (unsigned char) buf[36]; memcpy(sample.envelope_rate, &buf[37], 6); memcpy(sample.envelope_offset, &buf[43], 6); sample.tremolo_sweep = (unsigned char) buf[49]; sample.tremolo_rate = (unsigned char) buf[50]; sample.tremolo_depth = (unsigned char) buf[51]; sample.vibrato_sweep = (unsigned char) buf[52]; sample.vibrato_rate = (unsigned char) buf[53]; sample.vibrato_depth = (unsigned char) buf[54]; sample.modes = (unsigned char) buf[55]; sample.scale_frequency = *(short *) &buf[56]; sample.scale_factor = *(unsigned short *) &buf[58]; offset = offset + 96; patch = (struct patch_info *) malloc(sizeof(*patch) + sample.len); if (patch == NULL) { close(patfd); return; } patch->key = GUS_PATCH; patch->device_no = gus_dev; patch->instr_no = pgm; patch->mode = sample.modes | WAVE_TREMOLO | WAVE_VIBRATO | WAVE_SCALE; patch->len = (use8bit ? sample.len / 2 : sample.len); patch->loop_start = (use8bit ? sample.loop_start / 2 : sample.loop_start); patch->loop_end = (use8bit ? sample.loop_end / 2 : sample.loop_end); patch->base_note = sample.base_note; patch->high_note = sample.high_note; patch->low_note = sample.low_note; patch->base_freq = sample.base_freq; patch->detuning = sample.detune; patch->panning = (sample.panning - 7) * 16; memcpy(patch->env_rate, sample.envelope_rate, 6); for (j = 0; j < 6; j++) /* tone things down slightly */ patch->env_offset[j] = (736 * sample.envelope_offset[j] + 384) / 768; if (reverb) if (pgm < 120) patch->env_rate[3] = (2 << 6) | (12 - (reverb >> 4)); else if (pgm > 127) patch->env_rate[1] = (3 << 6) | (63 - (reverb >> 1)); patch->tremolo_sweep = sample.tremolo_sweep; patch->tremolo_rate = sample.tremolo_rate; patch->tremolo_depth = sample.tremolo_depth; patch->vibrato_sweep = sample.vibrato_sweep; patch->vibrato_rate = sample.vibrato_rate; patch->vibrato_depth = sample.vibrato_depth; patch->scale_frequency = sample.scale_frequency; patch->scale_factor = sample.scale_factor; patch->volume = header.master_volume; if (lseek(patfd, offset, 0) == -1) { close(patfd); return; } if (read(patfd, patch->data, sample.len) != sample.len) { close(patfd); return; } if (patch->mode & WAVE_16_BITS && use8bit) { patch->mode &= ~WAVE_16_BITS; /* cut out every other byte to make 8-bit data from 16-bit */ for (j = 0; j < patch->len; j++) patch->data[j] = patch->data[1 + j * 2]; } SEQ_WRPATCH(patch, sizeof(*patch) + patch->len); free(patch); offset = offset + sample.len; } close(patfd); spaceleft = gus_dev; ioctl(seqfd, SNDCTL_SYNTH_MEMAVL, &spaceleft); patchloaded[pgm] = 1; return; } void gus_reload_8_bit() { int i; if (ioctl(seqfd, SNDCTL_SEQ_RESETSAMPLES, &gus_dev) == -1) { close_show(-1); } spaceleft = gus_dev; ioctl(seqfd, SNDCTL_SYNTH_MEMAVL, &spaceleft); totalspace = spaceleft; use8bit = 1; for (i = 0; i < 256; i++) if (patchloaded[i] > 0) { patchloaded[i] = 0; gus_load(i); } } void adjustfm(buf, key) char *buf; int key; { unsigned char pan = ((rand() % 3) + 1) << 4; if (key == FM_PATCH) { buf[39] &= 0xc0; if (buf[46] & 1) buf[38] &= 0xc0; buf[46] = (buf[46] & 0xcf) | pan; if (reverb) { unsigned val; val = buf[43] & 0x0f; if (val > 0) val--; buf[43] = (buf[43] & 0xf0) | val; } } else { int mode; if (buf[46] & 1) mode = 2; else mode = 0; if (buf[57] & 1) mode++; buf[50] &= 0xc0; if (mode == 3) buf[49] &= 0xc0; if (mode == 1) buf[39] &= 0xc0; if (mode == 2 || mode == 3) buf[38] &= 0xc0; buf[46] = (buf[46] & 0xcf) | pan; buf[57] = (buf[57] & 0xcf) | pan; if (mode == 1 && reverb) { unsigned val; val = buf[43] & 0x0f; if (val > 0) val--; buf[43] = (buf[43] & 0xf0) | val; val = buf[54] & 0x0f; if (val > 0) val--; buf[54] = (buf[54] & 0xf0) | val; } } } void loadfm() { int sbfd, i, n, voice_size, data_size; char buf[60]; struct sbi_instrument instr; for (i = 0; i < 256; i++) fmloaded[i] = 0; srand(getpid()); if (wantopl3) { voice_size = 60; sbfd = open(O3MELODIC, O_RDONLY, 0); } else { voice_size = 52; sbfd = open(SBMELODIC, O_RDONLY, 0); } if (sbfd == -1) close_show(-1); instr.device = sb_dev; for (i = 0; i < 128; i++) { if (read(sbfd, buf, voice_size) != voice_size) close_show(-1); instr.channel = i; if (strncmp(buf, "4OP", 3) == 0) { instr.key = OPL3_PATCH; data_size = 22; } else { instr.key = FM_PATCH; data_size = 11; } fmloaded[i] = instr.key; adjustfm(buf, instr.key); for (n = 0; n < 32; n++) instr.operators[n] = (n < data_size) ? buf[36 + n] : 0; SEQ_WRPATCH(&instr, sizeof(instr)); } close(sbfd); if (wantopl3) sbfd = open(O3DRUMS, O_RDONLY, 0); else sbfd = open(SBDRUMS, O_RDONLY, 0); for (i = 128; i < 175; i++) { if (read(sbfd, buf, voice_size) != voice_size) close_show(-1); instr.channel = i; if (strncmp(buf, "4OP", 3) == 0) { instr.key = OPL3_PATCH; data_size = 22; } else { instr.key = FM_PATCH; data_size = 11; } fmloaded[i] = instr.key; adjustfm(buf, instr.key); for (n = 0; n < 32; n++) instr.operators[n] = (n < data_size) ? buf[n + 36] : 0; SEQ_WRPATCH(&instr, sizeof(instr)); } close(sbfd); } playmidi-2.4.orig/techref/0040755000175000017500000000000006257346275013370 5ustar dsdsplaymidi-2.4.orig/techref/MIDI-FORMAT0100644000175000017500000000760206257346277015027 0ustar dsdsMIDI File Format ================ By Nathan Laredo, last revision: 25 August 1996 NOTE: THIS IS NOT THE OFFICIAL MIDI FILE FORMAT SPECIFICATION. THESE ARE PERSONAL NOTES I WROTE WHEN I FIRST STARTED TO WRITE MY OWN MIDI FILE READING ROUTINES. THIS INFORMATION IS PROVIDED IN THE HOPE THAT IT MAY SAVE SOMEONE ELSE THE AMOUNT OF RESEARCH THAT WENT INTO IT. I MAKE NO GUARANTEES OR WARRANTIES PERTAINING TO USEFULNESS OR ACCURACY. ----------------------------------------------------------------------- (MThd = 0x4d546864) (32-bit big endian length = 6) (16-bit big endian format) (16-bit big endian tracks) (16-bit big-endian division) format is either 0 - one track, 1 - many tracks, one sequence or 2 - many tracks with one sequence per track. format 1 files should have all tempo changes in the first track (MTrk = 0x4d54726b) (32-bit big endian length of track) (variable-length encoded ticks since previous event) (Event data -- see below) ticks and event data are repeated for length bytes. MTrk block is repeated for as many tracks as indicated in header. ------------------------------------------------------------------------ Variable length quantities are a series of 7 bit values encoded from msb to lsb, with the lsb bit 7 clear, all prior have bit 7 set. ------------------------------------------------------------------------ Event data is either midi data (with running status) that is to be sent to the midi device, a sysex (two types), or a meta-event ------------------------------------------------------------------------- A sysex event contains information to be sent directly to the midi synth. It consists of (0xf0) (variable-length encoded length) (data after 0xf0) or (0xf7) (variable-length encoded length) (all data to be sent) Sysex messages may or may not be terminated with 0xf7 (EOX), EOX should not be added automagically when messages are output to a midi synth, as there may be a following 0xf7-type sysex after a delay that may be required by the synth. The 0xf7-type sysex may contain data > 0x7f so programs shouldn't stop sending when a byte value is > 0x7f. ------------------------------------------------------------------------- A meta event contaions information such as text, tempo, and key signature. It consists of (0xff) (type) (variable length encoded deta length) (data) Text is not usually null-terminated. You must depend on the length when reading it. meta event types range from 0x00 to 0x7f Type Contents ==== ======== 0x00: (16-bit big endian sequence number) 0x01: (any text) 0x02: (Copyright Message text) 0x03: (Sequence/Track Name text) 0x04: (Instrument Name text) 0x05: (Lyric text) 0x06: (Marker text) 0x07: (Cue-point text) 0x2f: End of Track -- no data for this type 0x51: (24-bit big endian tempo) -- microseconds per midi quarter note 0x54: (hour) (min) (second) (frame) (fractional-frame) - SMPTE track start 0x58: (numerator) (denominator) (clocks per metronome click) (32nd notes notated per midi quarter note) -- Time Signature denominator is a power of two, ie 0x03 = 2^3 = 8 0x59: (sharps/flats) (major/minor flag) -- Key Signature if sharp key, first byte represents number of sharps if flat key, first byte represents negative number of flats the major/minor flag is 0 if minor, 1 if major. 0x7f: (Sequencer Specific data) -- I've never used this type, I ignore it. I have never seen it used, and If someone would let me know why it exists, I would appreciate it. ----------------------------------------------------------------------------- Many thanks to the authors of the many free midi references available on ftp.ucsd.edu that I used in creating this file format specification which I use for my Playmidi package for Linux. If you find any errors in this document, please email me. Nathan Laredo -- laredo@gnu.ai.mit.edu -- (C)1995, 1996 Nathan Laredo This document may be freely distributed in its original form. playmidi-2.4.orig/techref/MIDI-MT320100644000175000017500000000422606257346277014523 0ustar dsdsRoland MT-32, LAPC-1 or CM-32L 0 Acou Piano 1 1 Acou Piano 2 2 Acou Piano 3 3 Elec Piano 1 4 Elec Piano 2 5 Elec Piano 3 6 Elec Piano 4 7 Honkytonk 8 Elec Org 1 9 Elec Org 2 10 Elec Org 3 11 Elec Org 4 12 Pipe Org 1 13 Pipe Org 2 14 Pipe Org 3 15 Accordion 16 Harpsi 1 17 Harpsi 2 18 Harpsi 3 19 Clavi 1 20 Clavi 2 21 Clavi 3 22 Celesta 1 23 Celesta 2 24 Syn Brass 1 25 Syn Brass 2 26 Syn Brass 3 27 Syn Brass 4 28 Syn Bass 1 29 Syn Bass 2 30 Syn Bass 3 31 Syn Bass 4 32 Fantasy 33 Harmo Pan 34 Chorale 35 Glasses 36 Soundtrack 37 Atmosphere 38 Warm Bell 39 Funny Vox 40 Echo Bell 41 Ice Rain 42 Oboe 2001 43 Echo Pan 44 Doctor Solo 45 School Daze 46 Bellsinger 47 Square Wave 48 Str Sect 1 49 Str Sect 2 50 Str Sect 3 51 Pizzicato 52 Violin 1 53 Violin 2 54 Cello 1 55 Cello 2 56 Contrabass 57 Harp 1 58 Harp 2 59 Guitar 1 60 Guitar 2 61 Elec Gtr 1 62 Elec Gtr 2 63 Sitar 64 Acou Bass 1 65 Acou Bass 2 66 Elec Bass 1 67 Elec Bass 2 68 Slap Bass 1 69 Slap Bass 2 70 Fretless 1 71 Fretless 2 72 Flute 1 73 Flute 2 74 Piccolo 1 75 Piccolo 2 76 Recorder 77 Pan Pipes 78 Sax 1 79 Sax 2 80 Sax 3 81 Sax 4 82 Clarinet 1 83 Clarinet 2 84 Oboe 85 Engl Horn 86 Bassoon 87 Harmonica 88 Trumpet 1 89 Trumpet 2 90 Trombone 1 91 Trombone 2 92 Fr Horn 1 93 Fr Horn 2 94 Tuba 95 Brs Sect 1 96 Brs Sect 2 97 Vibe 1 98 Vibe 2 99 Syn Mallet 100 Windbell 101 Glock 102 Tube Bell 103 Xylophone 104 Marimba 105 Koto 106 Sho 107 Shakuhachi 108 Whistle 1 109 Whistle 2 110 Bottleblow 111 Breathpipe 112 Timpani 113 Melodic Tom 114 Deep Snare 115 Elec Perc 1 116 Elec Perc 2 117 Taiko 118 Taiko Rim 119 Cymbal 120 Castanets 121 Triangle 122 Orche Hit 123 Telephone 124 Bird Tweet 125 One Note Jam 126 Water Bell 127 Jungle Tune playmidi-2.4.orig/techref/MIDI-GM0100644000175000017500000000503706257346277014342 0ustar dsdsGeneral MIDI 0 Acoustic Grand Piano 1 Bright Acoustic Piano 2 Electric Grand Piano 3 Honky-Tonk Piano 4 Rhodes Piano 5 Chorused Piano 6 Harpsichord 7 Clavinet 8 Celesta 9 Glockenspiel 10 Music Box 11 Vibraphone 12 Marimba 13 Xylophone 14 Tubular Bells 15 Dulcimer 16 Hammond Organ 17 Percussive Organ 18 Rock Organ 19 Church Organ 20 Reed Organ 21 Accordion 22 Harmonica 23 Tango Accordion 24 Acoustic Guitar (nylon) 25 Acoustic Guitar (steel) 26 Electric Guitar (jazz) 27 Electric Guitar (clean) 28 Electric Guitar (muted) 29 Overdriven Guitar 30 Distortion Guitar 31 Guitar Harmonics 32 Acoustic Bass 33 Electric Bass (finger) 34 Electric Bass (pick) 35 Fretless Bass 36 Slap Bass 1 37 Slap Bass 2 38 Synth Bass 1 39 Synth Bass 2 40 Violin 41 Viola 42 Cello 43 Contrabass 44 Tremolo Strings 45 Pizzicato Strings 46 Orchestral Harp 47 Timpani 48 String Ensemble 1 49 String Ensemble 2 50 SynthStrings 1 51 SynthStrings 2 52 Choir Aahs 53 Voice Oohs 54 Synth Voice 55 Orchestra Hit 56 Trumpet 57 Trombone 58 Tuba 59 Muted Trumpet 60 French Horn 61 Brass Section 62 Synth Brass 1 63 Synth Brass 2 64 Soprano Sax 65 Alto Sax 66 Tenor Sax 67 Baritone Sax 68 Oboe 69 English Horn 70 Bassoon 71 Clarinet 72 Piccolo 73 Flute 74 Recorder 75 Pan Flute 76 Blown Bottle 77 Skakuhachi 78 Whistle 79 Ocarina 80 Lead 1 (square) 81 Lead 2 (sawtooth) 82 Lead 3 (calliope lead) 83 Lead 4 (chiff lead) 84 Lead 5 (charang) 85 Lead 6 (voice) 86 Lead 7 (fifths) 87 Lead 8 (brass + lead) 88 Pad 1 (new age) 89 Pad 2 (warm) 90 Pad 3 (polysynth) 91 Pad 4 (choir) 92 Pad 5 (bowed) 93 Pad 6 (metallic) 94 Pad 7 (halo) 95 Pad 8 (sweep) 96 FX 1 (rain) 97 FX 2 (soundtrack) 98 FX 3 (crystal) 99 FX 4 (atmosphere) 100 FX 5 (brightness) 101 FX 6 (goblins) 102 FX 7 (echoes) 103 FX 8 (sci-fi) 104 Sitar 105 Banjo 106 Shamisen 107 Koto 108 Kalimba 109 Bagpipe 110 Fiddle 111 Shanai 112 Tinkle Bell 113 Agogo 114 Steel Drums 115 Woodblock 116 Taiko Drum 117 Melodic Tom 118 Synth Drum 119 Reverse Cymbal 120 Guitar Fret Noise 121 Breath Noise 122 Seashore 123 Bird Tweet 124 Telephone Ring 125 Helicopter 126 Applause 127 Gunshot playmidi-2.4.orig/Makefile0100644000175000017500000001072406604565526013407 0ustar dsds########################################################################### # playmidi Makefile 12 September 1996 # # by Nathan I Laredo, laredo@gnu.ai.mit.edu # # I don't wish to assert any rights (copyright) for this Makefile. # This Makefile is specially designed for using "make install" # thousands of times (for developing), and will only install updated # files. It does not write over exiting fm patch libs if you have them. # ########################################################################### # ncurses usually /usr/lib, -L/usr/local/lib doesn't hurt # unless there's more than one ncurses floating around on your system LIBNC = -L/usr/local/lib -lncurses ######### NOTE: X11R6 or newer REQUIRED LIBX11 = -L/usr/X11R6/lib -lXaw -lXmu -lXt -lX11 -lXext -lSM -lICE LIBGTK = -L/usr/X11R6/lib -lgtk-1.1 -lgdk-1.1 -lglib-1.1 -lX11 -lXext -lm LIBVGA = -L/usr/local/lib -lvgagl -lvga # ncurses is usually in /usr/include/ncurses, but you may need # to use /usr/local/include/ncurses depending on your setup. INCNC = -I/usr/include/ncurses # just in case you keep your X includes in an odd location. INCX11 = -I/usr/X11R6/include -DNARROWPROTO # stuff for sound blaster awe32 INCAWE = -DVOXWARE_CONTROLLER_7_WORKING # awe_voice.h path INCAWE += -I/usr/lib/oss/include/sys # usually in /usr/include, but -I/usr/local/include doesn't hurt # unless there's more than one svgalib floating around your system. INCVGA = -I/usr/local/include # Directory where application defaults files are stored for X11 version XAPPDEFAULTS = /usr/X11R6/lib/X11/app-defaults INCLUDES= $(INCNC) $(INCX11) $(INCVGA) $(INCAWE) INSTALLDIR = /usr/bin INSTALL = install -s # if you are using the GUS Ultra driver module, add -DULTRA_DRIVER CFLAGS = -Wall -pipe -fomit-frame-pointer -O2 -m486 $(INCAWE) LDFLAGS = OBJECTS = playmidi.o readmidi.o playevents.o \ patchload.o emumidi.o io_ncurses.o XOBJECTS= playmidi.o readmidi.o playevents.o \ patchload.o emumidi.o io_xaw.o SOBJECTS= playmidi.o readmidi.o playevents.o \ patchload.o emumidi.o io_svgalib.o GOBJECTS= playmidi.o readmidi.o playevents.o \ patchload.o emumidi.o io_gtk.o all: playmidi xplaymidi config: playmidi.h: playmidi.h-dist ./Configure io_ncurses.o: io_ncurses.c $(CC) $(CFLAGS) $(INCNC) -c io_ncurses.c -o io_ncurses.o io_xaw.o: io_xaw.c $(CC) $(CFLAGS) $(INCX11) -c io_xaw.c -o io_xaw.o io_svgalib.o: io_svgalib.c $(CC) $(CFLAGS) $(INCVGA) -c io_svgalib.c -o io_svgalib.o playmidi: .depend $(OBJECTS) $(CC) $(LDFLAGS) -o playmidi $(OBJECTS) $(LIBNC) xplaymidi: .depend $(XOBJECTS) $(CC) $(LDFLAGS) -o xplaymidi $(XOBJECTS) $(LIBX11) gtkplaymidi: .depend $(GOBJECTS) $(CC) $(LDFLAGS) -o gtkplaymidi $(GOBJECTS) $(LIBGTK) splaymidi: .depend $(SOBJECTS) $(CC) $(LDFLAGS) -o splaymidi $(SOBJECTS) $(LIBVGA) $(INSTALLDIR)/playmidi: playmidi $(INSTALL) playmidi $(INSTALLDIR) $(INSTALLDIR)/xplaymidi: xplaymidi $(INSTALL) xplaymidi $(INSTALLDIR) $(INSTALLDIR)/gtkplaymidi: gtkplaymidi $(INSTALL) gtkplaymidi $(INSTALLDIR) $(INSTALLDIR)/splaymidi: splaymidi $(INSTALL) splaymidi $(INSTALLDIR) /etc/std.o3: cp -i std.o3 /etc /etc/drums.o3: cp -i drums.o3 /etc /etc/std.sb: cp -i std.sb /etc /etc/drums.sb: cp -i drums.sb /etc $(XAPPDEFAULTS)/XPlaymidi: cp -i XPlaymidi.ad $(XAPPDEFAULTS)/XPlaymidi install: $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \ $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \ /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi install.novga: $(INSTALLDIR)/playmidi \ $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \ /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi install.noX11: $(INSTALLDIR)/playmidi $(INSTALLDIR)/splaymidi \ /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb install.Xonly: $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \ /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi install.lame: $(INSTALLDIR)/playmidi \ /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb install.man: cp playmidi.1 /usr/man/man1/ clean: rm -f *.o playmidi splaymidi xplaymidi a.out toy seq2mid beat distclean: clean rm -f .depend *~ *.bak playmidi.h config.sed ifeq (.depend, $(wildcard .depend)) .depend depend dep: playmidi.h for i in *.c; do $(CPP) -M $(CFLAGS) $(INCLUDES) $$i; done >.depend include .depend else depend dep: for i in *.c; do $(CPP) -M $(CFLAGS) $(INCLUDES) $$i; done >.depend .depend: playmidi.h @echo @echo "Bad or missing .depend running 'make depend clean'" @echo $(MAKE) depend clean @echo @echo "Successful. Trying to make again" @exit 0 endif playmidi-2.4.orig/playevents.c0100644000175000017500000001510606335434614014276 0ustar dsds/************************************************************************ playevents.c -- actually sends sorted list of events to device Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #include extern int seq_set_patch(int, int); extern void seq_key_pressure(int, int, int, int); extern void seq_start_note(int, int, int, int); extern void seq_stop_note(int, int, int, int); extern void seq_control(int, int, int, int); extern void seq_chn_pressure(int, int, int); extern void seq_bender(int, int, int, int); extern void seq_reset(); SEQ_USE_EXTBUF(); extern int graphics, verbose, division, ntrks, format; extern int gus_dev, ext_dev, sb_dev, awe_dev, perc, seqfd, p_remap; extern int play_gus, play_fm, play_ext, play_awe, reverb, chorus, chanmask; extern int usevol[16]; extern struct miditrack seq[MAXTRKS]; extern float skew; extern unsigned long int default_tempo; extern void load_sysex(int, unsigned char *, int); extern void showevent(int, unsigned char *, int); extern void init_show(); extern int updatestatus(); unsigned long int ticks, tempo; struct timeval start_time; unsigned long int rvl(s) struct miditrack *s; { register unsigned long int value = 0; register unsigned char c; if (s->index < s->length && ((value = s->data[(s->index)++]) & 0x80)) { value &= 0x7f; do { if (s->index >= s->length) c = 0; else value = (value << 7) + ((c = s->data[(s->index)++]) & 0x7f); } while (c & 0x80); } return (value); } /* indexed by high nibble of command */ int cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 2, 0}; #define CMD seq[track].running_st #define TIME seq[track].ticks #define CHN (CMD & 0xf) #define NOTE data[0] #define VEL data[1] int playevents() { unsigned long int tempo = default_tempo, lasttime = 0; unsigned int lowtime, track, best, length, loaded; unsigned char *data; double current = 0.0, dtime = 0.0; int use_dev, play_status, playing = 1; init_show(); seq_reset(); gettimeofday(&start_time, NULL); /* for synchronization */ for (track = 0; track < ntrks; track++) { seq[track].index = seq[track].running_st = 0; seq[track].ticks = rvl(&seq[track]); } for (best = 0; best < 16; best++) { if (ISAWE(best)) use_dev = awe_dev; else if (ISGUS(best)) use_dev = gus_dev; else if (ISFM(best)) use_dev = sb_dev; else use_dev = ext_dev; seq_control(use_dev, best, CTL_BANK_SELECT, 0); seq_control(use_dev, best, CTL_EXT_EFF_DEPTH, reverb); seq_control(use_dev, best, CTL_CHORUS_DEPTH, chorus); seq_control(use_dev, best, CTL_MAIN_VOLUME, 127); seq_chn_pressure(use_dev, best, 127); seq_control(use_dev, best, 0x4a, 127); } SEQ_START_TIMER(); SEQ_DUMPBUF(); while (playing) { lowtime = ~0; for (best = track = 0; track < ntrks; track++) if (seq[track].ticks < lowtime) { best = track; lowtime = TIME; } if (lowtime == ~0) break; /* no more data to read */ track = best; if (ISMIDI(CHN)) use_dev = ext_dev; else if (ISAWE(CHN)) use_dev = awe_dev; else if (ISGUS(CHN)) use_dev = gus_dev; else use_dev = sb_dev; /* this section parses data in midi file buffer */ if ((seq[track].data[seq[track].index] & 0x80) && (seq[track].index < seq[track].length)) CMD = seq[track].data[seq[track].index++]; if (CMD == 0xff && seq[track].index < seq[track].length) CMD = seq[track].data[seq[track].index++]; if (CMD > 0xf7) /* midi real-time message (ignored) */ length = 0; else if (!(length = cmdlen[(CMD & 0xf0) >> 4])) length = rvl(&seq[track]); if (seq[track].index + length < seq[track].length) { /* use the parsed midi data */ data = &(seq[track].data[seq[track].index]); if (CMD == set_tempo) tempo = ((*(data) << 16) | (data[1] << 8) | data[2]); if (TIME > lasttime) { if (division > 0) { dtime = ((double) ((TIME - lasttime) * (tempo / 10000)) / (double) (division)) * skew; current += dtime; lasttime = TIME; } else if (division < 0) current = ((double) TIME / ((double) ((division & 0xff00 >> 8) * (division & 0xff)) * 10000.0)) * skew; /* stop if there's more than 40 seconds of nothing */ if (dtime > 4096.0) playing = 0; else if ((int) current > ticks) { SEQ_WAIT_TIME((ticks = (int) current)); SEQ_DUMPBUF(); if (graphics) if ((play_status = updatestatus()) != NO_EXIT) return play_status; } } if (CMD > 0x7f && CMD < 0xf0 && ISPERC(CHN) && p_remap) { CMD &= 0xf0; CMD |= (p_remap - 1); } loaded = 0; /* for patch setting failures */ if (playing && CMD > 0x7f && ISPLAYING(CHN)) switch (CMD & 0xf0) { case MIDI_KEY_PRESSURE: if (ISPERC(CHN) && VEL && (!ISMIDI(CHN)&&!ISAWE(CHN))) loaded = seq_set_patch(CHN, NOTE + 128); if (loaded != -1) seq_key_pressure(use_dev, CHN, NOTE, VEL); break; case MIDI_NOTEON: if (ISPERC(CHN) && VEL && (!ISMIDI(CHN)&&!ISAWE(CHN))) loaded = seq_set_patch(CHN, NOTE + 128); if (VEL && usevol[CHN]) VEL = usevol[CHN]; if (loaded != -1) seq_start_note(use_dev, CHN, NOTE, VEL); break; case MIDI_NOTEOFF: seq_stop_note(use_dev, CHN, NOTE, VEL); break; case MIDI_CTL_CHANGE: seq_control(use_dev, CHN, NOTE, VEL); break; case MIDI_CHN_PRESSURE: seq_chn_pressure(use_dev, CHN, NOTE); break; case MIDI_PITCH_BEND: seq_bender(use_dev, CHN, NOTE, VEL); break; case MIDI_PGM_CHANGE: if (ISMIDI(CHN) || ISAWE(CHN) || !ISPERC(CHN)) NOTE = seq_set_patch(CHN, NOTE); break; case MIDI_SYSTEM_PREFIX: if (length > 1) load_sysex(length, data, CMD); break; default: break; } if (verbose || graphics) { showevent(CMD, data, length); ioctl(seqfd, SNDCTL_SEQ_SYNC); } } /* this last little part queues up the next event time */ seq[track].index += length; if (seq[track].index >= seq[track].length) seq[track].ticks = ~0; /* mark track complete */ else seq[track].ticks += rvl(&seq[track]); } SEQ_DUMPBUF(); return 1; } playmidi-2.4.orig/drums.o30100644000175000017500000001700006257346275013340 0ustar dsds2OPAc Bass Drum @@@@$RhÖC??2OPBass Drum 1 @@@@(@hÖF??2OPSide Stick @@@@<úÚ»¾??4OPAcoustic Snare ²1`uÒÕ??2OPSplash Cymbal @@@@O* sb±’??2OPCow Bell 4L@@<÷Áÿó%??2OPCrash Cymbal 2 @@@@<1qb±“??2OPVibraslap 4L@@:àá è¥T•??2OPRide Cymbal 2 @@@@@<1 sıô??2OPHigh Bongo 4L@@2 úöl†??2OPLow Bongo 4L@@- úöl…??2OPMute High Conga @@@@, ©ÖEE??2OPOpen High Conga 0L@@0 ©ÖDF??2OPLow Conga 4L@@) ©ÖDE??2OPHigh Timbale @@@@‘`rÒÕ??2OPLow Timbale @@@@‘`rÐÖ??2OPHigh Agogo 4H@@3 úöl‡??2OPLow Agogo 4@@@. úöl‡??2OPCabasa 0L@@7²1`u¢Ö??2OPMaracas 0P@@UD„Ýõ„v??2OPShort Whistle @@@@G320_??2OPLong Whistle @@@@ G$"doV??2OPShort Guiro @@@@4'"¥iÅ??2OPLong Guiro @@@@ 4'"¥iå??2OPClaves ,L@@E4GØõðv??2OPHigh Wood Block 4L@@?3Hùõöu??2OPLow Wood Block 4L@@:3Gùõõu??2OPMute Cuica @@@@4'"¥iÅ??2OPOpen Cuica @@@@ ;!1¥iå??2OPMute Triangle 0L@@< Àñüð??2OPOpen Triangle 4H@@< Ïñüð??playmidi-2.4.orig/bitmaps.h0100644000175000017500000000153106257346275013555 0ustar dsds/************************************************************************ bitmaps.h -- bitmaps to be included in xplaymidi Copyright (C) 1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "bitmaps/eject.bit" #include "bitmaps/prev.bit" #include "bitmaps/play.bit" #include "bitmaps/next.bit" #include "bitmaps/meter.bit" playmidi-2.4.orig/readmidi.c0100644000175000017500000001206306257346275013671 0ustar dsds/************************************************************************ readmidi.c -- last change: 1 Jan 96 Creates a linked list of each chunk in a midi file. ENTIRE MIDI FILE IS RETAINED IN MEMORY so that no additional malloc calls need be made to store the data of the events in the midi file. Copyright (C) 1995-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #include int format, ntrks, division; unsigned char *midifilebuf; /* the following few lines are needed for dealing with CMF files */ int reloadfm = 0; extern void loadfm(); extern int seqfd, sb_dev, wantopl3, play_fm, fmloaded[256]; SEQ_USE_EXTBUF(); extern struct miditrack seq[MAXTRKS]; extern int find_header; extern unsigned long int default_tempo; unsigned short Read16() { register unsigned short x; x = (*(midifilebuf) << 8) | midifilebuf[1]; midifilebuf += 2; return x; } unsigned long Read32() { register unsigned long x; x = (*(midifilebuf) << 24) | (midifilebuf[1] << 16) | (midifilebuf[2] << 8) | midifilebuf[3]; midifilebuf += 4; return x; } int readmidi(filebuf, filelength) unsigned char *filebuf; off_t filelength; { unsigned long int i = 0, track, tracklen; midifilebuf = filebuf; /* allow user to specify header number in from large archive */ while (i != find_header && midifilebuf < (filebuf + filelength - 32)) { if (strncmp(midifilebuf, "MThd", 4) == 0) { i++; midifilebuf += 4; } else midifilebuf++; } if (i != find_header) { /* specified header was not found */ midifilebuf = filebuf; return find_header = 0; } if (midifilebuf != filebuf) midifilebuf -= 4; i = Read32(); if (i == RIFF) { midifilebuf += 16; i = Read32(); } if (i == MThd) { tracklen = Read32(); format = Read16(); ntrks = Read16(); division = Read16(); } else if (i == CTMF) { /* load a creative labs CMF file, with instruments for fm */ tracklen = midifilebuf[4] | (midifilebuf[5] << 8); format = 0; ntrks = 1; division = midifilebuf[6] | (midifilebuf[7] << 8); default_tempo = 1000000 * division / (midifilebuf[8] | (midifilebuf[9] << 8)); seq[0].data = filebuf + tracklen; seq[0].length = filelength - tracklen; i = (unsigned long int) (*(short *) &midifilebuf[2]) - 4; /* if fm playback is enabled, load all fm patches from file */ if (play_fm) { struct sbi_instrument instr; int j, k; reloadfm = midifilebuf[32]; /* number of custom patches */ instr.device = sb_dev; for (j = 0; j < 32; j++) instr.operators[j] = 0x3f; instr.key = FM_PATCH; for (j = 0; j < reloadfm && j < 255; j++) { instr.channel = j; fmloaded[j] = instr.key; for (k = 0; k < 16; k++) instr.operators[k] = midifilebuf[i + (16 * j) + k]; SEQ_WRPATCH(&instr, sizeof(instr)); } } return ntrks; } else { int found = 0; while (!found && midifilebuf < (filebuf + filelength - 8)) if (strncmp(midifilebuf, "MThd", 4) == 0) found++; else midifilebuf++; if (found) { midifilebuf += 4; tracklen = Read32(); format = Read16(); ntrks = Read16(); division = Read16(); } else { #ifndef DISABLE_RAW_MIDI_FILES /* this allows playing ANY file, so watch out */ midifilebuf -= 4; format = 0; /* assume it's .mus file ? */ ntrks = 1; division = 40; #else return -1; #endif } } if (ntrks > MAXTRKS) { fprintf(stderr, "\nWARNING: %d TRACKS IGNORED!\n", ntrks - MAXTRKS); ntrks = MAXTRKS; } if (play_fm && reloadfm) { loadfm(); /* if custom CMF patches loaded, replace */ reloadfm = 0; } for (track = 0; track < ntrks; track++) { if (Read32() != MTrk) { /* MTrk isn't where it's supposed to be, search rest of file */ int fuzz, found = 0; midifilebuf -= 4; if (strncmp(midifilebuf, "MThd", 4) == 0) continue; else { if (!track) { seq[0].length = filebuf + filelength - midifilebuf; seq[0].data = midifilebuf; continue; /* assume raw midi data file */ } midifilebuf -= seq[track - 1].length; for (fuzz = 0; (fuzz + midifilebuf) < (filebuf + filelength - 8) && !found; fuzz++) if (strncmp(&midifilebuf[fuzz], "MTrk", 4) == 0) found++; seq[track - 1].length = fuzz; midifilebuf += fuzz; if (!found) continue; } } tracklen = Read32(); if (midifilebuf + tracklen > filebuf + filelength) tracklen = filebuf + filelength - midifilebuf; seq[track].length = tracklen; seq[track].data = midifilebuf; midifilebuf += tracklen; } ntrks = track; return ntrks; } playmidi-2.4.orig/COPYING0100644000175000017500000004307606257346275013012 0ustar dsds GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. playmidi-2.4.orig/io_ncurses.c0100644000175000017500000002261506335435777014273 0ustar dsds/************************************************************************ io_ncurses.c -- shows midi events using ncurses or printf Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #ifdef linux #include #else #include #endif #include "gsvoices.h" #include #include char *metatype[7] = {"Text", "Copyright Notice", "Sequence/Track name", "Instrument Name", "Lyric", "Marker", "Cue Point"}; char *sharps[12] = /* for a sharp key */ {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "B#", "B"}; char *flats[12] = /* for a flat key */ {"C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Gb", "A", "Bb", "B"}; char *majflat[15] = /* name of major key with 'x' flats */ {"C", "F", "Bb", "Eb", "Ab", "Db", "Gb", "Cb", "Fb", "Bbb", "Ebb", "Abb", "Gbb", "Cbb", "Fbb"}; /* only first 8 defined by file format */ char *majsharp[15] = /* name of major key with 'x' sharps */ {"C", "G", "D", "A", "E", "B", "F#", "C#", "G#", "D#", "A#", "E#", "B#", "F##", "C##"}; /* only first 8 defined by file format */ char *minflat[15] = /* name of minor key with 'x' flats */ {"A", "D", "G", "C", "F", "Bb", "Eb", "Ab", "Db", "Gb", "Cb", "Fb", "Bbb", "Ebb", "Abb"}; /* only first 8 defined by file format */ char *minsharp[15] = /* name of minor key with 'x' sharps */ {"A", "E", "B", "F#", "C#", "G#", "D#", "A#", "E#", "B#", "F##", "C##", "G##", "D##", "A##"}; /* only first 8 defined by file format */ char *drumset[11] = { "STANDARD ", "ROOM ", "POWER ", "ELECTRONIC ", "TR-808/909 ", "JAZZ ", "BRUSH ", "ORCHESTRA ", "SFX ", "User Program", "CM-64/32L " }; #define SET(x) (x == 8 ? 1 : x >= 16 && x <= 23 ? 2 : x == 24 ? 3 : \ x == 25 ? 4 : x == 32 ? 5 : x >= 40 && x <= 47 ? 6 : \ x == 48 ? 7 : x == 56 ? 8 : x >= 96 && x <= 111 ? 9 : \ x == 127 ? 10 : 0) extern int graphics, verbose, perc; extern int format, ntrks, division; extern unsigned long int ticks; extern char *filename, *gmvoice[256]; extern float skew; extern void seq_reset(); extern struct timeval start_time; struct timeval now_time, want_time; char textbuf[1024], **nn; int i, ytxt, karaoke; void close_show(error) int error; { if (graphics) { attrset(A_NORMAL); refresh(); endwin(); } exit(error); } #define CHN (cmd & 0xf) #define NOTE ((int)data[0]) #define VEL ((int)data[1]) #define OCTAVE (NOTE / 12) #define OCHAR (0x30 + OCTAVE) #define XPOS (14 + ((NOTE/2) % ((COLS - 16) / 4)) * 4) #define YPOS (CHN + 2) #define NNAME nn[NOTE % 12] int cdeltat(t1, t2) struct timeval *t1; struct timeval *t2; { int d1, d2; d1 = t1->tv_sec - t2->tv_sec; if((d2 = t1->tv_usec - t2->tv_usec) < 0) (d2 += 1000000, d1 -= 1); d2 /= 10000; return (d2 + d1 * 100); } int updatestatus() { int ch, d1, d2; want_time.tv_sec = start_time.tv_sec + (ticks / 100); want_time.tv_usec = start_time.tv_usec + (ticks % 100) * 10000; if (want_time.tv_usec > 1000000) (want_time.tv_usec -= 1000000, want_time.tv_sec++); do { attrset(A_BOLD); if ((ch = getch()) != ERR) switch (ch) { case KEY_RIGHT: if ((skew -= 0.01) < 0.25) skew = 0.25; if (graphics) mvprintw(1, COLS - 6, "%0.2f", skew); break; case KEY_LEFT: if ((skew += 0.01) > 4) skew = 4.0; if (graphics) mvprintw(1, COLS - 6, "%0.2f", skew); break; case KEY_PPAGE: case KEY_UP: seq_reset(); return (ch == KEY_UP ? 0 : -1); break; case 18: case 12: wrefresh(curscr); break; case 'q': case 'Q': case 3: close_show(0); break; default: return 1; /* skip to next song */ break; } gettimeofday(&now_time, NULL); d1 = now_time.tv_sec - start_time.tv_sec; d2 = now_time.tv_usec - start_time.tv_usec; if (d2 < 0) (d2 += 1000000, d1 -= 1); mvprintw(1, 0, "%02d:%02d.%d", d1 / 60, d1 % 60, d2 / 100000); refresh(); d1 = cdeltat(&want_time, &now_time); if (d1 > 15) usleep(100000); } while (d1 > 10); return NO_EXIT; } void showevent(cmd, data, length) int cmd; unsigned char *data; int length; { if (cmd < 8 && cmd > 0) { if (length > COLS) length = COLS; if (cmd != 1 && strncmp(textbuf, data, length - 1) == 0) return; /* ignore repeat messages, "WinJammer Demo" etc. */ if (verbose) { printf("%s: ", metatype[cmd - 1]); for (i = 0; i < length; i++) putchar(data[i]); putchar('\n'); } else { attrset(A_BOLD | COLOR_PAIR(cmd)); if (!karaoke || *data == '\\' || *data == '/' || (*data >= '@' && *data <= 'Z') || *data == '(' || karaoke + length > COLS || (cmd != 1 && karaoke)) { karaoke = 0; if ((++ytxt) > LINES - 1) ytxt = 19; move(ytxt, 0); clrtoeol(); if (*data == '\\' || *data == '/') (data++, length--); /* karaoke newlines */ if (*data == '@') /* karaoke info */ (data += 2, length -= 2); } strncpy(textbuf, data, length < COLS - karaoke ? length : COLS - karaoke); if (length < 1024) textbuf[length] = 0; mvaddstr(ytxt, karaoke, textbuf); if (cmd == 1) { karaoke += strlen(textbuf); if (karaoke > COLS - 10) karaoke = 0; } else karaoke = 0; } } else if (cmd == key_signature) { if (graphics || verbose) nn = ((NOTE & 0x80) ? flats : sharps); if (verbose) { if (VEL) /* major key */ printf("Key: %s major\n", (!(NOTE & 0x80) ? majsharp[NOTE] : majflat[256-NOTE])); else /* minor key */ printf("Key: %s minor\n", (!(NOTE & 0x80) ? minsharp[NOTE] : minflat[256-NOTE])); } } else switch (cmd & 0xf0) { case MIDI_KEY_PRESSURE: if (verbose > 4) printf("Chn %d Key Pressure %s%c=%d\n", 1 + (cmd & 0xf), NNAME, OCHAR, VEL); break; case MIDI_NOTEON: if (graphics) if (VEL) { attrset(A_BOLD | COLOR_PAIR((CHN % 6 + 1))); if (!ISPERC(CHN) || NOTE > 127 || gmvoice[NOTE + 128] == NULL) mvprintw(YPOS, XPOS, "%s%c", NNAME, OCHAR); else mvprintw(YPOS, XPOS, "%c%c%c", gmvoice[NOTE + 128][0], gmvoice[NOTE + 128][1], gmvoice[NOTE + 128][2]); } else mvaddstr(YPOS, XPOS, " "); else if (verbose > 5) printf("Chn %d Note On %s%c=%d\n", 1 + (cmd & 0xf), NNAME, OCHAR, VEL); break; case MIDI_NOTEOFF: if (graphics) mvaddstr(YPOS, XPOS, " "); else if (verbose > 5) printf("Chn %d Note Off %s%c=%d\n", 1 + (cmd & 0xf), NNAME, OCHAR, VEL); break; case MIDI_CTL_CHANGE: if (verbose > 5) printf("Chn %d Ctl Change %d=%d\n", 1 + (cmd & 0xf), NOTE, VEL); break; case MIDI_CHN_PRESSURE: if (verbose > 5) printf("Chn %d Pressure=%d\n", 1 + (cmd & 0xf), NOTE); break; case MIDI_PITCH_BEND: { register val = (VEL << 7) | NOTE; if (graphics) { attrset(A_BOLD); if (val > 0x2000) mvaddch(YPOS, 11, '>'); else if (val < 0x2000) mvaddch(YPOS, 11, '<'); else mvaddch(YPOS, 11, ' '); } else if (verbose > 4) printf("Chn %d Bender=0x%04x\n", 1 + CHN, val); } break; case MIDI_PGM_CHANGE: if (graphics) { attrset(COLOR_PAIR((CHN % 6 + 1)) | A_BOLD); if (!ISPERC(CHN)) mvaddnstr(YPOS, 0, gsvoice[NOTE], 12); else mvaddstr(YPOS, 0, drumset[SET(NOTE)]); } else if (verbose > 3) printf("Chn %d Program=%s %d\n", 1 + CHN, (ISPERC(CHN) ? drumset[SET(NOTE)] : gsvoice[NOTE]), NOTE + 1); break; case 0xf0: case 0xf7: if (verbose > 2) { printf("Sysex(%2x): ", cmd); for (i = 0; i < length; i++) printf("%02x", data[i]); putchar('\n'); } break; default: break; } } void init_show() { char *tmp; nn = flats; ytxt = 18; karaoke = 0; if (graphics) { clear(); attrset(A_NORMAL | A_ALTCHARSET); mvprintw(0, 0, RELEASE " by Nathan Laredo"); mvprintw(0, 40, "Now Playing:"); mvprintw(1, 40, "[P]ause [N]ext [L]ast [O]ptions"); mvaddstr(ytxt, 0, "ÍÍÍÍÍÍÍÍÍÍÍ;"); mvprintw(1, 0, "00:00.0 - 00:00.0, %d track%c", ntrks, ntrks > 1 ? 's' : ' '); for (i = 0; i < 16; i++) mvprintw(i + 2, 0, "Channel %2d ³", i + 1); tmp = strrchr(filename, '/'); strncpy(textbuf, (tmp == NULL ? filename : tmp + 1), COLS - 53); attrset(A_BOLD); mvaddstr(0, 53, textbuf); mvaddch(1, 41, 'P'); mvaddch(1, 49, 'N'); mvaddch(1, 56, 'L'); mvaddch(1, 63, 'O'); mvaddstr(0, 0, RELEASE); refresh(); } else if (verbose) { printf("** Now Playing \"%s\"\n", filename); printf("** Format: %d, Tracks: %d, Division: %d\n", format, ntrks, division); } } void setup_show(argc, argv) int argc; char **argv; { if (graphics) { initscr(); start_color(); verbose = 0; init_pair(1, COLOR_RED, COLOR_BLACK); init_pair(2, COLOR_GREEN, COLOR_BLACK); init_pair(3, COLOR_YELLOW, COLOR_BLACK); init_pair(4, COLOR_BLUE, COLOR_BLACK); init_pair(5, COLOR_MAGENTA, COLOR_BLACK); init_pair(6, COLOR_CYAN, COLOR_BLACK); init_pair(7, COLOR_WHITE, COLOR_BLACK); raw(); noecho(); nodelay(stdscr, TRUE); keypad(stdscr, TRUE); attrset(A_NORMAL); } } playmidi-2.4.orig/README.1ST0100644000175000017500000000250706604565673013240 0ustar dsdsPlaymidi 2.5 Copyright (C)1995, 1996 Nathan Laredo Please see the file COPYING for terms and conditions. ------------------------------------------------------------------------- ABOUT PLAYMIDI: Playmidi is a midi file player that will playback to FM, GUS, and external MIDI. It also supports Creative Music Files (CMF) and Microsoft RIFF (RMI) files and large midi archives from games such as Ultima 7. INSTALLATION INSTRUCTIONS: To install playmidi, just "make install" make install will automatically configure playmidi based on your answers to a few simple questions. NOTE: the Makefile is optimized for a recent RedHat setup. If you have an old or poorly installed ncurses, you might have to make some changes to compile. X11R6 is reqired for xplaymidi. If there is an object you don't care to make, or can't make, see the makefile for additional installation options. If you're having trouble with playmidi, please feel free to send email. If you've discovered any bugs, feel free to email your bug fixes. USAGE: [x]playmidi [options] file1.mid [file2.mid ...] There are a lot of command line options to change things like which device to playback to and what channels to play with what patch, etc. There are also compile-in options you will find in "playmidi.h" Enjoy... Nathan I Laredo Lackland AFB, Texas, USA. laredo@gnu.org playmidi-2.4.orig/QuickStart0100644000175000017500000001076306604565751013767 0ustar dsdsPlaymidi 2.3 Quick Start Instructions ===================================== Be sure to read the REAME.1ST for install instructions. This file explains all of the options for running playmidi, and options while playmidi is running. A better manpage will be written in a future release. My personal preferred options for playmidi and explanations thereof: playmidi -rR111 -C111 -D0 ~ftp/midi/gmidi/General_MIDI/CLASSIC/*.mid | | | | | | | | | | | | | | list of files to play | | | my system has 3 midi interfaces, use first one | | initial midi chorus value of 111 (scale 0-127, 0=off) | initial midi reverb value of 111 (scale is 0-127, 0=off) real time playback graphics (assumed for splaymidi/xplaymidi) Version specific features: playmidi -r example playback screen: ----------------------------------- instrument name | Percussion channel | | song timer | | | mar pic flu bas cla eng fre tro tru ORC syn tub tim mar syn gun 13:25.5 Playmidi 2.3 G5 G5 G5 by Nathan Laredo Eb7 Eb7 1812.mid Eb5 Eb5 Eb5 30 tracks Eb3 Eb3 Eb3 sna skew=1.00 Adapted and Se Bb6 Robert C. Good Bb4 Bb4 1995 G6 Violins G4 G4 Sostennuto Str Tremolo String cym Violas Eb6 Cellos Eb4 Eb4 Basses Guns 1812 OVERTURE by P. I. Tscha | | Text events Left Arrow and Right Arrow change skew (warp playback speed) Up Arrow repeats current song Page Up skips to previous song Q, ^C or ESC will exit ^L or ^R will repaint screen Any key other than above will skip to next song xplaymidi display: ------------------ xplaymidi does not require -r option, xplaymidi may be used with -v option to echo text events to controlling terminal (usually xterm). X interface is fairly intuitive, no keyboard commands are required or implemented (with the exception of control-s to search the file text events) Application defaults may be changed to bind keys to buttons if desired. Enjoy, and as always if you like this program, please send me email and let me know that you are using it. It encourages me to make future more frequent releases with more enhancements. If you find any bugs not listed in the BUGS file, please let me know. If you have trouble with a specific midi file that another player can play and playmidi has trouble with, please email me the name of the file, I have a collection of over 15000 midi files so chances are i have the file already and there's no need for you to send me a uuencoded file to debug with. Playmidi can handle some pretty nastily corrupted midi files, but it may seg fault on others, I'm working on that too. Join the new playmidi mailing list: e-mail "subscribe linux-playmidi" to majordomo@majordomo.nether.net You'll find announcements for new and testing versions, as well as a good forum for communicating with other playmidi users. Nathan Laredo laredo@gnu.org PS. HAVE FUN! PPS. If you really want to make my day, send me a postcard from wherever you live and use playmidi. mail: PSC#1, Box 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128 USA playmidi-2.4.orig/toy.c0100644000175000017500000001447306335436641012727 0ustar dsds/************************************************************************ * toy.c - start of midi recording package. Will take input from * /dev/sequencer and layer with an existing /dev/sequencer dump file, * saving the result as a new /dev/sequencer dump file. In short, you * must have hardware midi devices to use this "toy". * * This program is an experiment in midi recording to solve some timing * and input/output issues that I've had while writing my midi studio * package (basically to test how to best use select() on /dev/sequencer). * * This code was written by by Nathan Laredo (laredo@gnu.ai.mit.edu) * Source code may be freely distributed in unmodified form. *************************************************************************/ #include #ifndef __FreeBSD__ #include #endif #include #include #include #include #ifndef __FreeBSD__ #include #else #include #endif #include #define SEQUENCER_DEV "/dev/sequencer" #define SEQUENCERBLOCKSIZE 128 /* * The following are if you have more than one midi device on * your system as I do. My Roland piano is on the 2nd midi port (GUS), and * my Korg daughterboard is on the 1st midi port (SB16). * Input will be taken from any midi device known by the kernel sequencer. * device. */ #define OUT_DEV 0 SEQ_DEFINEBUF(SEQUENCERBLOCKSIZE); unsigned char inputbuf[SEQUENCERBLOCKSIZE]; unsigned char outputbuf[SEQUENCERBLOCKSIZE]; int seqfd, outfile, infile; /* indexed by high nibble of command */ int cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 2, 0}; void seqbuf_dump() { if (_seqbufptr) { if (write(seqfd, _seqbuf, _seqbufptr) == -1) { perror(SEQUENCER_DEV); exit(-1); } if (write(outfile, _seqbuf, _seqbufptr) == -1) { perror("write"); exit(-1); } } _seqbufptr = 0; } void seq_addevent(s, c) unsigned char *s; int c; { int i; if (*s == SEQ_SYNCTIMER) /* we want only one of these messages */ return; _SEQ_NEEDBUF(c); for (i = 0; i < c; i++) _seqbuf[_seqbufptr + i] = s[i]; _SEQ_ADVBUF(c); } int seqread(f, buf) int f; unsigned char *buf; { return read(f, buf, 4); } int main(argc, argv) int argc; char **argv; { extern char *optarg; extern int optind; int i, transpose = 0, channel = 0, program = 0, error = 0; unsigned char mid[8], imid[8], cmd = 0, icmd = 0; unsigned int oticks = 0, ticks = 0, db = 0, idb = 0, wait = 0; fd_set rdfs; struct timeval tv, start, now, want; while ((i = getopt(argc, argv, "c:p:wt:")) != -1) switch (i) { case 'c': channel = atoi(optarg); break; case 'p': program = atoi(optarg); break; case 'w': wait++; break; case 't': transpose = atoi(optarg); break; default: error++; break; } if (error || argc - optind != 2) { fprintf(stderr, "usage: %s [-t semitones]" " [-c channel] [-p program] [-wait] " "inputfile.seq outputfile.seq\n", argv[0]); exit(1); } if ((seqfd = open(SEQUENCER_DEV, O_RDWR, 0)) < 0) { perror("open " SEQUENCER_DEV); exit(-1); } if ((infile = open(argv[optind], O_RDONLY, 0)) < 0) { perror(argv[optind]); exit(-1); } if ((outfile = open(argv[optind + 1], O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) { perror(argv[optind + 1]); exit(-1); } ioctl(seqfd, SNDCTL_SEQ_RESET); if (program >= 1 && program <= 128) { if (channel < 1 || channel > 16) channel = 1; SEQ_MIDIOUT(OUT_DEV, 0xc0 | (channel - 1)); SEQ_MIDIOUT(OUT_DEV, program - 1); } /* extra byte for converting 3-byte timer ticks */ inputbuf[4] = 0; outputbuf[4] = 0; if (wait) { /* wait for midi input to start */ FD_ZERO(&rdfs); FD_SET(seqfd, &rdfs); select(FD_SETSIZE, &rdfs, NULL, NULL, NULL); seqread(seqfd, outputbuf); /* trash time stamp (hopefully) */ } SEQ_START_TIMER(); SEQ_DUMPBUF(); gettimeofday(&start, NULL); while (ticks < 0xffffff) { FD_ZERO(&rdfs); FD_SET(infile, &rdfs); tv.tv_sec = tv.tv_usec = 0; /* no wait */ if (!select(FD_SETSIZE, &rdfs, NULL, NULL, &tv)) { /* wait forever for more input -- mark end of input */ inputbuf[0] = SEQ_WAIT; inputbuf[1] = inputbuf[2] = inputbuf[3] = 0xff; } else if (seqread(infile, inputbuf) < 4) { inputbuf[0] = SEQ_WAIT; inputbuf[1] = inputbuf[2] = inputbuf[3] = 0xff; } if (inputbuf[0] == SEQ_WAIT) ticks = (*(unsigned int *) &inputbuf[1]); want.tv_sec = ticks / 100 + start.tv_sec; want.tv_usec = (ticks % 100) * 10000 + start.tv_usec; if (want.tv_usec >= 1000000) { want.tv_usec -= 1000000; want.tv_sec++; } if (*inputbuf == SEQ_MIDIPUTC) { if (inputbuf[1] & 0x80) icmd = imid[idb = 0] = inputbuf[1]; else imid[idb] = inputbuf[1]; idb++; if (idb == cmdlen[icmd >> 4] + 1) { fprintf(stderr, ">%8d ", ticks); for (i = 0; i < idb; i++) { fprintf(stderr, "%02x", imid[i]); SEQ_MIDIOUT(OUT_DEV, imid[i]); } fprintf(stderr, "\n"); idb = 1; } } else { gettimeofday(&now, NULL); while (timercmp(&now, &want, <)) { tv.tv_sec = want.tv_sec - now.tv_sec; tv.tv_usec = want.tv_usec - now.tv_usec; if (tv.tv_usec < 0) { tv.tv_usec += 1000000; tv.tv_sec--; } FD_ZERO(&rdfs); FD_SET(seqfd, &rdfs); if (select(FD_SETSIZE, &rdfs, NULL, NULL, &tv)) { seqread(seqfd, outputbuf); if (outputbuf[0] == SEQ_WAIT) { oticks = (*(unsigned int *) &outputbuf[1]); if (oticks - ticks) seq_addevent(outputbuf, 4); } if (outputbuf[0] == SEQ_MIDIPUTC) { if (outputbuf[1] & 0x80) cmd = (mid[db = 0] = outputbuf[1]) & 0xf0; else mid[db] = outputbuf[1]; db++; if (db == cmdlen[cmd >> 4] + 1) { if (transpose && (cmd == 0x80 || cmd == 0x90)) mid[1] += transpose; fprintf(stderr, "<%8d ", oticks); for (i = 0; i < db; i++) { if (channel >= 1 && channel <= 16) mid[0] = cmd | (channel - 1); fprintf(stderr, "%02x", mid[i]); SEQ_MIDIOUT(OUT_DEV, mid[i]); } fprintf(stderr, "\n"); db = 1; SEQ_DUMPBUF(); } } } gettimeofday(&now, NULL); } seq_addevent(inputbuf, 4); } SEQ_DUMPBUF(); } /* should NEVER get to here, if we do, something is really screwed */ close(seqfd); close(infile); close(outfile); exit(0); } /* end of file */ playmidi-2.4.orig/gmstriving.mid0100644000175000017500000016053706257346275014645 0ustar dsdsMThdàMTrkØÿAÿ gmstri00.midÿT`ÿXÿQý˜TÿX–@ÿXžÿX–@ÿX´ÿX–@ÿXžÿX–@ÿXƒÑÿX–@ÿXžÿX–@ÿXžÿX–@ÿXøÿX–@ÿXžÿX–@ÿXÿ/MTrk4¬ÿPIANO°@°° @°[P°]Àà@d)Q€)@')x[°@ €)@ €@A9|5<)K€<@€5@€9@€A@€)@h5t>€5@:5nC€5@55m;€5@=5n@€5@85y;€5@=5H€5@(5tA€5@75F€5@25tF€5@27<@O€7@#€<@ €@@^5U€5@:)5p>t°@s°@€5@E€>@€:@€)@ 5tO€5@)5C€5@55pL€5@,5|J€5@.5pK€5@-5tJ€5@&5y<€5@<5P€5@(5t>€5@:7@<T€7@€<@1€@@L5T€5@A<5s9m)°@w°@!€5@4€)@€<@ 5y€9@€A@;€5@35H€5@05|H€5@05p@€5@85y>€5@:5T€5@5F€5@25H€5@05tE€5@37y@<€7@ €<@€@@85O€5@!:>5t)°@m°@€5@J€:@€)@€>@5hF€5@25tL€5@,5eJ€5@.5yJ€5@.5pK€5@-5yU€5@5t>€5@:5V€5@5F€5@ƒA9<5h)y$°@d€5@°@D€<@€)@ €A@5 €9@=€5@05C€5@55pJ€5@.5p@€5@85p/€5@I5pM€5@#5t9€5@?5H€5@05bC€5@57y@y<\€<@€7@7€@@X5E€5@+):>5n#°@a€5@°@2€>@€:@€)@ 5tJ€5@.5pC€5@55nM€5@+5nF€5@25|;€5@=5T€5@5y>€5@:5E€5@35jF€5@27@<<€7@€<@ €@@%5^€5@A5s<9)°@f°@€5@O€<@€)@€9@€A@5Q€5@'5yJ€5@.5C€5@55tJ€5@.5t7€5@A5tW€5@5|F€5@25E€5@35G€5@1@7<j€7@€<@(€@@E5W€5@°@:5t)>7F€7@T°@/€5@:€>@€:@€)@5nC€5@55tC€5@55t>€5@:5y>€5@:57€5@A5H€5@† <<€<@9<E)n:°@:°@0a&€E@;F€0@5S €)@/€F@<€5@H€<@€H@p9Y-\ H|Ay.h:nAy°@‚HC|:°@~E7€C@ €A@€.@€:@k€>@€E@TEy2p>j9[A| °@ƒ°@E€2@a€A@€E@€>@€9@a0~\g€5@0s€:@ €>@K°@:a>j5S@€5@"€:@7s@m@:0y°@€<@€7@°@€@@?@te:R5R€0@e€5@ 0p€:@€>@°@U:j>m5P<€5@°@€:@7j@p@€0@€7@€<@0P€@@'°@8@pj€<@-Cb €>@3€C@/Cn\€C@ HbJJb €H@?O\ €J@9€O@/OpR€O@TnM€T@Vh:€V@[/€[@ƒ7C3€C@;Em€E@z>w+mF°@)°@~€F@4J|<7G€+@ H €J@€7@Y€>@*€H@a-\9Xn:8An‚V°@YHt €.@€E@€A@€:@[0[Cj@d@ €C@‚€<@ €0@2Jm€J@L^€L@Ln+\En°@Mt&€L@^°@2\A€M@€E@^LsCmO:B>€L@€C@c€+@ €:@ €2@JAhh€J@€A@0-a9XHA°@ °@\Fp €F@€-@€A@€9@€<@*Ey(€E@.a>hEA:;°@w°@‚)€.@€A@Hn €E@€:@+€>@€H@-0X \@n-°@.°@j€@@ €>@€C@ €<@T€0@Hm€H@wJZ€J@ ,\Cj K°@°@3FC€K@€C@aAsJyy8J€J@(€A@+H?yC€8@>€?@€H@8Y?H°@r°@€H@ €8@Fm<|8F€?@€<@€F@€,@ €3@4€8@(Dyn€+@0 €1@€-@ €<@1°@5d) <9tA@: €0@ €>@€@@|€9@°@€<@€5@;5j9€5@*€)@ 5L9€5@5pO€5@75t@€5@(5pA€5@@5pO€5@5pM€5@ 5nZ€5@5p€A@2€5@*At 7<@_5a€<@ €@@€7@H€5@&:t>t5s )m°@^°@>€5@%€:@€>@%5pH€5@€)@5nE€5@45jA€5@@5m@€5@!5pE€5@45tH€5@)5hC€5@/5nO€5@*5na€5@7@|<|S€7@€<@€@@5jR€A@€5@A|<|5n9s°@)yh€9@°@7€5@€<@O5s>€)@€5@25j6€5@:5nG€5@55j>€5@/5e9€5@H5j@€5@)5e6€5@<5|J€5@%5j 7|@< )mC°@ €)@c°@ )p2€<@€@@ €7@€)@€5@5|>w:| )t°@^°@-€5@€:@ €>@95n €)@6€5@5yW€5@95X%€5@a5p@€5@5y9€5@95>€5@s€A@„<9€<@H<H€<@%0L9p )a.d:bA°@+°@+C‚€.@€C@E-€A@€:@W€>@"€E@f2t9jE|>yA°@ƒ*°@>€2@!€9@H€A@ €>@(€E@%mCm0a@|P°@\€0@€<@€@@ €C@€>@7p@|°@‚"€<@€>@€@@u€0@s:Y5[>[[€5@ €:@0t€>@F°@:h>m5eK€5@°@ €:@6@t@2€7@€<@0n €@@J°@€0@@j7n€0@:\5\a0s€5@€:@€>@ °@Y:\>b5S °@€0@*€5@€:@-@p@ €7@ €<@0t €@@E°@@m€0@<7|^°@0y4€7@/€@@€<@#€C@G€0@(<>€<@9<|E)p4°@w°@*0R+€E@OFy9\€F@*€)@€<@6€0@2HC€9@Y€H@-h9\AH°@w°@p€A@€H@-€9@*CsLw9\"€C@ €L@6€-@2€9@ EpM€E@ €M@.e:jEy°@Mk°@m5[€M@J€:@€E@FtOp:S€F@ €O@7€5@*€.@9HnQy€:@M€H@W€Q@~2n JtQ2°@$9\F°@->G%€2@€9@%€Q@ €>@ €J@~OJ 0X@R7bM°@M€@@€7@€0@€O@€J@°@7p@e0\O|JwƒR€@@ €J@€O@€7@€0@ƒM0tL7j €0@)j€<@%C[€>@@€C@$C[bHB €C@/JR€H@-€J@O;/€O@6O6O€O@TPLVY€T@7[y€V@)€[@ƒ0JwQw°@‚j°@*€5@€.@ €Q@Tw€>@7€J@IOd7YHd@;0G€T@°@)°@E€H@ €O@€@@-€7@ €0@&Vk€V@~X_€X@Xt Qn+\°@*Yt€X@J°@2m €Y@€Q@aOmX:F€X@€O@ €+@€2@MV €:@€V@#€M@-J<;°@ TMf°@0€T@ERW€M@9€-@€R@€<@~Qtz€Q@&°@>F.FQnMJX5dH°@}€5@*€.@€>@€Q@€M@Tn€J@t0;@A7b OhHj €T@°@2°@^€H@€O@€@@C€7@€0@T€T@\Vc€V@O,wW°@$°@-3Y€W@€O@fVMsy8e€V@#€M@(KTf€,@9€T@ €K@2€8@/,nKT °@E°@a€T@€K@tRJ|n€R@€J@88Y€,@€3@,€8@*P Hta€H@€P@$°@ °@ )5 €8@lDV€=@w=L-€D@L8>€=@p=>€8@n1051DN€=@Z=B2€D@B€=@82o€8@=GzDN€=@g=L/€D@I88€=@j€8@=JxDV€=@a=J0€D@?€=@8/g€8@=JZ€)@DV€5@ €=@"€1@:=J/€D@9€=@8€F@;:5 €?@i?L€:@dOzFV€?@h?B4€F@C:<€?@aMs?J€:@$€O@PFS€?@_?L+€F@Ks€M@8:*€?@u?F€:@*€K@JFSKs€?@]?N/€F@H€?@:5v€:@?=€K@FseFY€?@7€7@€3@€)@?M-€F@€F@+€?@:V Hh5€:@0JAY)Nq°@5€A@E58€<@]€<@b€<@p€5@?€0@7€H@-0/AT)S€<@[!€A@W5>€<@s€5@€M@€<@B)dDdPze°@="j€=@1L8Z€D@q=S€8@°@5J Rl€=@l=L€8@hDS€=@$€R@IsF=S2€D@G88€=@g€8@=NwDY €=@m=S1€D@I8=€=@c€8@=LwDM€=@d=J.€D@J8)€=@p€8@=SyDY €=@n=N/€D@@€=@ 8Ng€8@=JxDV€=@g=J0€D@7€=@8*g€8@=JwDV €=@m=5 €)@€5@€D@'€=@ €1@8BC=L,€8@\€I@€=@"F[)ZY°@?[>€F@9:234€?@q?S€:@+°@KFV7S€?@f?N0€F@:B6€?@]€:@?LzFN€?@_?JG€F@/:2€?@u?L€:@]FV€?@g?L:€F@!Ks:2€?@t?J€:@4€K@!R[IlFV €?@q?V3€F@E:8€?@!€I@.€R@ PRHe?F€:@qFS€?@1€H@€P@?S3€F@ OZFY3€?@:>x?F€:@ €F@€O@>FMOTF^€?@i?J,€F@C€?@:2 €O@`€F@Kh ?N€:@gFV€?@c?M8€F@€K@ €7@ Fl €)@€3@ €?@:>?Jz€:@ €?@Q€F@)dAl He_°@8€<@5MJ€A@- €<@k°@:68 €B@€=@f=Z°@€6@[BS$€=@V=SY€B@65€)@ €=@g=M€6@c)LBM0€=@I=S9€B@>6( €=@%€0@I=F€6@Y0=BV€=@`=N1€B@+€)@€=@6=L€0@)=N €6@qC^)Z*€=@L>Z°@2€C@+7J €>@o>V%€7@P0>CZ°@€>@`>N?€C@97,€>@H€)@>M€7@a)@CN€>@X>S3€C@G7<€>@J€0@(>[€7@f02C[€>@f><:€C@€)@€>@7F\€7@>JzDZ)Z€>@€0@X?N°@N€D@%8G€?@i?N€8@ 04 °@2DV€?@_?N=€D@;85€?@d?L€8@bD[€?@^?V€0@1€D@@88 €?@m?M€8@jDY0F€?@_?N3€D@€)@&€?@8BX€0@?L€8@hEY)[#€?@S@[°@I€E@,92&€@@R@V/€9@°@(0<ES€@@b@N<€E@=9=€@@`@[€9@fEZ&€@@R@V €0@=€E@19> €@@l@V€9@\0NEd€@@d@Z<€E@3€@@ 9=€)@`@N€9@!€0@VF_)T€@@C°@A[k€F@:L€A@aAZ€:@_0BF_°@€A@WA[L€F@*:=€A@xA_€:@`FV€A@fANG€F@%€A@ :J&€0@SAM€:@Y0FF_€A@€F@4AS€)@:FI€A@-AZ €:@'€0@EGV)Y€A@N°@%BVN€G@*;L€B@f0@BR'€;@6°@G[€B@ZBNK€G@,;N €B@mBY*€;@NGS €B@XBV:€G@>;F€B@uBM €;@lG[€B@4€0@=BN7€G@9€)@€B@;FwBV€;@jHl5[Al0^A:j.r°@°@p€A@E€>@C!€.@€:@€C@\E]€E@AEs 2tA>t9G°@ƒ!°@T€9@ €E@ €A@ €>@€2@$@g0Z7sC>@€C@€<@€0@€@@B>|@j0^Cr7f@€@@€<@€C@„b5pO|5^>t@€S@M[€<@€Q@Ly€O@Jh€5@€M@€>@Hq€<@€5@€L@Gq€J@ Et€H@ Ct€G@Af€E@ @l€C@ >l€A@<\€@@ ;f €>@9\ €<@7b €;@5d €9@ 4G€7@ 2\€5@ €4@0V€2@/[€0@-\€/@ +[ €-@ )5 €+@ €)@ƒ09y]€9@<9€<@M5C9L €9@<89€5@€<@€9@Q:^€:@>J5L:Lr>c€>@Ac€A@Ce€C@1€>@ €5@7€:@AC9J>@5C!Ct€A@)D\)€C@E €D@ƒ8€5@ €>@€9@3€E@<70@8<8CyV€<@ €@@€7@#€C@pC@J7B|€<@F€>@|wA|€>@W€A@>mI€C@ €>@!AyCm€A@J€C@AaM€A@(C|€@@j€<@ E|€7@€C@O€E@ CZb€C@E|{H|(€E@K€H@ESi€E@H|zJ<[AS9O€H@PHq€J@€<@€A@€9@;€H@JzM,€J@B€M@ Jq]€J@MyOt!€M@:€O@MfR€M@/OnQq€O@k5H>F:I€Q@OY€O@$Qt]€Q@ TtxVl!€T@eY| €V@€Y@J[tx€[@€5@€>@$€:@;5B>=[t9H%\f2€[@]d€\@ƒM€]@`y€>@ €5@€9@Z[l @<"€`@ \\)€[@] €\@ €<@€@@€7@~€]@@7[t‡J€[@OXg€X@YlXq)€Y@MT*$€X@C€T@"O1@€O@.M\sLl€M@\Hl-€L@C€H@C;b€C@AqZ€@@€A@€7@@y €<@h€@@]@J€<@>L >$7F:JƒA:F=€>@6€:@0A€>@Cy0€A@R€C@€:@€7@9FLA‚c<%)€<@CD€A@E€D@!€E@ >€A@@€>@;7I@Cy €<@e€@@:J€7@€>@€:@%€<@A ::7J>Mƒ-€A@ <}€<@>y|A€>@^:\ €A@€>@€:@0€7@€:@Cy!9IX€J@3M|€M@vOt€O@MtY€M@[Oy"€>@€A@P^&€O@ Qy €P@7I@CS:I5=$`t&€^@ƒ}€`@^t^€^@[`}[€`@h`n[b<€[@^C \S)€^@[R2€\@"Yb€`@€[@E€Y@ V}hTv€V@6€>@€5@.€:@e€T@A@9JBHtn€5@€>@€:@Jx€H@4€J@>C5L9JM„/€>@%€M@€5@HU€9@>7L>IZ€_@ `x\]_ €\@bYq&€]@€`@+€Y@ TmO€T@0RxYV0€Y@€A@$€>@€R@M\€:@7€M@#>M9<PtACYt:Qe €P@ƒ$€Y@9€Q@Y\Tq€A@F€9@€>@&PxC5V°@Q|JpM°@‚C€5@€.@6€>@Tf€Q@€J@97X@HOp0GHl%€T@.°@°@~€@@K€H@6€O@<`^€7@€<@T€0@Z€T@V]€V@,f OvW°@°@3P1€O@€W@rMhVlr€V@8^€M@e€,@ZTxKvP€T@€K@t€8@"€3@,^K|T|*€T@€K@3B(RvP8[€R@€,@ €3@Z€8@`P|U€P@,0X :fTxHpMl°@A_MwA°@_€M@ €A@D€M@€:@€H@€T@€0@l@MLb€L@€@@ >LJe€J@€>@>UJh9€>@€J@lLJh|€J@€>@|'QI€M@€O@€A@€Q@TI€T@;YhAO<[Tl5FQO°@b€T@€A@€Q@€Y@€<@ €5@ÿ/MTrk ¢ÿBASS±x± @±[±]Á%±@á@‚S‘{ž@»f‘iƒb@‘iƒ`@‘iƒb@‘iƒ`@‘iƒ`@‘iƒ^@‘iƒ^@‘iƒa@‘iƒb@‘iƒ^@‘iƒ]@‘iƒd@‘iƒ`@‘iƒ^@‘r…S‘$ig@ ‘!i$@m‘s‘$i”$@I‘$iw$@‘&ix‘i&@‡ @ ‘!i…!@A‘!iX!@‘"i…"@?‘"ix‘$i "@m‘&i$@…7&@‘$i3$@=‘$i” $@F‘$ix‘&i$@]‘i&@„S@k‘ip‘!i @„W!@n‘!ip‘"i!@…"@C‘"ip"@‘$iƒ$@L‘$ix‘&i$@G&@!‘!id!@‘"ix‘i"@„d@e‘iq‘!i@„L!@v‘!ip‘"i!@„o"@R‘"ip‘$i"@„2$@‘if@‘$ix‘"i/$@I‘ i"@„6 @‘ iI @(‘ i„q @_‘ ix‘"i @Y‘$i"@…7$@x‘$i†H‘"i‘!i$@a‘i!@"@µJ@G‘)mi)@‘+kx‘0i+@c‘2i0@^‘)k%2@1)@"‘+kx‘+@„?@ ‘ip‘!i#@„!!@ ‘!ip‘"i!@„P"@‘"ix‘$i+"@M‘&i$@…I‘$i%&@.$@‘$i‡)$@‘$i…$@M‘$i„q$@_‘$ix‘&i$@I&@‘ix‘!i@j‘i!@„o@G‘iy‘i!@X‘!i@„I!@h‘!ir‘"i!@…"@=‘"iy‘$i"@_‘&i$@…6‘$i&@1$@-‘$i‡$@0‘$iƒH$@‘$i‡$@*‘$iy‘&i$@A&@‘!iu!@‘"iy‘i"@„G@r‘is‘!i@„H!@g‘!is‘"i!@„b"@R‘"is‘$i"@…$@‘!iy‘"i*!@N‘i"@„R@p‘im‘!i3@„(!@|‘!ih‘"i!!@„I"@l‘"ik‘$i+"@„F$@^‘$ix‘"i$@_‘ i2"@„) @z‘ ik‘ i @„z @R‘ iy‘"i @_‘$i"@†e$@D‘$i…%$@*‘$iF$@,‘$i… $@C‘$iX$@‘$iƒ5$@)‘$i‚c‘"i‘!i<‘i"@$@‘2!@@¥ @°‘iƒV@ƒk‘iƒH@ƒy‘iƒ)@„‘iƒ&@„‘iƒN@ƒq‘lƒs@ƒM‘iƒh@ƒW‘i„ @ƒ2‘lƒ@ƒ@‘i„@ƒ'‘n„@ƒ/‘q„.@ƒ‘n„@ƒ,‘n„@Ñi„{@U‘ix‘i'@Q‘!i3@„V!@G‘!ip‘"i!@„A"@x‘"ix‘$i"@Q$@‘&i…J&@‘$k2$@>‘$i”$@I‘$iw$@‘&i{‘i&@‡#@ ‘!i…!@A‘!iX!@‘"i…"@@‘"ix‘$i "@m‘&i$@…7&@‘$i3$@=‘$i” $@F‘$ix‘&i$@]‘i&@„S@j‘iq‘!i @„X!@m‘!iq‘"i!@… "@B‘"ip"@‘$iƒ$@M‘$ix‘&i$@G&@ ‘!id!@‘"ix‘i"@„d@f‘iq‘!i@„L!@u‘!ip‘"i!@„o"@R‘"iq‘$i"@„3$@‘if@‘$ix‘"i/$@J‘ i"@„7 @‘ iI @(‘ i„q @_‘ ix‘"i @Y‘$i"@…7$@‘$iC$@-‘$i‡<$@‘o„E@ ‘im@‘!i„D!@ ‘!ip‘"i!@„P"@‘"ix‘$i+"@M‘&i$@…J‘$i$&@/$@‘$i‡)$@‘$i…$@N‘$i„q$@_‘$ix‘&i$@I&@‘ix‘!i@j‘i!@„o@G‘ix‘i"@V‘!i@„H!@k‘!ip‘"i!@…"@=‘"ix‘$i"@`‘&i$@…9‘$i&@2$@-‘$i‡$@0‘$iƒH$@‘$i‡$@&‘$ix‘&i $@@&@‘!iu!@‘"ix‘i"@„F@w‘ip‘!i @„E!@k‘!ip‘"i!@„_"@U‘"ip‘$i"@…$@!‘!ix‘"i+!@M‘i"@„R@n‘ik@‘!i„[!@u‘!ip‘"i!@„Q"@f‘"ik"@‘$i„q$@_‘$ix‘"i$@]‘ i4"@„' @u‘ ip‘ i @„ @P‘ ix‘"i @^‘$i"@†e$@D‘$i…%$@+‘$iF$@*‘$i… $@D‘$iX$@‘$iƒ5$@+‘$iƒP$@‘ƒ @ÿ/MTrkNÿOBOE OF MYSTERY²² â@ÂD²[d²]²@…Ç4’Mn²²âB² ² ² ²² ² ² ² âC² ² ² ²âD²² ²â E²²â F² ²âG²²âH ² ²âI² ²² âJ²!²" ²#âK ²$²%âL ²&²'âM ²(²)²*âN ²+²,âO ²- â P².â"Q²/ ²0â$R ²1â&S ²2â(T ²3â*U ²4 â,V²5 â.W ²6 â0X ²7 â2Y²8â4Z²9â6[²: â8\â:]²; â<^ â>_²< â@` âBa²=âDb âFcâHd²>âJe âLf²?âNg âPhâRi²@ âTj âVk²AâXl âZm â\n²Bâ^o â`pâbq âdrâfs²Câhtâju âlv²Dânwâpx âryâtz²Eâv{ âx| âz}â|~²Fâ~"²G%²H"²I*²J,²K(²L%²MN²NL²Od²Pf²QQ²RW²S0²Ts²U‚P²T%²S,²R"²Qâ|~²Pâz}âx|²Oâv{²N âtzâryâpx ânw²Mâlvâju âht âfs âdrâbq â`p²L â^o â\n âZm âXl âVkâTj²KâRi âPhâNgâLf âJe²J âHd âFcâDb âBa â@`²Iâ>_ â<^ â:] â8\²Hâ6[â4Zâ2Y â0X â.W²Gâ,V â*U â(T â&S â$R â"Q²Fâ P âO âNâM âL²E âK âJâIâH²DâGâ F²C â EâDâC²B,âB ²A/²@4²? â@'²>â@G²=a²_²2â@`²3âBaâDb²4âFc²5âHdâJe²6 âLf²7âNg²8âPh âRi²9âTj²:âVk²;âXlâZm ²<â\n â^o²= ²>â`p âbq²? âdr²@âfs ²Aâht²Bâjuâlv²Cânwâpx²D âryâtz²E ²Fâv{²G âx|²Hâz} ²Iâ~²J²K²L²M²N²O"²P#²Q²R'²S*²T"²U ²V"²W²X ²Y"²Z²[²\ ²]²^"²_,²`%²a²b²c²d²e²f²g²h²i*²j,²k?âz}²jâx|âv{âtzâry²iâpxânwâlvâju²hâhtâfs²gâbq â`p²fâ^o â\nâZm²eâXl²dâTj âRi²c ²bâPhâNg²aâLfâJe âHdâFc²`âDb âBaâ@`²_â>_â<^ â:]â8\â6[²^â4Zâ2Y â0X â.W²]â,V â*Uâ(T²\ â&S â$R²[â"Qâ PâO²ZâN âM âL²YâKâJ âI âH²XâG â Fâ E²WâD âC²VâBâ@²U²T²S²R²Q"²Pâ@²O"²N%²M-²L'²K7²J7²I7²H-²G$²F ²E'²D2²C2²B<²A<²@=²?'²>B²=<²ã=ã;ã:ã8ã7ã5ã3ã1ã/ã-ã*ã(ã&ã#ã!ãããããããã ã ããƒ0@ããã*ããã<ã"Qãtzã~ãtzã6[ã@ã-ã"ã/ã@ã&SãRi ã,Vã@ã:ã9ã@ãHã.Wã,VãBã@ã EãMã Fã@ ã EãDã@ ã@ã@¹0³]“)e†e“+d*ƒ)@A“-aƒ+@‡“.Xƒ-@†l“0O,ƒ.@#“2e(ƒ0@…“0\*ƒ2@3ƒ0@<“0b“oã@ã=ã;ã9ã7ã5ã3ã1ã/ã-ã+ã)ã&ã$ã"ã ãããããƒ0@ã ã ããã/ããã'ã@ãOã>_ã4ZãBã@ãCãO ãBã@ ãGã Fã@ãDã@“)d‡“-eƒ)@‡2“._ ƒ-@… ƒ.@+“.X“0aƒ.@A“2a'ƒ0@… “0_%ƒ2@,ƒ0@<“0eŠVã@ã<ã8ã4 ã=ã@ãKã"Qã Fã@ã EãGã@ãCã@ƒã=ã8ã2ã,ã'ã$ã,ã@ãIã8\ã@`ãLã@ã>ã@ãBãOã Pã@ã@ ã@ãHãDã@ ã@ãCã@„nã@ã>ã<ã;ã:ã8ã7ã5ã3ã2ã/ã-ã*ã(ã%ã"ããƒ0@ãããã ããã ããã6ãCã,Vã:]ãNã@M“+j‡O“-bƒ+@‡“.\ ƒ-@‡ “0bƒ.@„Hã@ã>ã=ã<ã;ã:ã9 ã8 ã7ã6ã5ã4ã3ã2ã1ã0 ã.ã-ã,ã+ã*ã)ã'ã&ã%ã$ã"ã!ããããããããããã ããããƒ0@#ããã'ã@ãNã<^ã6[ãBã@ãCã"Q“+dãDã@ ã FãGã@ ã@ãCã@‡“-d ƒ+@‡/“.X+ƒ-@‡“0bƒ.@„]ã@ã>ã= ã< ã;ã: ã9ã8 ã7ã6ã5 ã3ã2 ã1ã0ã/ã.ã-ã,ã+ã*ã)ã(ã&ã%ã$ã#ã!ã ãããããããããããã ã ã ããƒ0@ã7ããã1ã@ã(Tã@`ã,Vã@ã@ “,nãM ã@ãGã Fã@ãDã@Ž,“0dƒ,@’ ƒ0@K“0_‡,ƒ0@!“0BƒVƒ0@„£=³V“,d(“0iƒ,@Ž1ƒ0@1“)e†e“+d*ƒ)@A“-aƒ+@‡“.Xƒ-@†l“0O,ƒ.@#“2e(ƒ0@…“0\*ƒ2@3ƒ0@<“0b“oã@ã=ã;ã9ã7ã5ã3ã1ã/ã-ã+ã)ã&ã$ã"ã ãããããƒ0@ã ã ããã/ããã'ã@ãOã>_ã4ZãBã@ãCãO ãBã@ ãGã Fã@ãDã@“)d‡“-eƒ)@‡2“._ ƒ-@… ƒ.@+“.X“0aƒ.@A“2a'ƒ0@… “0_%ƒ2@,ƒ0@<“0eŠVã@ã<ã8ã4 ã=ã@ãKã"Qã Fã@ã EãGã@ãCã@ƒã=ã8ã2ã,ã'ã$ã,ã@ãIã8\ã@`ãLã@ã>ã@ãBãOã Pã@ã@ ã@ãHãDã@ ã@ãCã@„Pã@ã>ã<ã;ã:ã8ã7ã5ã3ã2ã/ã-ã*ã(ã%ã"ãããããã ããƒ0@ã ããã6ãCã,Vã:]ãNã@M“+j‡O“-bƒ+@‡“.\ ƒ-@‡ “0bƒ.@„Hã@ã>ã=ã<ã;ã:ã9 ã8 ã7ã6ã5ã4ã3ã2ã1ã0 ã.ã-ã,ã+ã*ã)ã'ã&ã%ã$ã"ã!ããããããããããã ããããƒ0@#ããã'ã@ãNã<^ã6[ãBã@ãCã"Q“+dãDã@ ã FãGã@ ã@ãCã@‡“-d ƒ+@‡/“.X+ƒ-@‡“0bƒ.@„]ã@ã>ã= ã< ã;ã: ã9ã8 ã7ã6ã5 ã3ã2 ã1ã0ã/ã.ã-ã,ã+ã*ã)ã(ã&ã%ã$ã#ã!ã ãããããããããããã ã ã ããƒ0@ã7ããã1ã@ã(Tã@`ã,Vã@ã@ “,nãM ã@ãGã Fã@ãDã@Ž,“0dƒ,@’ ƒ0@K“0_‡,ƒ0@!“0BƒE“0j“)v ƒ0@‚Fƒ0@ƒ)@ÿ/MTrk ›ÿ GUITAR LEADä@´_´ ]´[P´]/Ä´@‚Ñä@§G”Hp”Mq„H@f„M@”OmP”M\*„O@A„M@”H_>”MT„H@d”Qi„M@M”M_„Q@@„M@”H_F”M_„H@\„M@”O^_”M\ „O@F„M@ ”H\/”MS„H@a”QM„M@T”MX„Q@M„M@”H_9”MT„H@h”OX„M@R”M\%„O@P„M@”Hd>”M_„H@d„M@”QbP”MW„Q@K„M@”H[7”M_„H@^”O_„M@U”M\„O@K„M@”HV7”MW „H@U„M@”Q^R”M_„Q@W„M@”H^D”MM„H@_”Oi„M@_”MS„O@”HW „M@R”M\„H@h”Q_„M@W”Mb#„Q@M”Hd „M@9”MV9„H@9”Rw„M@cä@äC äDä Eä FäHäIäKäMä Pä&Sä.Wä6[ä>_äFcäNgäTjä\nädrälväryäv{äz}ä~ƒ0´IR´Hv´G[´F´Ea´D<´C\´A7´@7´?<´>-´=7´L´@T´Ba´D<´ET´F‚´G%´H<´I\´J‚r´K…´J¨O”Cxv”Ei„C@|„E@5ä>ä<ä9ä6ä3ä0ä-ä*ä'ä%ä"”Fqääääää ääääää ä#ä(ä.ä3ä9ä>ä@y”J_"„F@~”Hm#„J@Q„H@4”Aq‚U„A@”C^‚<”E_„C@„E@*ä@ä<ä:ä8ä6ä4ä2ä0ä/ä-ä,ä*ä)ä(”Eqä&ä%ä$ ä#ä"ä!ä"ä#ä$ä&ä'ä)ä,ä/ä3ä8ä<ä@‚p”H[„E@^”CX„H@…1„C@&”JqX”Ld „J@„L@ ä=ä:ä8ä5ä2ä/ä,ä)ä'ä$ä"ä ”Mmää ääää ä#ä&ä*ä-ä0ä3ä5ä7ä:ä<ä@ ä@‚”Ld4„M@L”Jq*„L@‚„J@ ”Hd‚_”Fq%„H@‚ ”E_,„F@„E@#ä>ä;ä9ä7ä5ä3ä2ä0ä/ä.ä- ä, ”Emä-ä.ä/ä1ä3ä5ä7ä:ä=ä@ƒ)”H\„E@Q„H@”CW…R„C@ƒj”3m”,m„,@ „3@ ”7_ ”0_œ[„0@„7@„¸ä@Š%”Rwä@äC äDä Eä FäHäIäKäMä Pä&Sä.Wä6[ä>_äFcäNgäTjä\nädrälväryäv{äz}ä~š<ä|~äz} äx|äv{ätzäryäpxänw älväjuähtäfs ädräbq ä`p ä\n äZmäXläVkäTjäRiäPhäLfäJeäHd„R@äDbä@`ä<^ä:]ä6[ä4Zä0Xä.Wä,Vä(Tä&Sä"Qä PäOäNäLäKäJäI äHäGä Fä EäDäCäBä@ä@Æ”Can”Ei„C@„E@5ä>ä<ä9ä6ä3ä0ä-ä*ä'ä%ä"”Fqääääää ääääää ä#ä(ä.ä3ä9ä>ä@y”J_"„F@~”Hm#„J@Q„H@4”Aq‚U„A@”C^‚<”E_„C@„E@*ä@ä<ä:ä8ä6ä4ä2ä0ä/ä-ä,ä*ä)ä(”Eqä&ä%ä$ ä#ä"ä!ä"ä#ä$ä&ä'ä)ä,ä/ä3ä8ä<ä@‚p”H[„E@^”CX„H@…1„C@&”JqX”Ld „J@„L@ ä=ä:ä8ä5ä2ä/ä,ä)ä'ä$ä"ä ”Mmää ääää ä#ä&ä*ä-ä0ä3ä5ä7ä:ä<ä@ ä@‚”Ld4„M@L”Jq*„L@‚„J@ ”Hd‚_”Fq%„H@‚ ”E_,„F@„E@#ä>ä;ä9ä7ä5ä3ä2ä0ä/ä.ä- ä, ”Emä-ä.ä/ä1ä3ä5ä7ä:ä=ä@ƒ)”H\„E@Q„H@”CW…R„C@ƒj”3m”,m„,@ „3@ ”7_ ”0_œ[„0@„7@ÿ/MTrkîÿ ORCH HITSµ Å7µnµ[Aµ]µ@å@ƒ9µ µ  µ µ  µ  µ µ  µ #*µ " µ µ µ µ µ µ µ ™8•0\•Hk•>n•2x•Jµ •4sµ µ µ …H@µ µ …0@µ µ $µ -•Lµ 7µ Bµ L•@xµ Wµ aµ iµ p…2@µ vµ {…>@•5sµ …J@•Mx•A …4@>…L@…@@…5@…M@u…A@‚§Dµ ~%µ y µ x1µ yµ ~ µ Ž3•x µ }µ xµ s µ nµ i •@{µ dµ _µ Z …<@µ U µ Pµ Kµ Fµ >…>@µ 6µ /µ 'µ µ µ •Aµ µ µ µ '…@@o…A@…‰µ @•5s•Mx•Ad…5@…M@u…A@ƒX•s<•@|.…<@,…>@•A4…@@‚…A@ÿ/MTrkPÿFRETLESS BASS LEADæ@Æ#¶U¶ P¶[¶]W¶@„ÿDæ@G–)‚U†)@ –0{‚8–5v†0@†5@–7~Zæ@ æBæC æD æ Eæ F æG æHæI æJæKæLæMæN æOæ Pæ"Qæ$Ræ&Sæ(T æ,V æ.Wæ0X æ2Y æ4Zæ6[Fæ8\,æ:]Jæ8\ æ6[ æ4Zæ2Yæ.Wæ*Uæ&Sæ"QæNæKæIæ FæDæ@æ@M–1a4†7@*†1@)–1~—†1@Ž–5æ@æBæC æ Eæ FæGæHæIæKæMæOæ$Ræ*Uæ0Xæ8\æDbæRiæ`pæryæ~Qæ|~æpxædræVkæFcæ6[æ&SæLæ Fæ@‚–3v'†5@D†3@@–3o‚J–.f"†3@Q†.@n–.{T†.@!–.dPæBæC æD æ FæGæHæIæJæKæLæMæNæ Pæ"Qæ&Sæ*Uæ.Wæ4Zæ8\æ@`æHdæPhæXlæ`pæhtælværyæv{æx|æ|~æ~œ!æz}ælvæ\næDbæMæ@æJæOæCæ@æ Fæ@æCæ@8†.@”|–5t‚i†5@–<{‚.†<@ –Ao?†A@)æ>æ;æ8æ5æ2æ/æ,æ)æ&æ#æ ææææææ–D{ææææ æ æææææææææ æ#æ&æ*æ-æ0æ3æ5æ7æ8æ:æ<æ=æ@æ@„-–Fo†D@‚–=j †F@’"–:i †=@æBæCæDæ E æ FæG æH æIæK æMæNæ Pæ&Sæ.Wæ6[æBaæNgæ\næfsæpxæx|æ~‚(æ|~æpxæ`pæNgæ<^æ,VæMæ@ æBæ@Œ†:@C–:o}–At †:@æB æC æ Eæ FæGæHæJæLæNæ"Qæ*Uæ4Zæ>_æJeæVkæ`pælvæv{æ~‚æryæbqæRiæ>_æ,VæLæ@æ@p–?j'†A@<†?@H–?v‚\–:g†?@‚-–æ;æ9æ7æ5æ2æ0æ.æ,æ*æ(–0fæ' æ&†5@æ'æ(æ*æ-æ0æ3æ7æ;æ@æ@9–)g†0@Œ1æ@æ<æ9æ6æ2æ.æ)æ%æ"ææ–0f†)@ææææ ææææææ æ$æ(æ-æ3æ9æ@æ@–5f †0@Œ'æ@æ<æ9æ7æ4æ0æ-æ*æ&–0jæ#†5@æ æææææ ææææææ!æ%æ)æ.æ3æ9æ>æ@–)a†0@Œ'æ>æ;æ8æ5æ2æ/æ,æ(æ%æ#æ æææææ†)@–0iæ æææææææææ#æ&æ+æ0æ6æ;æ@æ@–5g†0@Œ4æ=æ:æ6æ3æ/æ,æ'–0iæ$æ"æ †5@ææææææææææ!æ$æ'æ,æ1æ6æ;æ@%†0@–)fŽq†)@ÿ/MTrk—ÿ16TH NOTE MIDDLE SECTION· A·A·[U·]#Ç`·@ç@„ß· Š=—A{x—Hh‡A@%‡H@K—Mh:‡M@>—Tw1‡T@G—Vn,‡V@L—Mr%‡M@S—Hn1‡H@G—[h!· ~+‡[@· }—Y_@‡Y@· x%—T`<‡T@ · s3—Hh(‡H@· n7—`{a‡`@ · i —YS2‡Y@F—A\&· e‡A@.· d—gr@‡g@8—Y,—[‡[@‡Y@· _M—ehC‡e@,· Z —`c1‡`@· Y9—Y`/‡Y@I—H\'‡H@· T<—Th· S‡T@L—O\$‡O@· P<—M_ · O‡M@· N3—[h"· M‡[@0· L—YW'‡Y@7· J—H`$· I‡H@M—Te ‡T@X—Me· D‡M@K—Vn(‡V@P—M`· ?‡M@S· =—He+‡H@· <9—Ac)· :‡A@B· 9—Ph*‡P@,· 8"—Me!· 7 ‡M@9· 6—A_/‡A@I—Un?· 1‡U@7—P]· 0"‡P@@· /—I`)‡I@· .A—WhC‡W@5—U\<· )‡U@8—Pe· (%‡P@@· & —KW4‡K@· %/—^{ · $'‡^@#· #$—\K'· "‡\@B· !—YW.‡Y@· 1—Ue· ‡U@Q—IT· ‡I@J—Pe‡P@]—W_ · ‡W@2· $—K\· ‡K@L· —c"‡c@· 7—IP$· ‡I@N—Y`· ,‡Y@$·  —\r#‡\@*· +—er(‡e@· ?—K\*‡K@· K—ch'‡c@· ?—a]· 0‡a@· 9—YT8‡Y@9· —I`4‡I@· <—Ue/‡U@I—K`"·  ‡K@)· "—PT1‡P@· .—Y]/‡Y@;· —Wr9‡W@?—K`6‡K@B—OW· .‡O@9—[\7‡[@A—Ye9‡Y@?—FW7‡F@A—Rh3‡R@E—^n$‡^@T—Kh4‡K@9·  —cr&‡c@O· —?h2‡?@· *—YK· ‡Y@C—^h· &‡^@7· —Kr0‡K@.· —W]1‡W@· !C· "—[W/‡[@>· # —F`4‡F@3· $—Wh2‡W@· %F—RT'‡R@M· )—Kn4‡K@· *?—M`(‡M@P—M_-‡M@· /G—We/‡W@I—R\· 4 ‡R@Z—F\0‡F@!· 9'—OK-‡O@K—YT· >*‡Y@=—K\.‡K@· C3—Wn,‡W@L—M\· H‡M@J—^e2‡^@· M'—TT‡T@Z—An*· R ‡A@B—T\&‡T@R—`h· W‡`@0· X—HT-‡H@K—Y`!‡Y@*· ]-—g{)‡g@O—M>.‡M@· b+—en/· d‡e@B—`_· e-‡`@· f8—Y\5‡Y@!· g"—He7‡H@A—Tn$‡T@· hK· i—Me:‡M@· j$—Oh· k‡O@G—Te;‡T@-· o—Ah;‡A@ · p/· q—MW4‡M@· r4—T\ · s.‡T@@—Hn2‡H@F—OK· x‡O@E—Ye@‡Y@ · |/—M\<‡M@/· } —TW:‡T@0· ~—[r0‡[@H—H]· ‡H@B—lw*‡l@F—MW:‡M@>—gh;‡g@=—`]2‡`@F—[W>‡[@:—HW6‡H@B—[h.‡[@J—A\ · ~6‡A@· }-—Yc8‡Y@· x.—T\.· s‡T@B—H\· n‡H@?—ON9‡O@· i:—Tc6‡T@(· d—MW7‡M@A—O?· _2‡O@@—Ye5· Z‡Y@=—H`3‡H@E—TT· U‡T@D—`n@‡`@ · P-—MW4‡M@D—[`· K‡[@F—A_:· F ‡A@5—Y\· D4‡Y@ · C5—eh/‡e@I—H` · >-‡H@?—[\<· 9‡[@8—`\'‡`@+· 4&—MWA‡M@$· /—Y`.‡Y@J—O`· *"‡O@:—[N—Y`!‡Y@‡[@D· & —TG4‡T@· %&—QW· $!‡Q@:—Y`J‡Y@.—TW · %‡T@· *—M`· ,‡M@· —Th2‡T@F—H]0‡H@;·  —Ue?‡U@9—A`=· ‡A@)—MT· ,‡M@ · 8—Wh· +‡W@· "—IT$·  ‡I@G—MW · ‡M@*· —Pe6· ‡P@5—K\· 3‡K@=—U\/‡U@· 1· —IS)‡I@ · /—^r-· ‡^@3—\G(‡\@P—K`· &‡K@D—cw5‡c@C—ah7‡a@A—I`2‡I@F—YWD‡Y@4—ak'‡a@Q—A\7‡A@A—Ue*‡U@N—^`,· ‡^@<· —IP1‡I@ · '—\r'· ‡\@I—US· (‡U@J—K_5‡K@· +—P?3‡P@E—YW1·  ‡Y@· —I\;‡I@· %—WwC‡W@5—K_· 1· ‡K@=· —PW6‡P@· !9· "—U]7‡U@· #?—?hB‡?@6—OK$· ( ‡O@)· ) —Wh· *‡W@@—Kh· +‡K@6· , —R]· -‡R@8· .—YW=· /‡Y@5—F`>‡F@:—Wh‡W@· 4.· 5—Ke'· 6‡K@@· 7 —^c2‡^@· 81—Y\1‡Y@G—OW#· <‡O@=· =—cn'‡c@;· >—Re"‡R@ · ?K—[N· A‡[@.· B—j{‡j@· CF· D—Ah;· E‡A@9—lh+‡l@M—jk· I*‡j@&· J$—M]· K‡M@.· L—`T,‡`@L—je'‡j@!· Q0—Kh/‡K@I—c`1· V‡c@D—^M4‡^@ · Y9—KW· Z‡K@· [5—YG· \1‡Y@9—^`*‡^@D· ` —FT<‡F@· a'—Re5‡R@C—?\· f!‡?@G—WW· h3‡W@ · i9—A`G‡A@1—MN· n‡M@L—T`2‡T@D· s—HW*‡H@ · tA· u—M6‡M@Z—YeF‡Y@· z —MN4‡M@· }.—TN· ~‡T@K—[n·  ‡[@B—H_.‡H@J—TW8‡T@@—Ye4‡Y@D—M\/‡M@I—`rL‡`@· ~—Tc7· y‡T@'· t—Ah· o'· j‡A@'· e—^r*· `‡^@M—IW· [‡I@T—U] · V+‡U@B—^e&· Q‡^@B—NW3‡N@E—\\· L‡\@K—Z_-‡Z@K—P\· G0‡P@/· E—U\.· D‡U@/· C—IK-· B‡I@I—cn7‡c@A—R] · =‡R@Q—a{5· : ‡a@8—^c · 9,‡^@A—PW· 6‡P@(· 5—ZN(‡Z@P—]Z‡]@?· 0—C> ‡C@· /M· . —V\7· -‡V@-· , —b{1‡b@· +E—OP(‡O@P—_k· '/‡_@&· &!—]_"· %‡]@H—V]4‡V@D—JW· ‡J@F—Q\3‡Q@E—V_· $‡V@=—OW9‡O@ · —Sh@‡S@8—J\/· ‡J@G—O`C‡O@5—CT· ‡C@C· —Wk;· ‡W@1—RW8‡R@ · · —DW#· ‡D@3·  —PP8‡P@%· —W_/‡W@I—KW6‡K@B—\h@‡\@· '—PG!· ‡P@9· —cr.‡c@· 7—\T· ‡\@· 8—KT*‡K@ · A—^h.‡^@· $;—PS,‡P@ · )?—Wh<‡W@ · .1—D\;‡D@=—W6· 3#‡W@?—]]-‡]@· 8=—QG.‡Q@=· = —XW8‡X@@—an7· A‡a@(—LW7‡L@ · B8—_h4‡_@D—]c3· G‡]@B—QW4‡Q@· H5—dn· I.‡d@(· J—Xe*‡X@· K2—L\2‡L@1· L—ir#‡i@U—hk· O‡h@?· P—QN;‡Q@· Q:—_S?‡_@· T2—E]· U"‡E@!· V&—^c-‡^@K—FK!· [‡F@S—YP· `"‡Y@9—bh· e6‡b@.· j—RWB‡R@· o —V]3‡V@· tA—^` · y,‡^@,· ~—M_8‡M@· '—TT;‡T@=—V_=‡V@;—R0‡R@[—R]6‡R@B—MM1‡M@:· ~ —F\9‡F@ · y2—Vn· t,‡V@ · o@· j—Ye&‡Y@-· e%—Z{(‡Z@· `K—G\· [1‡G@E—SN · V1‡S@>—Zk-‡Z@· Q=—N\/‡N@I—Uh · L.‡U@@—Wr'· G ‡W@D—S>8· B ‡S@4—_`5‡_@· >-—G\/‡G@"· ='—^{1‡^@G—Uh4‡U@D—NWC‡N@5—S`?‡S@9—Uh6‡U@B—G\1‡G@G—YhO‡Y@ÿ/MTrkÈÿBELL PAD PIANO DOUBLEÈf¸K¸ Z¸[ ¸]F¸@è@Š)˜O]OˆO@3˜QKyˆQ@˜RS‚dˆR@ ˜VM‚2ˆV@˜TTDˆT@d˜MT‚KˆM@˜OZ‚-ˆO@˜QMˆQ@˜QMƒGˆQ@˜TEgˆT@˜OP…ˆO@*˜VGrˆV@˜XK]ˆX@˜Yi‚n˜X] ˆY@‚ˆX@ ˜VPJˆV@f˜TT‚-ˆT@M˜RS.ˆR@˜QH!ˆQ@˜QHƒQˆQ@˜TNXˆT@(˜OD‚ˆO@ƒ*˜TwtˆT@˜Vb.ˆV@M˜WQ‚#ˆW@K˜VV‚ˆV@˜TMEˆT@p˜TP‚WˆT@ ˜RYbˆR@K˜PVˆP@˜Ti˜Y‚-ˆY@S˜XrwˆX@>˜VnLˆV@]˜V{‚2ˆV@˜Tr‚ ˆT@!˜R`kˆR@9˜[~‚iˆ[@˜Yw‚ˆY@˜X]IˆX@o˜Xh‚:ˆX@˜Vn‚+ˆV@˜T]'ˆT@‚ˆT@%˜Y]ˆY@ÿ/MTrkbÿLASER(timpani) º Ê/ºLº[#º]º@ê@‘TšxkŠx@šwkŠw@švlŠv@šueŠu@štpŠt@šshŠs@šrvŠr@šqnŠq@š|pŠ|@š{rŠ{@šzlŠz@šyrŠy@šxlŠx@šwlŠw@švlŠv@šu`Šu@štpŠt@šshŠs@šrvŠr@šqpŠq@šplŠp@šopŠo@šnkŠn@šmtŠm@šlpŠl@škkŠk@šjpŠj@šikŠi@šhpŠh@šgkŠg@šfrŠf@šepŠe@º šdrŠd@šcpŠc@šblº  Šb@šalŠa@š`nº Š`@š_lŠ_@š^p º Š^@š]hŠ]@š\rŠ\@š[hº Š[@šZlŠZ@šYrº  ŠY@šXkŠX@šWp º ŠW@šVrŠV@šUp º ŠU@šTrŠT@šSlŠS@šRrº  ŠR@šQkŠQ@šPpº  ŠP@šOkŠO@šNp º ŠN@šMpŠM@šLkº !ŠL@šKlŠK@šJkŠJ@šIpº $ ŠI@šHrŠH@šGpº 'ŠG@šFpŠF@šEl º *ŠE@šDvŠD@šClŠC@º -šBpŠB@šAnŠA@š@lº 0 Š@@š?vŠ?@š>lº 3Š>@š=rŠ=@šlº 3Š>@š=rŠ=@šlº 3Š>@š=rŠ=@š6›:H5‹<@‹9@‡›98‹:@„H‹9@H›<9›@T›7)2‹>@ ‹A@–f‹7@}›9V ›AY#‹@@ŽE›>b›:b%‹9@‹<@†-‹A@f‹:@›A`›9Q…‹9@_›@‹A@—‹7@W›:T›7Q›>`‹<@‹@@‡ ‹:@(›<`›9Y%‹>@ ‹7@†‹9@h›>e ›59›:V<‹<@…o‹5@r›7<›@V›@†‹7@Z›>Y›70›:W-‹@@‹<@†N‹:@›AT›@‹7@‡%›>V›:Q‹9@‹<@†‹:@H›7!›@b ›@‹A@†+‹7@w›?Y ›8/#‹@@Žc›AQ›7P‹8@#‹?@‡›@<(‹A@† ‹7@K›99 ›AY‹@@'‹9@‹<@‹A@º›V›:V#‹<@ ‹9@‡›9P‹:@„]‹9@R›<<›@W›76<‹>@‹A@–b‹7@›9A›AY2‹@@b‹A@R›>W›A]›:h‹9@‹<@‡‹:@›9G…|›C_,‹A@k‹>@+›@G*›b‹<@5‹@@†d›EA›Ae›<5‹:@‹>@‹C@†‹<@h›>b›:A\‹E@…E‹>@M‹:@Z›CG›@W›<;<‹A@†‹@@ ‹<@Z›>k ›:Y†X‹:@0›E>1›AW›@†?‹A@A›AT ›:G›>f‹<@-‹E@‡ ›CY›@e‹:@›<'#‹>@‹A@†?‹@@i›DW›?fH‹C@Ž›CG›Ab‹D@ ‹?@ŽW›@Y/‹A@Ž,›AV›9 ‹C@&‹@@s›Ac›=T›8G‡ ‹<@‹9@ ‹A@•W‹8@q›?N›:>$‹=@F‹:@›5››B9 ›:H›=VH»@‡*»@„‹B@‹=@‹:@ƒ›CW›;P›>KH»@†I»@ƒl‹>@‹;@ ‹C@„›DT›?T›\»@‡J»@ƒ1‹A@‹F@‹>@ƒK›BW›?P›G\9»@‡»@ƒo‹G@>‹?@‹B@‚a›<\›H_›A]»@Šz‹<@‹A@‹H@¸»H›Ah›6›:H5‹<@‹9@‡›98‹:@„H‹9@H›<9›@T›7)2‹>@ ‹A@–f‹7@}›9V,›AY‹@@Že›>b›:b‹9@‹<@†M‹A@f‹:@›A`›9Q…‹9@_›@‹A@—‹7@W›:T›7Q›>`‹<@‹@@‡ ‹:@(›<`›9Y%‹>@ ‹7@†‹9@h›>e ›59›:V<‹<@…o‹5@r›7<›@V›@†‹7@Z›>Y›70›:W-‹@@‹<@†N‹:@›AT›@‹7@‡%›>V›:Q‹9@‹<@†‹:@H›7!›@b ›@‹A@†+‹7@w›?Y ›8/#‹@@Žc›AQ›7P‹8@#‹?@‡›@<(‹A@† ‹7@K›99›V›:V#‹<@ ‹9@‡›9P‹:@„]‹9@R›<<›@W›76<‹>@‹A@–b‹7@›9A›AY2‹@@b‹A@R›>W›A]›:h‹9@‹<@‡‹:@›9G…|›C_,‹A@k‹>@+›@G*›b%‹<@5‹@@†F›EA›Ae›<5‹:@‹>@2‹C@…r‹<@h›>b›:A\‹E@…E‹>@M‹:@Z›CG›@W›<;<‹A@†‹@@ ‹<@Z›>k ›:Y†X‹:@0›E>1›AW›@†?‹A@A›AT ›:G›>f‹<@-‹E@‡ ›CY›@e‹:@›<'#‹>@‹A@†?‹@@i›DW›?fH‹C@Ž›CG›Ab‹D@ ‹?@ŽW›@Y/‹A@Ž@‹C@›)r›A{›9~ ‹@@‚‹)@‹9@ ‹A@o‹<@ÿ/MTrk—ÿSTRING PIANO DOUBLEý›Co‚›Ef‹C@`›F`%‹E@‚S›Je"‹F@‚›H~‹J@‚‹H@(›Ar‚P›Co‹A@‚›E`*‹C@h‹E@ ›E`ƒ=›He(‹E@[›Ci&‹H@…E›Jo ‹C@I›Li#‹J@J›Mo‹L@‚z›L`/‹M@[›Je%‹L@o›Hi#‹J@‚M›F~+‹H@‚›Ei‹F@`‹E@+›EeƒI›H`‹E@y›Cf‹H@…j›Hh%‹C@8›Ji!‹H@X›Ke‹J@‚\›Jr9‹K@G›Hr7‹J@{‹H@7›Hi‚H›Fi#‹H@‚›Di-‹F@v›Hx‹D@5›JfH‹H@›L`‹J@ ›Mo0‹L@‹M@Ÿa›O`‚ ›Qo‹O@S›Rh‹Q@‚k›Ve‹R@‚ ›TT‹V@j‹T@(›M]‚?›O]‹M@‚›Q] ‹O@‚‹Q@+›Qeƒ.›TT‹Q@y›OS‹T@…;›Vi/‹O@@›Xi'‹V@O›Y`(‹X@‚U›Xe>‹Y@Q›VW2‹X@g›To#‹V@‚r›Ro-‹T@e›Qi%‹R@w‹Q@2›Qhƒ+›T`‹Q@h›O`‹T@…W›Tf‹O@e›Vi#‹T@N›Wn‹V@‚i›Ve,‹W@e›Tu-‹V@o‹T@-›Tf‚U›Rf1‹T@‚›P`‹R@e›T` ‹P@ž‹T@ƒãX›Co‚›Ef‹C@|›F` ‹E@o›Je"‹F@‚›H~‹J@‚‹H@(›Ar‚P›Co‹A@‚›E`*‹C@h‹E@ ›E`ƒ=›He(‹E@[›Ci&‹H@…E›Jo ‹C@I›Li#‹J@J›Mo‹L@‚z›L`/‹M@[›Je%‹L@o›Hi#‹J@‚M›F~+‹H@‚›Ei‹F@`‹E@+›EeƒI›H`‹E@y›Cf‹H@…j›Hh%‹C@8›Ji!‹H@X›Ke‹J@‚\›Jr9‹K@G›Hr7‹J@{‹H@7›Hi‚H›Fi#‹H@‚›Di-‹F@v›Hx‹D@}‹H@åi›O`‚&‹O@D›Qon›Rh‹Q@‚k›Ve‹R@‚ ›TT‹V@j‹T@(›M]‚?›O]‹M@‚›Q] ‹O@‚‹Q@+›Qeƒ.›TT‹Q@y›OS‹T@…;›Vi/‹O@@›Xi'‹V@O›Y`(‹X@‚U›Xe>‹Y@Q›VW2‹X@g›To#‹V@‚r›Ro-‹T@e›Qi%‹R@w‹Q@2›Qhƒ+›T`‹Q@h›O`‹T@…W›Tf‹O@e›Vi#‹T@N›Wn‹V@‚i›Ve,‹W@e›Tu-‹V@o‹T@-›Tf‚U›Rf1‹T@‚›P`‹R@e›T` ‹P@ž‹T@ÿ/MTrkCÿDRUM PATCH AND CTRLS.¹[Kɹd¹ @¹]¹@é@‡Ù¹[PŽ{¹[(ÿ/MTrkÔÿKICK˜T™$i‚;‰$@… ™$i‚‰$@…3™$it‰$@…K™$iq‰$@…L™$iV‰$@…i™$iD‰$@…z™$i?‰$@…™$iR‰$@…n™$id‰$@…\™$iP‰$@…s™$iW‰$@ƒz™$i!‰$@P™$iv‰$@…I™$iX‰$@…j™$iK‰$@…r™$iU‰$@…i™$iL‰$@…u™$iK‰$@„™$iX‰$@‚™$iI‰$@„™$i{‰$@…G™$iZ‰$@…h™$iD‰$@„ ™$iU‰$@‡[™$ii‰$@…Y™$id‰$@…[™$iP‰$@…q™$iN‰$@…o™$iP‰$@¯™$is‰$@l™$ii‰$@v™$iS‰$@‚ ™$i‚$‰$@…™$i{‰$@…G™$is‰$@…O™$ix‰$@…F™$in‰$@…S™$ie‰$@…Y™$ib‰$@…^™$i_‰$@…a™$i]‰$@…a™$ib‰$@…^™$ig‰$@…X™$i`‰$@…b™$iZ‰$@…f™$iN‰$@…r™$iM‰$@…q™$iN‰$@…s™$i]‰$@…b™$iS‰$@…k™$ib‰$@…_™$iW‰$@…g™$iZ‰$@…f™$iS‰$@…m™$iZ‰$@…g™$iW‰$@…l™$iZ‰$@…h™$iI‰$@…v™$iU‰$@…j™$iX‰$@…e™$i‰$@‚ïD™$if‰$@‚™$ig‰$@™$i‰$@n™$i:‰$@,™$i_‰$@ƒ{™$i‚;‰$@…™$i‚‰$@…/™$it‰$@…L™$iq‰$@…O™$iV‰$@…i™$iD‰$@…|™$i?‰$@†™$iR‰$@…n™$id‰$@…\™$iP‰$@…p™$iW‰$@ƒz™$i!‰$@O™$iv‰$@…J™$iX‰$@…h™$iK‰$@…t™$iU‰$@…k™$iL‰$@…t™$iK‰$@„™$iX‰$@‚™$iI‰$@„™$i{‰$@…E™$iZ‰$@…f™$iD‰$@„ ™$iU‰$@‡[™$ii‰$@…X™$id‰$@…\™$iP‰$@…p™$iN‰$@…q™$i‚$‰$@…™$i{‰$@…F™$is‰$@…M™$ix‰$@…H™$in‰$@…R™$ie‰$@…Z™$ib‰$@…^™$i_‰$@…a™$i]‰$@…c™$ib‰$@…^™$ig‰$@…Y™$i`‰$@…`™$iZ‰$@…f™$iN‰$@…o™$iM‰$@…s™$iN‰$@…r™$i]‰$@…c™$iS‰$@…m™$ib‰$@…^™$iW‰$@…i™$iZ‰$@…f™$iS‰$@…m™$iZ‰$@…f™$iW‰$@…i™$iZ‰$@…f™$iI‰$@…w™$iU‰$@…k™$iX‰$@…h™$ix‰$@ÿ/MTrkkÿSNAREœ4™&sF‰&@…z™&sF‰&@…z™&s3‰&@† ™&s0‰&@†™&s ‰&@†3™&s‰&@†)™&s‰&@†#™&s‰&@†+™&s&‰&@†™&s!‰&@†™&su‰&@†K™&s'‰&@†™&s‰&@†"™&s"‰&@†™&s"‰&@†™&s‰&@†+™&sw‰&@†I™&s0‰&@†™&s ‰&@†5™&s‰&@†1™&s‰&@†?™&s.‰&@†™&s(‰&@†™&s&‰&@†™&s8‰&@†™&s‰&@Â$™&s0‰&@†™&s&‰&@†™&s)‰&@†™&s5‰&@† ™&s0‰&@†™&s0‰&@†™&s=‰&@†™&s:‰&@†™&s0‰&@†™&s8‰&@†™&s0‰&@†™&s+‰&@†™&s‰&@†)™&s‰&@†.™&s‰&@†#™&s+‰&@†™&s!‰&@†™&s0‰&@†™&s,‰&@†™&s-‰&@†™&s‰&@†$™&s‰&@†!™&s&‰&@†™&s#‰&@†™&s‰&@†!™&s+‰&@†™&s)‰&@†™&s~‰&@r™&s™&s6‰&@‰&@‚ü™&M‰&@…s™&sF‰&@…z™&sF‰&@…z™&s3‰&@† ™&s0‰&@†™&s ‰&@†3™&s‰&@†)™&s‰&@†$™&s‰&@†+™&s&‰&@†™&s!‰&@†™&su‰&@†K™&s'‰&@†™&s‰&@†"™&s"‰&@†™&s"‰&@†™&s‰&@†+™&sw‰&@†I™&s0‰&@†™&s ‰&@†5™&s‰&@†1™&s‰&@†?™&s.‰&@†™&s(‰&@†™&s&‰&@†™&s8‰&@†™&s‰&@†$™&s0‰&@†™&s&‰&@†™&s)‰&@†™&s5‰&@† ™&s0‰&@†™&s0‰&@†™&s=‰&@†™&s:‰&@†™&s0‰&@†™&s8‰&@†™&s0‰&@†™&s+‰&@†™&s‰&@†(™&s‰&@†.™&s‰&@†#™&s+‰&@†™&s!‰&@†™&s0‰&@†™&s,‰&@†™&s-‰&@†™&s‰&@†$™&s‰&@†!™&s&‰&@†™&s#‰&@†™&s‰&@†!™&s+‰&@†™&s)‰&@†™&s~‰&@r™&s™&s6‰&@‰&@ÿ/MTrk¯ÿTOMS‡Ù ¹r™2,‰2@ ™23‰2@$™2"‰2@)™21‰2@™2$‰2@.™24‰2@3™/‰/@;™/1‰/@ ™/!‰/@H™/1‰/@™/!‰/@"™/3‰/@1™) ™)s‰)@‰)@$™)6‰)@™)&‰)@4™)1‰)@™)"‰)@&™)1‰)@ƒ4¹Pÿ/MTrk#ÿTHE "LONE BONGO" —%™M‰F@#™FMI‰F@(™Fdv‰F@z™F4R‰F@™FJO‰F@!™FZg‰F@ ™FP‰6@)™6ou‰6@‘n™6 *‰6@N™6">‰6@;™6 ‰6@k™6QO‰6@)™6{‰6@Š"™6!-‰6@L™6 /‰6@E™62‰6@E™6DP‰6@)™6x‰6@Š™6 (‰6@N™60K‰6@-™6"-‰6@J™6KA‰6@7™6t‰6@Š™6 0‰6@H™6 ;‰6@=™6-‰6@N™6K‰6@+™6dm‰6@™6*‰6@Q™6(A‰6@4™6*>‰6@:™6@‰6@6™6**‰6@P™6-‰6@H™6mi‰6@™67‰6@=™6*<‰6@>™60@‰6@6™6DC‰6@5™6*K‰6@-™6(4‰6@D™6CI‰6@0™6tm‰6@™6*9‰6@=™6"/‰6@H™6AA‰6@7™6=>‰6@:™6A‰6@6™60/‰6@L™6$2‰6@D™6s‰6@A™6%w‰6@>™6*‰6@`™6*C‰6@5™6%‰6@R™6:K‰6@-™6o^‰6@™6.<‰6@9™6:2‰6@G™6><‰6@;™6S>‰6@<™6(>‰6@8™6A4‰6@E™6KA‰6@8™6d‰6@™6.6‰6@>™6:7‰6@C™64;‰6@:™6K9‰6@?™6$H‰6@0™64/‰6@J™6Q@‰6@8™6{d‰6@™6/>‰6@8™6,/‰6@J™6KA‰6@4™6D>‰6@=™6>‰6@6™6"0‰6@K™6:<‰6@:™6f‰6@™6%7‰6@>™6:7‰6@B™6=>‰6@9™6K7‰6@B™6%E‰6@2™60/‰6@K™6QF‰6@1™6x_‰6@O™6.<‰6@™6‰6@Z™6:<‰6@:™6L;‰6@>™6*A‰6@5™6M2‰6@G™6LH‰6@1™6Z‰6@Y™6$/‰6@ ™6[;‰6@=™6WJ‰6@.™6WA‰6@8™6 <‰6@:™69/‰6@I™6SM‰6@,™6d‰6@™6*?‰6@5™6/4‰6@E™6KD‰6@3™6D7‰6@B™6(H‰6@-™6D2‰6@H™6D>‰6@9™6i‰6@™6.>‰6@7™6A7‰6@A™60A‰6@7™6SC‰6@6™63‰6@]™6>H‰6@0™6i‰6@™6,E‰6@2™6!‰6@W™6KH‰6@.™6DA‰6@:™6:‰6@;™6C5‰6@F™6,2‰6@D™6{d‰6@™6CF‰6@/™6aF‰6@3™6SF‰6@„ÉS™6*4‰6@B™69A‰6@6™6.D‰6@5™6WC‰6@4™6x|‰6@Š'™6‰6@Z™6%z‰6@r™6QH‰6@1™6{n‰6@Š5™6,:‰6@?™6!9‰6@<™60‰6@G™6>P‰6@)™6ou‰6@‘n™6 *‰6@N™6">‰6@;™6 ‰6@k™6QO‰6@)™6{‰6@Š"™6!-‰6@L™6 /‰6@E™62‰6@E™6DP‰6@)™6x‰6@Š™6 (‰6@N™60K‰6@-™6"-‰6@J™6KA‰6@7™6t‰6@‰|™6 0‰6@H™6 ;‰6@=™6-‰6@N™6K‰6@+™6dm‰6@™6*‰6@Q™6(A‰6@4™6*>‰6@:™6@‰6@6™6**‰6@P™6-‰6@H™6mi‰6@™67‰6@=™6*<‰6@>™60@‰6@6™6DC‰6@5™6*K‰6@-™6(4‰6@D™6CI‰6@0™6tm‰6@™6*9‰6@=™6"/‰6@H™6AA‰6@7™6=>‰6@:™6A‰6@6™60/‰6@L™6$2‰6@D™6s‰6@A™6%w‰6@>™6*‰6@`™6*C‰6@5™6%‰6@R™6:K‰6@-™6o^‰6@™6.<‰6@9™6:2‰6@G™6><‰6@;™6S>‰6@<™6(>‰6@8™6A4‰6@E™6KA‰6@8™6d‰6@™6.6‰6@>™6:7‰6@C™64;‰6@:™6K9‰6@?™6$H‰6@0™64/‰6@J™6Q@‰6@8™6{d‰6@™6/>‰6@8™6,/‰6@J™6KA‰6@4™6D>‰6@=™6>‰6@6™6"0‰6@K™6:<‰6@:™6f‰6@™6%7‰6@>™6:7‰6@B™6=>‰6@9™6K7‰6@B™6%E‰6@2™60/‰6@K™6QF‰6@1™6x_‰6@O™6.<‰6@™6‰6@Z™6:<‰6@:™6L;‰6@>™6*A‰6@5™6M2‰6@G™6LH‰6@1™6Z‰6@Y™6$/‰6@ ™6[;‰6@=™6WJ‰6@.™6WA‰6@8™6 <‰6@:™69/‰6@I™6SM‰6@,™6d‰6@™6*?‰6@5™6/4‰6@E™6KD‰6@3™6D7‰6@B™6(H‰6@-™6D2‰6@H™6D>‰6@9™6i‰6@™6.>‰6@7™6A7‰6@A™60A‰6@7™6SC‰6@6™63‰6@]™6>H‰6@0™6i‰6@™6,E‰6@2™6!‰6@W™6KH‰6@.™6DA‰6@:™6:‰6@;™6C5‰6@F™6,2‰6@D™6{d‰6@™6CF‰6@/™6aF‰6@3™6SF‰6@ÿ/MTrk¹ÿ CLOSED HAT˜T™*na‰*@™*4R‰*@™*Qc‰*@ ™*9c‰*@ ™*Uf‰*@ ™*/C‰*@-™*Uc‰*@ ™*LD‰*@-™*gh‰*@™*3R‰*@™*Zi‰*@™*/Z‰*@™*\k‰*@™*-M‰*@#™*da‰*@™*;M‰*@#™*\f‰*@ ™*5K‰*@%™*Zp‰*@™*@H‰*@(™*gf‰*@ ™*AH‰*@(™*gd‰*@ ™*9K‰*@%™*QW‰*@™*;<‰*@4™*QC‰*@-™*U2‰*@F™*U0‰*@H™*ZF‰*@)™*N2‰*@?™*gU‰*@™*CF‰*@*™*WY‰*@™*94‰*@<™*ZF‰*@*™*CC‰*@-™*WP‰*@ ™*F<‰*@4™*\O‰*@!™*C>‰*@2™*UR‰*@™*C6‰*@:™*gS‰*@™*QU‰*@™*OW‰*@™*A7‰*@9™*U<‰*@4™*U4‰*@D™*!*‰*@N™*MA‰*@/™*FD‰*@,™*\H‰*@(™*Q>‰*@2™*`C‰*@-™*M4‰*@=™*g<‰*@3™*\+‰*@M™*U&‰*@R™*`:‰*@6™*`>‰*@2™*\F‰*@*™*MA‰*@/™*WP‰*@ ™*M:‰*@6™*WF‰*@*™*C;‰*@5™*gX‰*@™*C0‰*@@™*dF‰*@*™*W@‰*@0™*QA‰*@/™*Q0‰*@@™*g@‰*@0™*U<‰*@4™*`F‰*@*™*N4‰*@<™*`A‰*@/™*OC‰*@-™*`F‰*@*™*MA‰*@/™*U9‰*@7™*M1‰*@?™*`9‰*@?™*5*‰*@N™*U2‰*@>™*gH‰*@(™*\E‰*@+™*QA‰*@/™*Q/‰*@A™*\F‰*@*™*W?‰*@1™*\U‰*@™*NA‰*@/™*`N‰*@"™*QM‰*@#™*\M‰*@#™*Z>‰*@2™*\F‰*@*™*W@‰*@0™*`K‰*@%™*N7‰*@9™*W@‰*@0™*W>‰*@2™*\H‰*@(™*W6‰*@:™*nF‰*@*™*nK‰*@%™*vF‰*@»:™*gf‰*@ ™*99‰*@7™*\K‰*@%™*BF‰*@*™*UO‰*@!™*94‰*@<™*\O‰*@!™*NE‰*@+™*QN‰*@"™*;/‰*@A™*UH‰*@(™*O9‰*@7™*QH‰*@(™*3,‰*@D™*\C‰*@-™*NC‰*@-™*QC‰*@-™*M0‰*@@™*U@‰*@0™*WH‰*@(™*QK‰*@%™*@+‰*@E™*W>‰*@2™*Q5‰*@;™*U>‰*@2™*N/‰*@A™*O/‰*@A™*W2‰*@F™*N>‰*@:™*U4‰*@<™*Q,‰*@D™*nH‰*@(™*N>‰*@2™*\T‰*@™*A0‰*@@™*\M‰*@#™*OH‰*@(™*Z^‰*@™*J>‰*@2™*\a‰*@™*MR‰*@™*Ua‰*@™*6<‰*@4™*W_‰*@™*Na‰*@™*QY‰*@™*@1‰*@?™*\\‰*@™*MR‰*@™*NW‰*@™*@?‰*@1™*`U‰*@™*QO‰*@!™*gZ‰*@™*;0‰*@A™*gO‰*@ ™*UD‰*@,™*\Y‰*@™*N<‰*@4™*gN‰*@"™*UP‰*@ ™*`R‰*@™*C:‰*@6™*gT‰*@™*ZO‰*@!™*WR‰*@™*Q?‰*@1™*`P‰*@ ™*UP‰*@ ™*ZR‰*@™*UF‰*@*™*\K‰*@%™*Q>‰*@2™*\\‰*@™*QE‰*@+™*`R‰*@™*\f‰*@ ™*AM‰*@#™*U>‰*@2™*gU‰*@™*CC‰*@-™*UM‰*@#™*N?‰*@1™*dZ‰*@™*\Y‰*@™*QR‰*@™*C2‰*@>™*gM‰*@#™*WM‰*@#™*\\‰*@™*N6‰*@:™*dU‰*@™*WO‰*@!™*`R‰*@™*QC‰*@-™*gM‰*@#™*gJ‰*@&™*gU‰*@™*L9‰*@7™*\E‰*@+™*\O‰*@!™*UF‰*@*™*N2‰*@>™*U2‰*@>™*`4‰*@D™*g7‰*@A™*U5‰*@;™*\>‰*@2™*`;‰*@5™*W0‰*@@™*M*‰*@F™*W-‰*@C™*g<‰*@4™*`-‰*@K™*Q%‰*@S™*d1‰*@‚þ™*na‰*@™*4R‰*@™*Qc‰*@ ™*9c‰*@ ™*Uf‰*@ ™*/C‰*@-™*Uc‰*@ ™*LD‰*@-™*gh‰*@™*3R‰*@™*Zi‰*@™*/Z‰*@™*\k‰*@™*-M‰*@#™*da‰*@™*;M‰*@#™*\f‰*@ ™*5K‰*@%™*Zp‰*@™*@H‰*@(™*gf‰*@ ™*AH‰*@(™*gd‰*@ ™*9K‰*@%™*QW‰*@™*;<‰*@4™*QC‰*@-™*U2‰*@F™*U0‰*@L™*ZF‰*@*™*N2‰*@>™*gU‰*@™*CF‰*@*™*WY‰*@™*94‰*@<™*ZF‰*@*™*CC‰*@-™*WP‰*@ ™*F<‰*@4™*\O‰*@!™*C>‰*@2™*UR‰*@™*C6‰*@:™*gS‰*@™*QU‰*@™*OW‰*@™*A7‰*@9™*U<‰*@4™*U4‰*@D™*!*‰*@N™*MA‰*@/™*FD‰*@,™*\H‰*@(™*Q>‰*@3™*`C‰*@-™*M4‰*@<™*g<‰*@3™*\+‰*@N™*U&‰*@Q™*`:‰*@6™*`>‰*@2™*\F‰*@*™*MA‰*@/™*WP‰*@ ™*M:‰*@6™*WF‰*@*™*C;‰*@5™*gX‰*@™*C0‰*@@™*dF‰*@*™*W@‰*@0™*QA‰*@/™*Q0‰*@@™*g@‰*@0™*U<‰*@4™*`F‰*@*™*N4‰*@<™*`A‰*@/™*OC‰*@-™*`F‰*@*™*MA‰*@/™*U9‰*@7™*M1‰*@?™*`9‰*@@™*5*‰*@M™*U2‰*@>™*gH‰*@(™*\E‰*@+™*QA‰*@/™*Q/‰*@A™*\F‰*@*™*W?‰*@1™*\U‰*@™*NA‰*@/™*`N‰*@"™*QM‰*@#™*\M‰*@#™*Z>‰*@2™*\F‰*@*™*W@‰*@0™*`K‰*@%™*N7‰*@9™*W@‰*@0™*W>‰*@2™*\H‰*@(™*W6‰*@:™*nF‰*@*™*nK‰*@%™*gf‰*@ ™*99‰*@7™*\K‰*@%™*BF‰*@*™*UO‰*@!™*94‰*@<™*\O‰*@!™*NE‰*@+™*QN‰*@"™*;/‰*@A™*UH‰*@(™*O9‰*@8™*QH‰*@'™*3,‰*@E™*\C‰*@-™*NC‰*@-™*QC‰*@,™*M0‰*@A™*U@‰*@0™*WH‰*@(™*QK‰*@%™*@+‰*@E™*W>‰*@2™*Q5‰*@;™*U>‰*@2™*N/‰*@A™*O/‰*@A™*W2‰*@E™*N>‰*@;™*U4‰*@;™*Q,‰*@D™*nH‰*@(™*N>‰*@3™*\T‰*@™*A0‰*@@™*\M‰*@#™*OH‰*@(™*Z^‰*@™*J>‰*@2™*\a‰*@™*MR‰*@™*Ua‰*@™*6<‰*@4™*W_‰*@™*Na‰*@™*QY‰*@™*@1‰*@?™*\\‰*@™*MR‰*@™*NW‰*@™*@?‰*@2™*`U‰*@™*QO‰*@!™*gZ‰*@™*;0‰*@=™*gO‰*@!™*UD‰*@,™*\Y‰*@™*N<‰*@4™*gN‰*@"™*UP‰*@ ™*`R‰*@™*C:‰*@6™*gT‰*@™*ZO‰*@!™*WR‰*@™*Q?‰*@1™*`P‰*@™*UP‰*@ ™*ZR‰*@™*UF‰*@*™*\K‰*@%™*Q>‰*@2™*\\‰*@™*QE‰*@+™*`R‰*@™*\f‰*@ ™*AM‰*@#™*U>‰*@2™*gU‰*@™*CC‰*@-™*UM‰*@#™*N?‰*@1™*dZ‰*@™*\Y‰*@™*QR‰*@™*C2‰*@>™*gM‰*@#™*WM‰*@#™*\\‰*@™*N6‰*@;™*dU‰*@™*WO‰*@"™*`R‰*@™*QC‰*@-™*gM‰*@#™*gJ‰*@&™*gU‰*@™*L9‰*@7™*\E‰*@*™*\O‰*@!™*UF‰*@*™*N2‰*@>™*U2‰*@>™*`4‰*@D™*g7‰*@A™*U5‰*@;™*\>‰*@2™*`;‰*@5™*W0‰*@@™*M*‰*@F™*W-‰*@C™*g<‰*@4™*`-‰*@K™*Q%‰*@ÿ/MTrkiÿSHAKER šB™E> ‰E@l™E> ‰E@‚\™E4 ‰E@l™E: ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E. ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™EB ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E: ‰E@l™E8 ‰E@‚\™E> ‰E@l™E8 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E: ‰E@l™E& ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E@ ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E0 ‰E@‚\™E: ‰E@l™E0 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E: ‰E@l™E8 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E: ‰E@l™E0 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E> ‰E@l™E4 ‰E@¾\™E4 ‰E@l™E: ‰E@‚\™E. ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E2 ‰E@l™E. ‰E@‚\™E4 ‰E@l™E. ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E2 ‰E@l™E8 ‰E@‚\™E4 ‰E@l™E: ‰E@‚\™E2 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E@ ‰E@l™E8 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E@ ‰E@l™E8 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E: ‰E@l™E0 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E8 ‰E@‚\™EB ‰E@l™E0 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E> ‰E@l™E0 ‰E@‚\™E4 ‰E@l™E. ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™E: ‰E@l™E. ‰E@‚\™EB ‰E@l™E2 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™EB ‰E@l™E2 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™E@ ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E0 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™EB ‰E@l™E: ‰E@ƒ™E> ‰E@l™E> ‰E@‚\™E4 ‰E@l™E: ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E. ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™EB ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚`™E: ‰E@l™E8 ‰E@‚\™E> ‰E@l™E8 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E: ‰E@l™E& ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E@ ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E0 ‰E@‚\™E: ‰E@l™E0 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E: ‰E@l™E8 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E: ‰E@l™E0 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E4 ‰E@l™E: ‰E@‚\™E. ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E0 ‰E@‚\™E2 ‰E@l™E. ‰E@‚\™E4 ‰E@l™E. ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E4 ‰E@l™E2 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E2 ‰E@l™E8 ‰E@‚\™E4 ‰E@l™E: ‰E@‚\™E2 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E8 ‰E@‚\™E@ ‰E@l™E8 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E@ ‰E@l™E8 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E: ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E4 ‰E@‚[™E> ‰E@l™E2 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™E: ‰E@l™E0 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E8 ‰E@‚\™EB ‰E@l™E0 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E> ‰E@l™E0 ‰E@‚\™E4 ‰E@l™E. ‰E@‚\™E8 ‰E@l™E2 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™E: ‰E@l™E. ‰E@‚\™EB ‰E@l™E2 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™EB ‰E@l™E2 ‰E@‚\™E> ‰E@l™E4 ‰E@‚\™E8 ‰E@l™E0 ‰E@‚\™EB ‰E@l™E8 ‰E@‚\™E@ ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E@ ‰E@l™E0 ‰E@‚\™E: ‰E@l™E4 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™E> ‰E@l™E2 ‰E@‚\™EB ‰E@l™E: ‰E@ÿ/MTrkMÿRIDE Š–(™;m`‰;@‚x™;tg‰;@‚q™;rd‰;@‚i™;mr‰;@‚v™;rq‰;@‚l™;mi‰;@‚t™;ji‰;@‚y™;pU‰;@3™;bU‰;@‚ ™;rd‰;@ƒ™;ji‰;@‚q™;td‰;@‚t™;ri‰;@ƒ ™;ze‰;@‚q™;j{‰;@‚i™;rr‰;@‚i™;pi‰;@‚y™;md‰;@‚s™;tr‰;@‚a™;mM‰;@7™;_v‰;@z™;tF‰;@8™;_P‰;@™;Vd‰;@™;tW‰;@ƒ™;rR‰;@ƒ™;r_‰;@‚{™;rg‰;@ƒ™;tM‰;@4™;__‰;@}™;rJ‰;@%™;rS‰;@"™;XA‰;@ƒ™;y<‰;@r™;$‰;@‚3™;v‰;@ÿ/MTrk"ÿ CRASH CYMBAL a™1m™9h‰1@‰9@÷s™1i ‰1@™9g ‰9@–™9i ‰9@…(™1d ‰1@‚ ™1d ‰1@•/™9Q ‰9@E™4a ‰4@5™1b ‰1@– ™1i ‰1@…f™9^ ‰9@™1Y ‰1@–™9p ‰9@Ú™1i™9f‰1@‰9@»T™1i ‰1@–T™9g ‰9@…"™1^ ‰1@}™1a ‰1@•[™1W ‰1@W™9c ‰9@–(™4a™9b‰4@‰9@…/™4X™1W‰4@‰1@l™4V™1S‰4@‰1@–'™1V ‰1@¼™4^ ‰4@¬W™1d ‰1@÷h™4‹‰4@ûZ™1\™9i‰1@‰9@–4™9Y ‰9@…8™1D ‰1@w™1N ‰1@–2™4\™1L‰4@‰1@–8™1J ‰1@™9< ‰9@…™9N ‰9@‚™9V ‰9@–™4V™1O‰4@‰1@ž ™4V ‰4@»`™1W ‰1@™9V ‰9@–&™9^ ‰9@…2™9W ‰9@~™1V ‰1@–=™1F ‰1@–O™1L™9J‰1@‰9@…™1S ‰1@t™1Y ‰1@–-™1W ‰1@ ™9W ‰9@è_™9d ‰9@‚™9 ‰9@ÿ/MTrkUÿCONGAS„ëE™>to‰>@‚s™@\6‰@@@™@qU‰@@‚™>nw‰>@‚h™@L6‰@@A™@aU‰@@‚™>}w‰>@‚i™@E,‰@@J™@qU‰@@‚™>r‰>@‚]™@\C‰@@5™@n]‰@@‚ ™?nU‰?@ƒ ™@N1‰@@F™@kS‰@@‚™?]‰?@ƒ™@N6‰@@@™@nS‰@@‚™?}[‰?@ƒ™@\C‰@@4™@eU‰@@‚™?}]‰?@ƒ™@aJ‰@@.™@nX‰@@‚™>rj‰>@‚v™@kD‰@@2™@rP‰@@‚™>zj‰>@‚u™@_;‰@@<™@_P‰@@‚™>z|‰>@‚c™@kF‰@@2™@_N‰@@‚™>t‰>@‚l™@R;‰@@<™@tH‰@@‚#™?]‰?@ƒ™@n;‰@@=™@rO‰@@‚™?]‰?@ƒ™@q;‰@@<™@qU‰@@‚™?}S‰?@ƒ™@L$‰@@Q™@nP‰@@‚™?e‰?@‚y™@k;‰@@=™@eM‰@@‚™>v‰>@‚i™@k=‰@@;™@kJ‰@@‚™>g‰>@‚v™@q<‰@@<™@kK‰@@‚™>}l‰>@‚s™@cA‰@@7™@eN‰@@‚™>zj‰>@‚u™@_9‰@@>™@rP‰@@‚™?_‰?@ƒ™@a9‰@@?™@nM‰@@‚™?U‰?@ƒ ™@c8‰@@?™@nM‰@@‚™>}]‰>@ƒ™@n9‰@@>™@zR‰@@‚™>zg‰>@‚w™@k>‰@@:™@nK‰@@‚ ™?R‰?@ƒ ™@r<‰@@<™@rK‰@@‚™>}[‰>@ƒ™@t9‰@@?™@eM‰@@‚™>yb‰>@‚}™@k6‰@@A™@tK‰@@‚™>t‰>@‚l™@n;‰@@=™@kM‰@@‚™>‰>@‚b™@r>‰@@9™@tN‰@@‚™>‰>@‚D™@c1‰@@F™@tS‰@@‚™?b‰?@ƒ™@k6‰@@A™@rS‰@@‚™?b‰?@‚}™@e1‰@@F™@yS‰@@‚™>}o‰>@‚q™@k3‰@@E™@nK‰@@‚™>t‰>@‚l™@z6‰@@B™@tJ‰@@‚™?g‰?@‚z™@};‰@@>™@qR‰@@‚™?d‰?@‚z™@}9‰@@?™@}F‰@@‚%™>i‰>@‚v™@z4‰@@D™@zS‰@@‚™>y‰>@‚f™@r9‰@@>™@}S‰@@‚™?_‰?@ƒ™@}6‰@@A™@}P‰@@‚™?g‰?@‚y™@n3‰@@E™@}R‰@@‚™>}t‰>@‚k™@};‰@@=™@zU‰@@‚™>t‰>@‚i™@r6‰@@A™@yU‰@@ÿ/playmidi-2.4.orig/emumidi.h0100644000175000017500000000546706335434614013553 0ustar dsds/************************************************************************ emumidi.h -- tables and includes required by emumidi.c Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 2139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #ifdef linux #include #else #include #endif /* * TABLE OF NEARLY EXACT FREQUENCIES FOR ALL MIDI NOTES (A=440Hz) * the whole table is really not necessary, but it prevents some * rounding errors by having it complete, and the cost of 128 * integers is cheaper than the cpu cost of multiple right shifts * of a table of twelve frequencies, and definately cheaper than * calculating freq = 13.75 * 2^((n + 4)/12) for each note value, * which is how this table was created. */ unsigned int n_freq[128] = { /* C C# D D# E F F# G G# A A# B */ 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 31, 33, 34, 37, 39, 41, 44, 46, 49, 52, 55, 58, 62, 65, 69, 73, 78, 82, 87, 92, 98, 103, 110, 117, 123, 131, 139, 147, 156, 165, 175, 185, 195, 207, 220, 233, 247, 262, 277, 294, 311, 330, 349, 370, 392, 415, 440, 466, 494, 523, 554, 587, 622, 659, 698, 740, 784, 831, 880, 932, 988, 1047, 1109, 1175, 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865, 1976, 2093, 2217, 2349, 2489, 2637, 2794, 2960, 3136, 3322, 3520, 3729, 3951, 4186, 4435, 4699, 4978, 5274, 5588, 5920, 6272, 6645, 7040, 7459, 7902, 8372, 8870, 9397, 9956,10548,11175,11840,12544,13290,14080,14917,15804, 16744,17740,18795,19912,21096,22351,23680,25088 }; /* MT-32 emulation translate table */ int mt32pgm[128] = { 0, 1, 2, 4, 4, 5, 5, 3, 16, 16, 16, 16, 19, 19, 19, 21, 6, 6, 6, 7, 7, 7, 8, 8, 62, 57, 63, 58, 38, 38, 39, 39, 88, 33, 52, 35, 97, 100, 38, 39, 14, 102, 68, 103, 44, 92, 46, 80, 48, 49, 51, 45, 40, 40, 42, 42, 43, 46, 46, 24, 25, 28, 27, 104, 32, 32, 34, 33, 36, 37, 39, 35, 79, 73, 76, 72, 74, 75, 64, 65, 66, 67, 71, 71, 69, 70, 60, 22, 56, 59, 57, 63, 60, 60, 58, 61, 61, 11, 11, 99, 100, 9, 14, 13, 12, 107, 106, 77, 78, 78, 76, 111, 47, 117, 127, 115, 118, 116, 118, 126, 121, 121, 55, 124, 120, 125, 126, 127 }; playmidi-2.4.orig/BUGS0100644000175000017500000000137606257346275012437 0ustar dsdsXaw version does not automatically scroll karaoke text without user typing a minimum of 8 characters in the input window (ie. "--------"). svgalib version doesn't properly reset terminal tty mode resulting in a required ";stty sane" on the end of every command line for splaymidi. svgalib version may be removed from the distribution soon, barring protest. X version doesn't handle channel setup on disabled channels that are re-enabled during playback. This causes additional bugs specific to the Gravis Ultrasound. Pressing the repeat button helps for all but GUS. Pro Patches lite patch set for gravis ultrasound is reported to have trouble with linux playmidi. MT-32 emulation mode (-M) has some problems. Works mostly. No other bugs known at this time. playmidi-2.4.orig/Configure0100755000175000017500000000474306335434614013614 0ustar dsds#!/bin/sh ########################################################## ### DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE ### ### DOING. THIS SCRIPT MAKES MANY ASSUMPTIONS ABOUT ### ### DEFAULT VALUES BEING SET TO MY PERSONAL SETUP. ### ########################################################## fmmode=0 mididevno=-1 play=PLAY_MIDI gus1=/dos/ultrasnd/midi gus2=/usr/local/lib/Plib ########################################################## ### YOU MUST HAVE THE VOXWARE SOUND DRIVER INSTALLED ### ### FOR THIS SCRIPT TO FUNCTION PROPERLY. /dev/sndstat ### ### MUST BE AVAILABLE FOR READING ### ########################################################## echo "Playmidi Quick Config Utility, Copyright (C)1996 Nathan I. Laredo" echo "This is free software with ABSOLUTELY NO WARRANTY. For details, please" echo "see the file COPYING included with the Playmidi distribution." echo "" echo "What type of device do you want to make the default?" echo "1. External midi synth, Ensoniq Soundscape, TB Maui, waveblaster cards" echo "2. Yamaha 2-op FM" echo "3. Yamaha 4-op FM" echo "4. Gravis Ultrasound" echo "5. SB AWE32 Synth" echo -n "(default = 1) --> " read ans1 if [ "$ans1" = "1" ] || [ -z "$ans1" ] then echo "" echo "Playmidi External MIDI synth configuration:" grep -A 10 Midi\ devices: /dev/sndstat | grep -B 10 Timers: | grep -v Timers: echo "If you want to force one of the midi devices above, enter the number" echo "here, otherwise, to default to the last detected, hit enter." echo -n "(at runtime, option -D# will override this) --> " read ans2 if [ -n "$ans2" ] then mididevno=$ans2 fi fi if [ "$ans1" = "2" ] then play=PLAY_FM fi if [ "$ans1" = "3" ] then play=PLAY_FM fmmode=1 fi if [ "$ans1" = "4" ] then play=PLAY_GUS echo "" echo "Where do you keep your Gravis Ultrasound patch files?" echo -n "(default = $gus1) --> " read ans3 if [ -z "$ans3" ] then ans3=$gus1 fi gus1=$ans3 echo "" echo "Where else should playmidi look for GUS patch files?" echo -n "(default = $gus2) --> " read ans4 if [ -z "$ans4" ] then ans4=$gus2 fi gus2=$ans4 fi if [ "$ans1" = "5" ] then play=PLAY_AWE32 fi echo "" echo -n "Now creating playmidi.h with your defaults..." gus1=`echo $gus1 | sed -f pathname.sed` gus2=`echo $gus2 | sed -f pathname.sed` echo " s/DEFAULT_PLAYBACK_MODE/$play/ s/DEFAULT_FM_MODE/$fmmode/ s/MIDI_DEFAULT_DEV/$mididevno/ s/PRIMARY_GUS_PATCH_LOCATION/$gus1/ s/SECONDARY_GUS_PATCH_LOCATION/$gus2/" >config.sed sed -f config.sed playmidi.h-dist >playmidi.h echo "Done." exit 0 playmidi-2.4.orig/playmidi.h-dist0100644000175000017500000000671706335434614014672 0ustar dsds#define RELEASE "Playmidi 2.4" /************************************************************************ playmidi.h -- defines and structures for use by playmidi package Copyright (C) 1994-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. ************************************************************************* * the following definition is set by Configure */ #define DEFAULT_MIDI_DEV MIDI_DEFAULT_DEV /* Default mask for percussion instruments. Channels 16 and 10 = 0x8200 */ #define PERCUSSION 0x0200 /* the following definition is set by Configure */ #define DEFAULT_PLAYBACK_MODE /* change the following if you have lots of synth devices */ #define MAX_CARDS 5 /* the following definition is set by Configure */ #define FM_DEFAULT_MODE DEFAULT_FM_MODE /* the following definition is set by Configure */ #define PATCH_PATH1 "PRIMARY_GUS_PATCH_LOCATION" /* the following definition is set by Configure */ #define PATCH_PATH2 "SECONDARY_GUS_PATCH_LOCATION" /* change this if you notice performance problems, 128 bytes by default */ #define SEQUENCERBLOCKSIZE 128 /* change this if you have really outrageous midi files > 128 tracks */ /* 128 tracks is approximately a 4K structure */ #define MAXTRKS 128 /* where to find fm patch libraries */ #define SEQUENCER_DEV "/dev/sequencer" #define O3MELODIC "/etc/std.o3" #define O3DRUMS "/etc/drums.o3" #define SBMELODIC "/etc/std.sb" #define SBDRUMS "/etc/drums.sb" #define ISPERC(x) (perc & (1 << x)) #define ISGUS(x) (play_gus & (1 << x)) #define ISFM(x) (play_fm & (1 << x)) #define ISMIDI(x) (play_ext & (1 << x)) #define ISAWE(x) (play_awe & (1 << x)) #define ISPLAYING(x) (chanmask & (1 << x)) #define NO_EXIT 100 #include #include #include #include #include #ifdef linux #include #else #include #endif struct chanstate { int program; int bender; int oldbend; /* used for graphics */ int bender_range; int oldrange; /* used for graphics */ int controller[255]; int pressure; }; struct voicestate { int note; int channel; int timestamp; int dead; }; /* Non-standard MIDI file formats */ #define RIFF 0x52494646 #define CTMF 0x43544d46 /* Standard MIDI file format definitions */ #define MThd 0x4d546864 #define MTrk 0x4d54726b #define meta_event 0xff #define sequence_number 0x00 #define text_event 0x01 #define copyright_notice 0x02 #define sequence_name 0x03 #define instrument_name 0x04 #define lyric 0x05 #define marker 0x06 #define cue_point 0x07 #define channel_prefix 0x20 #define end_of_track 0x2f #define set_tempo 0x51 #define smpte_offset 0x54 #define time_signature 0x58 #define key_signature 0x59 #define sequencer_specific 0x74 struct miditrack { unsigned char *data; /* data of midi track */ unsigned long int length; /* length of track data */ unsigned long int index; /* current byte in track */ unsigned long int ticks; /* current midi tick count */ unsigned char running_st; /* running status byte */ }; playmidi-2.4.orig/io_xaw.c0100644000175000017500000003224106604564266013377 0ustar dsds/************************************************************************ io_xaw.c -- shows midi events in X11 using Xaw widgets Copyright (C) 1995-1996 Nathan I. Laredo This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #include "bitmaps.h" #include #include #include #include #include #include #include #include #include #include #include extern int chanmask, play_gus, play_fm, play_ext, gus_dev, sb_dev, ext_dev; extern int graphics, verbose, perc, ntrks; extern int note_vel[16][128]; extern unsigned long int ticks; extern char *filename, *gmvoice[256]; extern float skew; extern void seq_reset(); extern struct chanstate channel[16]; extern void seq_stop_note(int, int, int, int); extern struct timeval start_time; struct timeval want_time, now_time; int cdeltat(t1, t2) struct timeval *t1; struct timeval *t2; { int d1, d2; d1 = t1->tv_sec - t2->tv_sec; if((d2 = t1->tv_usec - t2->tv_usec) < 0) (d2 += 1000000, d1 -= 1); d2 /= 10000; return (d2 + d1 * 100); } XtAppContext context; Widget toplevel, manager, titlebar, status, text, exit_button; Widget scrollbar, skew_label, nextsong, repeatsong, prevsong; Pixmap Exit, Next, Play, Prev; /* button icons */ Widget cbutton[16]; /* program for each channel (also toggles) */ Widget cmeter[16]; /* vu meter for each channel */ #define TEXTSIZE 8192 char textbuf[TEXTSIZE]; int i, return_do_what; int vu_level[16], vu_delta[16]; char *drumset[11] = { "Standard Kit", "Room Kit", "Power Kit", "Electronic Kit", "TR-808 Kit", "Jazz Kit", "Brush Kit", "Orchestra Kit", "Sound FX Kit", "Program Kit", "MT-32 Kit" }; #define SET(x) (x == 8 ? 1 : x >= 16 && x <= 23 ? 2 : x == 24 ? 3 : \ x == 25 ? 4 : x == 32 ? 5 : x >= 40 && x <= 47 ? 6 : \ x == 48 ? 7 : x == 56 ? 8 : x >= 96 && x <= 111 ? 9 : \ x == 127 ? 10 : 0) void close_show(error) int error; { exit(error); } void ExitCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { close_show(0); } void MaskCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { int i, j, k; for (i = 0; i < 16 && cbutton[i] != w; i++); if (i < 0 || i >= 16) return; if (call_data) /* channel should be enabled */ chanmask |= (1 << i); else { /* need to stop all notes in channel */ chanmask &= (~(1 << i)); if (ISGUS(i)) k = gus_dev; else if (ISFM(i)) k = sb_dev; else k = ext_dev; for (j = 0; j < 128; j++) if (note_vel[i][j]) seq_stop_note(k, i, j, note_vel[i][j] = 0); } } void SkewCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { float position; position = *(float *) call_data; skew = (position * 3.75) + 0.25; sprintf(textbuf, "%1.2f", skew); XtVaSetValues(skew_label, XtNlabel, textbuf, NULL); }; void SkewIncCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { double s_position; int movewhere; movewhere = (int) call_data; if (movewhere < 0) { skew += 0.01; if (skew > 4.0) skew = 4.0; } else if (movewhere > 0) { skew -= 0.01; if (skew < 0.25) skew = 0.25; } else return; s_position = (skew - 0.25) / 3.75; /* scale is 0.0 - 1.0 */ XawScrollbarSetThumb(scrollbar, s_position, 0.01); sprintf(textbuf, "%1.2f", skew); XtVaSetValues(skew_label, XtNlabel, textbuf, NULL); }; void PrevSongCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { if ((skew += 0.01) > 4) seq_reset(); return_do_what = -1; } void RepeatCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { seq_reset(); return_do_what = 0; } void NextSongCallback(w, client_data, call_data) Widget w; XtPointer client_data; XtPointer call_data; { seq_reset(); return_do_what = 1; } void updateMeter(chn) int chn; { XtVaSetValues(cmeter[chn], XtNwidth, 5 + vu_level[chn], NULL); } XtIntervalId mytimerid; Boolean return_now; int oldsec = 0, oldusec = 0; void TimerCallback(w, client_data, timerid) Widget w; XtPointer client_data; XtIntervalId timerid; { int i, sec, usec; /* update vu meter values */ for (i = 0; i < 16; i++) if (vu_delta[i]) { /* decay meter */ vu_level[i] -= vu_delta[i]; if (vu_level[i] < 0) vu_level[i] = vu_delta[i] = 0; updateMeter(i); } gettimeofday(&now_time, NULL); sec = now_time.tv_sec - start_time.tv_sec; usec = now_time.tv_usec - start_time.tv_usec; if (usec < 0) (usec += 1000000, sec -= 1); usec /= 100000; /* change to 10ths of a second */ sprintf(textbuf, "%02d:%02d.%d", sec / 60, sec % 60, usec); if (sec > oldsec || usec > oldusec) { XtVaSetValues(status, XtNstring, textbuf, NULL); oldsec = sec; oldusec = usec; } if (return_do_what != NO_EXIT || cdeltat(&want_time, &now_time) < 15) return_now = True; else mytimerid = XtAppAddTimeOut(context, 100, TimerCallback, NULL); } XEvent event; int updatestatus() { XtInputMask mask; return_now = False; want_time.tv_sec = start_time.tv_sec + (ticks / 100); want_time.tv_usec = start_time.tv_usec + (ticks % 100) * 10000; if (want_time.tv_usec > 1000000) (want_time.tv_usec -= 1000000, want_time.tv_sec++); return_do_what = NO_EXIT; TimerCallback(context, NULL, 0); /* start timer */ do { /* toolkit main loop */ if ((mask = XtAppPending(context))) /* non-blocking */ XtAppProcessEvent(context, mask); #ifndef HOG_CPU if (!mask && !return_now) { /* sleep 1/10th of a second */ usleep(750); } #endif } while (!return_now || mask); return return_do_what; } void AppendText(s) char *s; { XawTextBlock textblk; static XawTextPosition whereami; if (s == NULL) { /* reset text to empty */ XtVaSetValues(text, XtNstring, "", NULL); whereami = 0; return; } textblk.firstPos = 0; textblk.length = strlen(s); textblk.ptr = s; textblk.format = XawFmt8Bit; XawTextReplace(text, whereami, whereami, &textblk); whereami += textblk.length; } #define TEXTBUF (&textbuf[strlen(textbuf)]) void showevent(cmd, data, length) int cmd; unsigned char *data; int length; { int chn, note, vel, i; chn = (cmd & 0x0f); note = (data[0] & 0x7f); vel = (data[1] & 0x7f); if (cmd < 8 && cmd > 0) { strncpy(textbuf, data, length < TEXTSIZE - 4 ? length : TEXTSIZE - 3); textbuf[(length > TEXTSIZE + 2) ? TEXTSIZE - 2 : length] = '\0'; sprintf(TEXTBUF, "\n"); AppendText(textbuf); if (verbose > 2) printf(textbuf); } else if (cmd & 0x80) switch (cmd & 0xf0) { case MIDI_NOTEON: if (!vel && vu_level[chn]) vu_delta[chn] = 32; else (vu_level[chn] = vel, vu_delta[chn] = 0); updateMeter(chn); break; case MIDI_NOTEOFF: if (vu_level[chn]) vu_delta[chn] = vel / 2; updateMeter(chn); break; case MIDI_PGM_CHANGE: if (!ISPERC(chn)) XtVaSetValues(cbutton[chn], XtNlabel, gmvoice[note], NULL); else XtVaSetValues(cbutton[chn], XtNlabel, drumset[SET(note)], NULL); break; case 0xf0: case 0xf7: sprintf(textbuf, "Sysex(%2x): ", cmd); for (i = 0; i < length && i < (TEXTSIZE / 2) - 16; i++) sprintf(TEXTBUF, "%02x", data[i]); sprintf(TEXTBUF, "\n"); AppendText(textbuf); if (verbose > 2) printf(textbuf); break; default: break; } } void init_show() { int i; double s_position; AppendText(NULL); /* reset text window */ s_position = (skew - 0.25) / 3.75; /* scale is 0.0 - 1.0 */ sprintf(textbuf, "%1.2f", skew); XawScrollbarSetThumb(scrollbar, s_position, 0.01); XtVaSetValues(skew_label, XtNlabel, textbuf, NULL); XStoreName(XtDisplay(toplevel), XtWindow(toplevel), filename); oldsec = oldusec = 0; for (i = 0; i < 16; i++) { vu_level[i] = vu_delta[i] = 0; updateMeter(i); sprintf(textbuf, "channel%02d", i + 1); XtVaSetValues(cbutton[i], XtNlabel, textbuf, NULL); } XtVaSetValues(status, XtNlabel, "00:00.0" , NULL); } void setup_show(argc, argv) int argc; char **argv; { int i; Pixel bg, fg; Display *mydisp; Screen *myscreen; Window mywin; graphics++; /* force -r option if not selected */ toplevel = XtVaOpenApplication(&context, "XPlaymidi", NULL, 0, &argc, argv, NULL, sessionShellWidgetClass, XtNminWidth, 425, XtNwidth, 425, XtNminHeight, 479, XtNheight, 500, NULL); manager = XtVaCreateManagedWidget("controls", formWidgetClass, toplevel, XtNdefaultDistance, 2, NULL); titlebar = XtVaCreateManagedWidget("titlebar", labelWidgetClass, manager, XtNtop, XawChainTop, XtNright, XawChainRight, XtNleft, XawChainLeft, XtNborderWidth, 0, XtNfromVert, cbutton[15], XtNlabel, "X" RELEASE " by Nathan Laredo" , NULL); skew_label = XtVaCreateManagedWidget("skew", labelWidgetClass, manager, XtNborderWidth, 0, XtNleft, XawChainLeft, XtNfromVert, titlebar, XtNlabel, "1.00", NULL); scrollbar = XtVaCreateManagedWidget("scrollbar", scrollbarWidgetClass, manager, XtNorientation, XtorientHorizontal, XtNlength, 365, XtNfromVert, titlebar, XtNfromHoriz, skew_label, NULL); text = XtVaCreateManagedWidget("text", asciiTextWidgetClass, manager, XtNbottom, XawChainBottom, XtNleft, XawChainLeft, XtNfromVert, skew_label, XtNeditType, XawtextAppend, XtNheight, 400, XtNwidth, 132, XtNscrollHorizontal, XawtextScrollAlways, XtNscrollVertical, XawtextScrollAlways, XtNtype, XawAsciiString, XtNdisplayCaret, False, NULL); for (i = 0; i < 16; i++) { sprintf(textbuf, "channel%02d", i + 1); cbutton[i] = XtVaCreateManagedWidget(textbuf, toggleWidgetClass, manager, XtNstate, (ISPLAYING(i) ? True : False), XtNwidth, 100, XtNjustify, XtJustifyLeft, XtNfromHoriz, text, XtNresizable, False, XtNresize, False, NULL); if (!i) XtVaSetValues(cbutton[i], XtNfromVert, scrollbar, NULL); else XtVaSetValues(cbutton[i], XtNfromVert, cbutton[i - 1], NULL); XtAddCallback(cbutton[i], XtNcallback, MaskCallback, NULL); sprintf(textbuf, "meter%02d", i + 1); cmeter[i] = XtVaCreateManagedWidget(textbuf, toggleWidgetClass, manager, XtNsensitive, False, XtNfromHoriz, cbutton[i], XtNlabel, "", XtNresize, False, XtNjustify, XtJustifyLeft, XtNwidth, 5, XtNresizable, True, NULL); if (!i) XtVaSetValues(cmeter[i], XtNfromVert, scrollbar, NULL); else XtVaSetValues(cmeter[i], XtNfromVert, cmeter[i - 1], NULL); } exit_button = XtVaCreateManagedWidget("exit", commandWidgetClass, manager, XtNfromHoriz, text, XtNfromVert, cbutton[15], XtNinternalWidth, 1, XtNinternalHeight, 0, XtNborderWidth, 0, NULL); prevsong = XtVaCreateManagedWidget("prevfile", commandWidgetClass, manager, XtNfromHoriz, exit_button, XtNfromVert, cbutton[15], XtNinternalWidth, 1, XtNinternalHeight, 0, XtNborderWidth, 0, NULL); repeatsong = XtVaCreateManagedWidget("repeat", commandWidgetClass, manager, XtNfromHoriz, prevsong, XtNfromVert, cbutton[15], XtNinternalWidth, 1, XtNinternalHeight, 0, XtNborderWidth, 0, NULL); nextsong = XtVaCreateManagedWidget("nextfile", commandWidgetClass, manager, XtNfromHoriz, repeatsong, XtNfromVert, cbutton[15], XtNinternalWidth, 1, XtNinternalHeight, 0, XtNborderWidth, 0, NULL); status = XtVaCreateManagedWidget("status", asciiTextWidgetClass, manager, XtNfromHoriz, nextsong, XtNfromVert, cbutton[15], XtNborderWidth, 0, XtNstring, "--:--.-", XtNeditType, XawtextRead, XtNdisplayCaret, False, XtNuseStringInPlace, True, NULL); XtAddCallback(scrollbar, XtNjumpProc, SkewCallback, NULL); XtAddCallback(scrollbar, XtNscrollProc, SkewIncCallback, NULL); XtAddCallback(exit_button, XtNcallback, ExitCallback, NULL); XtAddCallback(nextsong, XtNcallback, NextSongCallback, NULL); XtAddCallback(repeatsong, XtNcallback, RepeatCallback, NULL); XtAddCallback(prevsong, XtNcallback, PrevSongCallback, NULL); myscreen = XtScreen(toplevel); mydisp = DisplayOfScreen(myscreen); mywin = RootWindowOfScreen(myscreen); fg = WhitePixelOfScreen(myscreen); bg = BlackPixelOfScreen(myscreen); Exit = XCreatePixmapFromBitmapData(mydisp, mywin, Eject_bits, Eject_width, Eject_height, fg, bg, 1); XtVaSetValues(exit_button, XtNbitmap, Exit, NULL); Prev = XCreatePixmapFromBitmapData(mydisp, mywin, Prev_bits, Prev_width, Prev_height, fg, bg, 1); XtVaSetValues(prevsong, XtNbitmap, Prev, NULL); Play = XCreatePixmapFromBitmapData(mydisp, mywin, Play_bits, Play_width, Play_height, fg, bg, 1); XtVaSetValues(repeatsong, XtNbitmap, Play, NULL); Next = XCreatePixmapFromBitmapData(mydisp, mywin, Next_bits, Next_width, Next_height, fg, bg, 1); XtVaSetValues(nextsong, XtNbitmap, Next, NULL); XtRealizeWidget(toplevel); } playmidi-2.4.orig/seq2mid.c0100644000175000017500000000656006257346275013464 0ustar dsds/************************************************************************ * seq2mid.c - converts dump of /dev/sequencer (aka toy.c ouput) to a * type 0 midi file. * * This code was written by by Nathan Laredo (laredo@gnu.ai.mit.edu) * Source code may be freely distributed in unmodified form. *************************************************************************/ #include #include #include #include #include int outfile, infile; /* * midi header, track header, and timing info. Given timing is good for * /dev/sequencer tick of 100Hz. Adjust division for others. */ #define FLUFFSIZE 29 unsigned char midifluff[FLUFFSIZE] = { 0x4d, 0x54, 0x68, 0x64, /* MThd */ 0x00, 0x00, 0x00, 0x06, /* 6 bytes in header block */ 0x00, 0x00, /* midi format 0 */ 0x00, 0x01, /* one track */ /* the following line is for a 100Hz sequencer tick, adjust accordingly */ 0x00, 0x32, /* 50 ticks per quarter, 100Hz resolution */ 0x4d, 0x54, 0x72, 0x6b, /* MTrk */ #define SIZEINDEX 18 0x00, 0x00, 0x00, 0x00, /* x bytes in track block */ 0x00, 0xff, 0x51, 0x03, /* meta tempo event */ 0x07, 0xA1, 0x20 /* one quarter note = .5 sec = 120bpm */ #define STARTCOUNT 7 }; #define ENDFLUFFSIZE 4 unsigned char endfluff[ENDFLUFFSIZE] = { 0x00, 0xff, 0x2f, 0x00 }; /* meta end of track */ /* indexed by high nibble of command */ int cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 2, 0}; void midiwrite(buf, count) unsigned char *buf; int count; { if(write(outfile, buf, count) < count) { perror("write"); exit(-1); } } int main(argc, argv) int argc; char **argv; { unsigned char delta[4], inputbuf[5], mid[8], cmd = 0; unsigned int oldticks = 0, ticks = 0, db = 0; off_t filesize, tracksize; int i, status = 0; if (argc < 3) { fprintf(stderr, "usage: %s infile.seq outfile.mid\n", argv[0]); exit(1); } if ((infile = open(argv[1], O_RDONLY, 0)) < 0) { perror(argv[1]); exit(-1); } if ((outfile = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) { perror(argv[2]); exit(-1); } midiwrite(midifluff, FLUFFSIZE); inputbuf[4] = 0; while (read(infile, inputbuf, 4) == 4) { if (inputbuf[0] == SEQ_WAIT) ticks = (*(unsigned int *) &inputbuf[1]); if (*inputbuf == SEQ_MIDIPUTC) { if (inputbuf[1] & 0x80) cmd = mid[db = 0] = inputbuf[1]; else mid[db] = inputbuf[1]; db++; if (db == cmdlen[cmd >> 4] + 1) { register unsigned int buffer = ticks - oldticks; delta[i = 3] = (buffer & 0x7f); while ((buffer >>= 7) > 0 && i > 0) delta[--i] = (buffer & 0x7f) | 0x80; midiwrite(&delta[i], 4 - i); if (status == cmd && cmd < 0xf0) midiwrite(&mid[1], db - 1); else midiwrite(mid, db); status = mid[0]; oldticks = ticks; db = 1; } } } midiwrite(endfluff, ENDFLUFFSIZE); /* write big endian track size */ filesize = lseek(outfile, 0, SEEK_CUR); tracksize = filesize - FLUFFSIZE + STARTCOUNT; lseek(outfile, SIZEINDEX, SEEK_SET); delta[0] = (tracksize >> 24) & 0xff; delta[1] = (tracksize >> 16) & 0xff; delta[2] = (tracksize >> 8) & 0xff; delta[3] = tracksize & 0xff; midiwrite(delta, 4); close(infile); close(outfile); printf("%s: saved as %s, %d bytes, %d bytes track data\n", argv[1], argv[2], (int) filesize, (int) tracksize); exit(0); } /* end of file */ playmidi-2.4.orig/bitmaps/0040755000175000017500000000000006257346275013407 5ustar dsdsplaymidi-2.4.orig/bitmaps/stop.bit0100644000175000017500000000145106257346277015074 0ustar dsds#define stop_width 29 #define stop_height 29 static unsigned char stop_bits[] = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xd0, 0xff, 0x3f, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x55, 0x95, 0x1e, 0x50, 0x00, 0x00, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f}; playmidi-2.4.orig/bitmaps/meter.bit0100644000175000017500000000711106257346277015222 0ustar dsds#define meter_width 95 #define meter_height 47 #define meter_x_hot 47 #define meter_y_hot 41 static unsigned char meter_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0xff, 0xff, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x7f, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x7f, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xff, 0x3f, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x40, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x03, 0xf0, 0xff, 0x03, 0x00, 0x40, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x80, 0x04, 0x80, 0xff, 0x07, 0x00, 0x40, 0x00, 0x00, 0xe8, 0x3f, 0x00, 0x80, 0x04, 0x00, 0xfe, 0x0b, 0x00, 0x40, 0x00, 0x00, 0xde, 0x0f, 0x00, 0x1c, 0x03, 0x00, 0xf8, 0x35, 0x00, 0x40, 0x00, 0x00, 0xbf, 0x03, 0x00, 0x80, 0x04, 0x00, 0xe0, 0x42, 0x00, 0x40, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x81, 0x00, 0x40, 0x00, 0xc0, 0x3f, 0x64, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x02, 0x01, 0x40, 0x00, 0xe0, 0x1f, 0x94, 0x00, 0x00, 0x00, 0x00, 0x20, 0x05, 0x02, 0x40, 0x00, 0xf0, 0x0f, 0x94, 0x00, 0x00, 0x00, 0x00, 0x20, 0x09, 0x04, 0x40, 0x00, 0xf8, 0xc7, 0x65, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x08, 0x40, 0x00, 0xf8, 0x03, 0x94, 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x08, 0x40, 0x00, 0xfc, 0x01, 0x94, 0x00, 0x00, 0x00, 0x00, 0x20, 0x41, 0x10, 0x40, 0x00, 0xfe, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x20, 0x40, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x40, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x40, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x40, 0x00, 0x18, 0x00, 0x00, 0x00, 0x40, 0x07, 0x00, 0x00, 0x00, 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x09, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x31, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x4a, 0x00, 0x00, 0x00, 0x48, 0x09, 0x00, 0x00, 0x00, 0x20, 0x41, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x48, 0x09, 0x00, 0x00, 0x00, 0x22, 0x41, 0x8e, 0x31, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x00, 0x00, 0x00, 0xc7, 0x40, 0x40, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x41, 0x40, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x41, 0xc0, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x40, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f}; playmidi-2.4.orig/bitmaps/pause.bit0100644000175000017500000000145406257346277015227 0ustar dsds#define pause_width 29 #define pause_height 29 static unsigned char pause_bits[] = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xd0, 0x4f, 0x3f, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0xd0, 0x4a, 0x2b, 0x1d, 0x68, 0xa5, 0x95, 0x1e, 0x50, 0x40, 0x01, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f}; playmidi-2.4.orig/bitmaps/eject.bit0100644000175000017500000000150406257346277015200 0ustar dsds#define Eject_width 29 #define Eject_height 29 static unsigned char Eject_bits[] = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0x6a, 0xaa, 0x1e, 0x50, 0xb5, 0x54, 0x1d, 0xa8, 0x5a, 0xa9, 0x1e, 0x50, 0xad, 0x52, 0x1d, 0xa8, 0x56, 0xa5, 0x1e, 0x50, 0xab, 0x4a, 0x1d, 0xa8, 0x55, 0x95, 0x1e, 0xd0, 0xaa, 0x2a, 0x1d, 0x68, 0x00, 0x80, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xe8, 0xff, 0xff, 0x1e, 0x50, 0x55, 0x15, 0x1d, 0xe8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x15, 0x1d, 0xe8, 0xaa, 0xaa, 0x1e, 0x50, 0x00, 0x00, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00}; playmidi-2.4.orig/bitmaps/prev.bit0100644000175000017500000000150106257346277015057 0ustar dsds#define Prev_width 29 #define Prev_height 29 static unsigned char Prev_bits[] = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xd0, 0x57, 0x35, 0x1d, 0xe8, 0xa2, 0x9a, 0x1e, 0x50, 0x55, 0x2d, 0x1d, 0xe8, 0xa2, 0x96, 0x1e, 0x50, 0x55, 0x2b, 0x1d, 0xe8, 0xa2, 0x95, 0x1e, 0x50, 0xd5, 0x2a, 0x1d, 0xe8, 0x62, 0x95, 0x1e, 0x50, 0x95, 0x2a, 0x1d, 0xe8, 0x22, 0x95, 0x1e, 0x50, 0x55, 0x2a, 0x1d, 0xe8, 0xa2, 0x94, 0x1e, 0x50, 0x55, 0x29, 0x1d, 0xe8, 0xa2, 0x92, 0x1e, 0x50, 0x55, 0x25, 0x1d, 0xe8, 0xa2, 0x8a, 0x1e, 0x50, 0x50, 0x15, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00}; playmidi-2.4.orig/bitmaps/play.bit0100644000175000017500000000150106257346277015050 0ustar dsds#define Play_width 29 #define Play_height 29 static unsigned char Play_bits[] = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x5d, 0x55, 0x1d, 0xa8, 0xb6, 0xaa, 0x1e, 0x50, 0x6d, 0x55, 0x1d, 0xa8, 0xd6, 0xaa, 0x1e, 0x50, 0xad, 0x55, 0x1d, 0xa8, 0x56, 0xab, 0x1e, 0x50, 0xad, 0x56, 0x1d, 0xa8, 0x56, 0xad, 0x1e, 0x50, 0xad, 0x52, 0x1d, 0xa8, 0x56, 0xa9, 0x1e, 0x50, 0xad, 0x54, 0x1d, 0xa8, 0x56, 0xaa, 0x1e, 0x50, 0x2d, 0x55, 0x1d, 0xa8, 0x96, 0xaa, 0x1e, 0x50, 0x4d, 0x55, 0x1d, 0xa8, 0xa6, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00}; playmidi-2.4.orig/bitmaps/next.bit0100644000175000017500000000150106257346277015061 0ustar dsds#define Next_width 29 #define Next_height 29 static unsigned char Next_bits[] = { 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xd0, 0x55, 0x3f, 0x1d, 0x68, 0xab, 0xaa, 0x1e, 0xd0, 0x56, 0x17, 0x1d, 0x68, 0xad, 0xaa, 0x1e, 0xd0, 0x5a, 0x17, 0x1d, 0x68, 0xb5, 0xaa, 0x1e, 0xd0, 0x6a, 0x17, 0x1d, 0x68, 0xd5, 0xaa, 0x1e, 0xd0, 0x2a, 0x17, 0x1d, 0x68, 0x95, 0xaa, 0x1e, 0xd0, 0x4a, 0x17, 0x1d, 0x68, 0xa5, 0xaa, 0x1e, 0xd0, 0x52, 0x17, 0x1d, 0x68, 0xa9, 0xaa, 0x1e, 0xd0, 0x54, 0x17, 0x1d, 0x68, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x03, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0x50, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1e, 0xfc, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00}; playmidi-2.4.orig/beat.c0100644000175000017500000000156306257346275013031 0ustar dsds/************************************************************************ * beat.c - cheap little metronome to run in the background and use * system beep so as not to tie up /dev/sequencer. * * This code was written by by Nathan Laredo (laredo@gnu.ai.mit.edu) * Source code may be freely distributed in unmodified form. *************************************************************************/ #include #include #include int main(argc, argv) int argc; char **argv; { unsigned long i, j; if (argc != 2) { fprintf(stderr, "usage: %s tempo in beats per minute\n", argv[0]); exit(1); } i = atoi(argv[1]); if (i < 48 || i > 384) { fprintf(stderr, "error: tempo should be between 48 and 384 bpm\n"); exit(-1); } j = 60000000 / i; /* get usec per beat */ while (fprintf(stderr, "\7")) usleep(j); exit(0); } playmidi-2.4.orig/midimap.conf0100644000175000017500000000512006257346275014232 0ustar dsds# /etc/midimap.conf -- configuration file for playmidi # Nathan Laredo (laredo@gnu.ai.mit.edu) # # This file is created and maintained automagically by playmidi. # You may wish to edit this file by hand, so it was made somewhat # readable. All options are separated by whitespace, all comments # begin with a # and end with a newline. A colon is used to separate # an option from its value. # # Be warned that if you edit this file while playmidi is running, you # will lose your changes unless playmidi is terminated before saving. # # MIDI MAP: # # valid output devices: fm, gus, midi0, midi1, midi2, midi3 # There are 32 channels represented here for devices such as the # Roland M-GS64 (SC-88) and Yamaha MU-80, or multiple synths (fm/gus/midi) channel01:midi0 channel02:midi0 channel03:midi0 channel04:midi0 channel05:midi0 channel06:midi0 channel07:midi0 channel08:midi0 channel09:midi0 channel10:midi0 channel11:midi0 channel12:midi0 channel13:midi0 channel14:midi0 channel15:midi0 channel16:midi0 channel17:midi1 channel18:midi1 channel19:midi1 channel20:midi1 channel21:midi1 channel22:midi1 channel23:midi1 channel24:midi1 channel25:midi1 channel26:midi1 channel27:midi1 channel28:midi1 channel29:midi1 channel30:midi1 channel31:midi1 channel32:midi1 # channel 17-32 mapping policy (ignore,echo,special) # echo will delay notes on channel 1-16 and map to 17-32 and play # with a slightly different velocity and pan. ignore says 17-32 don't # exist. special is used for special 32-channel midi files. xpolicy:echo # list of channels that contain percussion # multiple channels are separated by commas percussion_channels:10,26 # default mode for fm playback, may be 2 or 4. fm_mode:2 # sequencer device open policy # exit_on_busy will end the playmidi session if device is in use # kill_others will kill any other users (if permission allows) before # attempting to re-open the device. On a secondary failure # playmidi will exit. sequencer_policy:exit_on_busy # File containing 4-op fm melodic instrument library std.o3:/etc/std.o3 # File containing 4-op fm percussive instrument library drums.o3:/etc/drums.o3 # File containing 2-op fm melodic instrument library std.sb:/etc/std.sb # File containing 2-op fm percussive instrument library drums.sb:/etc/drums.sb # paths to search for instrument patch files for gravis ultrasound # up to three directories may be specified, separated by commas gus_instruments:/dos/ultrasnd/midi,/usr/local/lib/Plib # device name of sequencer, usually /dev/sequencer sequencer_dev:/dev/sequencer ##### end of configuration file playmidi-2.4.orig/gsvoices.h0100644000175000017500000000440706257346275013745 0ustar dsds/************************************************************** * gsvoices.h - list of gs voice names - all 654 of SC88 * **************************************************************/ #ifndef GSVOICES_H #define GSVOICES_H char *gsvoice[128] = { "Piano 1 ", "Piano 2 ", "Piano 3 ", "Honky-tonk ", "E.Piano 1 ", "E.Piano 2 ", "Harpsichord ", "Clav. ", "Celesta ", "Glockenspl ", "Music Box ", "Vibraphone ", "Marimba ", "Xylophone ", "Tubularbell ", "Santur ", "Organ 1 ", "Organ 2 ", "Organ 3 ", "Church Org1 ", "Reed Organ ", "Accordion F ", "Harmonica ", "Bandoneon ", "Nylon Gt. ", "Steel Gt. ", "Jazz Gt. ", "Clean Gt. ", "Muted Gt. ", "OverdriveGt ", "Dist.Gt. ", "Gt.Harmonix ", "Acoustic Bs ", "Fingered Bs ", "Picked Bass ", "Fretless Bs ", "Slap Bass 1 ", "Slap Bass 2 ", "Syn.Bass 1 ", "Syn.Bass 2 ", "Violin ", "Viola ", "Cello ", "Contrabass ", "Tremolo Str ", "Pizzicato ", "Harp ", "Timpani ", "Strings ", "SlowStrings ", "SynStrings1 ", "SynStrings2 ", "Choir Aahs ", "Voice Oohs ", "SynVox ", "Orchest.Hit ", "Trumpet ", "Trombone ", "Tuba ", "MuteTrumpet ", "French Horn ", "Brass 1 ", "Syn.Brass 1 ", "Syn.Brass 2 ", "Soprano Sax ", "Alto Sax ", "Tenor Sax ", "BaritoneSax ", "Oboe ", "EnglishHorn ", "Bassoon ", "Clarinet ", "Piccolo ", "Flute ", "Recorder ", "Pan Flute ", "Bottle Blow ", "Shakuhachi ", "Whistle ", "Ocarina ", "Square Wave ", "Saw Wave ", "SynCalliope ", "ChifferLead ", "Charang ", "Solo Vox ", "5th Saw ", "Bass & Lead ", "Fantasia ", "Warm Pad ", "Polysynth ", "Space Voice ", "Bowed Glass ", "Metal Pad ", "Halo Pad ", "Sweep Pad ", "Ice Rain ", "Soundtrack ", "Crystal ", "Atmosphere ", "Brightness ", "Goblin ", "Echo Drops ", "Star Theme ", "Sitar ", "Banjo ", "Shamisen ", "Koto ", "Kalimba ", "Bagpipe ", "Fiddle ", "Shanai ", "Tinkle Bell ", "Agogo ", "Steel Drums ", "Woodblock ", "Taiko ", "Melo. Tom 1 ", "Synth Drum ", "Reverse Cym ", "Gt.FretNoiz ", "BreathNoise ", "Seashore ", "Bird ", "Telephone 1 ", "Helicopter ", "Applause ", "Gun Shot " }; #endif playmidi-2.4.orig/Makefile.fbsd0100644000175000017500000000736006335434614014320 0ustar dsds########################################################################### # playmidi Makefile for FreeBSD ########################################################################### # ncurses usually /usr/lib, -L/usr/local/lib doesn't hurt # unless there's more than one ncurses floating around on your system LIBNC = -L/usr/local/lib -lncurses ######### NOTE: X11R6 or newer REQUIRED LIBX11 = -L/usr/X11R6/lib -lXaw -lXmu -lXt -lX11 -lXext -lSM -lICE LIBVGA = -L/usr/local/lib -lvgagl -lvga # ncurses is usually in /usr/include/ncurses, but you may need # to use /usr/local/include/ncurses depending on your setup. INCNC = -I/usr/include/ncurses # just in case you keep your X includes in an odd location. INCX11 = -I/usr/X11R6/include -DNARROWPROTO # usually in /usr/include, but -I/usr/local/include doesn't hurt # unless there's more than one svgalib floating around your system. INCVGA = -I/usr/local/include INCAWE += -DVOXWARE_CONTROLLER_7_WORKING # awe_voice.h path INCAWE += -I/usr/src/sys/i386/isa/sound # Directory where application defaults files are stored for X11 version XAPPDEFAULTS = /usr/X11R6/lib/X11/app-defaults INCLUDES= $(INCNC) $(INCX11) $(INCVGA) $(INCAWE) INSTALLDIR = /usr/local/bin INSTALL = install -s # if you are using the GUS Ultra driver module, add -DULTRA_DRIVER CFLAGS = -Wall -pipe -fomit-frame-pointer -O2 $(INCAWE) LDFLAGS = OBJECTS = playmidi.o readmidi.o playevents.o \ patchload.o emumidi.o io_ncurses.o XOBJECTS= playmidi.o readmidi.o playevents.o \ patchload.o emumidi.o io_xaw.o #SOBJECTS= playmidi.o readmidi.o playevents.o \ # patchload.o emumidi.o io_svgalib.o all: playmidi xplaymidi config: playmidi.h: playmidi.h-dist Configure io_ncurses.o: io_ncurses.c $(CC) $(CFLAGS) $(INCNC) -c io_ncurses.c -o io_ncurses.o io_xaw.o: io_xaw.c $(CC) $(CFLAGS) $(INCX11) -c io_xaw.c -o io_xaw.o #io_svgalib.o: io_svgalib.c # $(CC) $(CFLAGS) $(INCVGA) -c io_svgalib.c -o io_svgalib.o playmidi: .depend $(OBJECTS) $(CC) $(LDFLAGS) -o playmidi $(OBJECTS) $(LIBNC) xplaymidi: .depend $(XOBJECTS) $(CC) $(LDFLAGS) -o xplaymidi $(XOBJECTS) $(LIBX11) #splaymidi: .depend $(SOBJECTS) # $(CC) $(LDFLAGS) -o splaymidi $(SOBJECTS) $(LIBVGA) $(INSTALLDIR)/playmidi: playmidi $(INSTALL) playmidi $(INSTALLDIR) $(INSTALLDIR)/xplaymidi: xplaymidi $(INSTALL) xplaymidi $(INSTALLDIR) #$(INSTALLDIR)/splaymidi: splaymidi # $(INSTALL) splaymidi $(INSTALLDIR) /etc/std.o3: cp -i std.o3 /etc /etc/drums.o3: cp -i drums.o3 /etc /etc/std.sb: cp -i std.sb /etc /etc/drums.sb: cp -i drums.sb /etc $(XAPPDEFAULTS)/XPlaymidi: cp -i XPlaymidi.ad $(XAPPDEFAULTS)/XPlaymidi install: $(INSTALLDIR)/playmidi \ $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \ /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi install.novga: $(INSTALLDIR)/playmidi \ $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \ /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi install.noX11: $(INSTALLDIR)/playmidi \ /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb install.Xonly: $(INSTALLDIR)/xplaymidi /etc/std.o3 /etc/drums.o3 \ /etc/std.sb /etc/drums.sb $(XAPPDEFAULTS)/XPlaymidi install.lame: $(INSTALLDIR)/playmidi \ /etc/std.o3 /etc/drums.o3 /etc/std.sb /etc/drums.sb install.man: cp playmidi.1 /usr/man/man1/ clean: rm -f *.o playmidi splaymidi xplaymidi a.out distclean: clean rm -f .depend *~ *.bak playmidi.h config.sed ifeq (.depend, $(wildcard .depend)) .depend depend dep: playmidi.h for i in *.c; do $(CPP) -M $(CFLAGS) $(INCLUDES) $$i; done >.depend include .depend else depend dep: for i in *.c; do $(CPP) -M $(CFLAGS) $(INCLUDES) $$i; done >.depend .depend: playmidi.h @echo @echo "Bad or missing .depend running 'make depend clean'" @echo $(MAKE) depend clean @echo @echo "Successful. Trying to make again" @exit 0 endif playmidi-2.4.orig/awe_voice.h0100644000175000017500000004441606604565647014072 0ustar dsds/* * sound/awe_voice.h * * Voice information definitions for the low level driver for the * AWE32/Sound Blaster 32 wave table synth. * version 0.4.2c; Oct. 7, 1997 * * Copyright (C) 1996,1997 Takashi Iwai * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef AWE_VOICE_H #define AWE_VOICE_H #ifndef SAMPLE_TYPE_AWE32 #define SAMPLE_TYPE_AWE32 0x20 #endif #ifndef _PATCHKEY #define _PATCHKEY(id) ((id<<8)|0xfd) #endif /*---------------------------------------------------------------- * patch information record *----------------------------------------------------------------*/ /* patch interface header: 16 bytes */ typedef struct awe_patch_info { short key; /* use AWE_PATCH here */ #define AWE_PATCH _PATCHKEY(0x07) short device_no; /* synthesizer number */ unsigned short sf_id; /* file id (should be zero) */ short optarg; /* optional argument */ int len; /* data length (without this header) */ short type; /* patch operation type */ #define AWE_LOAD_INFO 0 /* awe_voice_rec */ #define AWE_LOAD_DATA 1 /* awe_sample_info */ #define AWE_OPEN_PATCH 2 /* awe_open_parm */ #define AWE_CLOSE_PATCH 3 /* none */ #define AWE_UNLOAD_PATCH 4 /* none */ #define AWE_REPLACE_DATA 5 /* awe_sample_info (optarg=#channels)*/ #define AWE_MAP_PRESET 6 /* awe_voice_map */ #define AWE_LOAD_CHORUS_FX 0x10 /* awe_chorus_fx_rec (optarg=mode) */ #define AWE_LOAD_REVERB_FX 0x11 /* awe_reverb_fx_rec (optarg=mode) */ short reserved; /* word alignment data */ /* the actual patch data begins after this */ #if defined(AWE_COMPAT_030) && AWE_COMPAT_030 char data[0]; #endif } awe_patch_info; /*#define AWE_PATCH_INFO_SIZE 16*/ #define AWE_PATCH_INFO_SIZE sizeof(awe_patch_info) /*---------------------------------------------------------------- * open patch *----------------------------------------------------------------*/ #define AWE_PATCH_NAME_LEN 32 typedef struct _awe_open_parm { unsigned short type; /* sample type */ #define AWE_PAT_TYPE_MISC 0 #define AWE_PAT_TYPE_GM 1 #define AWE_PAT_TYPE_GS 2 #define AWE_PAT_TYPE_MT32 3 #define AWE_PAT_TYPE_XG 4 #define AWE_PAT_TYPE_SFX 5 #define AWE_PAT_TYPE_GUS 6 #define AWE_PAT_TYPE_MAP 7 #define AWE_PAT_LOCKED 0x100 /* lock the samples */ short reserved; char name[AWE_PATCH_NAME_LEN]; } awe_open_parm; /*#define AWE_OPEN_PARM_SIZE 28*/ #define AWE_OPEN_PARM_SIZE sizeof(awe_open_parm) /*---------------------------------------------------------------- * raw voice information record *----------------------------------------------------------------*/ /* wave table envelope & effect parameters to control EMU8000 */ typedef struct _awe_voice_parm { unsigned short moddelay; /* modulation delay (0x8000) */ unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */ unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */ unsigned short modrelease; /* modulation release time (0x807f) */ short modkeyhold, modkeydecay; /* envelope change per key (not used) */ unsigned short voldelay; /* volume delay (0x8000) */ unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */ unsigned short voldcysus; /* volume decay & sustain (0x7f7f) */ unsigned short volrelease; /* volume release time (0x807f) */ short volkeyhold, volkeydecay; /* envelope change per key (not used) */ unsigned short lfo1delay; /* LFO1 delay (0x8000) */ unsigned short lfo2delay; /* LFO2 delay (0x8000) */ unsigned short pefe; /* modulation pitch & cutoff (0x0000) */ unsigned short fmmod; /* LFO1 pitch & cutoff (0x0000) */ unsigned short tremfrq; /* LFO1 volume & freq (0x0000) */ unsigned short fm2frq2; /* LFO2 pitch & freq (0x0000) */ unsigned char cutoff; /* initial cutoff (0xff) */ unsigned char filterQ; /* initial filter Q [0-15] (0x0) */ unsigned char chorus; /* chorus send (0x00) */ unsigned char reverb; /* reverb send (0x00) */ unsigned short reserved[4]; /* not used */ } awe_voice_parm; #define AWE_VOICE_PARM_SIZE 48 /* wave table parameters: 92 bytes */ typedef struct _awe_voice_info { unsigned short sf_id; /* file id (should be zero) */ unsigned short sample; /* sample id */ int start, end; /* sample offset correction */ int loopstart, loopend; /* loop offset correction */ short rate_offset; /* sample rate pitch offset */ unsigned short mode; /* sample mode */ #define AWE_MODE_ROMSOUND 0x8000 #define AWE_MODE_STEREO 1 #define AWE_MODE_LOOPING 2 #define AWE_MODE_NORELEASE 4 /* obsolete */ #define AWE_MODE_INIT_PARM 8 short root; /* midi root key */ short tune; /* pitch tuning (in cents) */ char low, high; /* key note range */ char vellow, velhigh; /* velocity range */ char fixkey, fixvel; /* fixed key, velocity */ char pan, fixpan; /* panning, fixed panning */ short exclusiveClass; /* exclusive class (0 = none) */ unsigned char amplitude; /* sample volume (127 max) */ unsigned char attenuation; /* attenuation (0.375dB) */ short scaleTuning; /* pitch scale tuning(%), normally 100 */ awe_voice_parm parm; /* voice envelope parameters */ short index; /* internal index (set by driver) */ } awe_voice_info; /*#define AWE_VOICE_INFO_SIZE 92*/ #define AWE_VOICE_INFO_SIZE sizeof(awe_voice_info) /*----------------------------------------------------------------*/ /* The info entry of awe_voice_rec is changed from 0 to 1 * for some compilers refusing zero size array. * Due to this change, sizeof(awe_voice_rec) becomes different * from older versions. * Use AWE_VOICE_REC_SIZE instead. */ /* instrument info header: 4 bytes */ typedef struct _awe_voice_rec_hdr { unsigned char bank; /* midi bank number */ unsigned char instr; /* midi preset number */ char nvoices; /* number of voices */ char write_mode; /* write mode; normally 0 */ #define AWE_WR_APPEND 0 /* append anyway */ #define AWE_WR_EXCLUSIVE 1 /* skip if already exists */ #define AWE_WR_REPLACE 2 /* replace if already exists */ } awe_voice_rec_hdr; /*#define AWE_VOICE_REC_SIZE 4*/ #define AWE_VOICE_REC_SIZE sizeof(awe_voice_rec_hdr) /* the standard patch structure for one sample */ typedef struct _awe_voice_rec_patch { awe_patch_info patch; awe_voice_rec_hdr hdr; awe_voice_info info; } awe_voice_rec_patch; /* obsolete data type */ #if defined(AWE_COMPAT_030) && AWE_COMPAT_030 #define AWE_INFOARRAY_SIZE 0 #else #define AWE_INFOARRAY_SIZE 1 #endif typedef struct _awe_voice_rec { unsigned char bank; /* midi bank number */ unsigned char instr; /* midi preset number */ short nvoices; /* number of voices */ /* voice information follows here */ awe_voice_info info[AWE_INFOARRAY_SIZE]; } awe_voice_rec; /*---------------------------------------------------------------- * sample wave information *----------------------------------------------------------------*/ /* wave table sample header: 32 bytes */ typedef struct awe_sample_info { unsigned short sf_id; /* file id (should be zero) */ unsigned short sample; /* sample id */ int start, end; /* start & end offset */ int loopstart, loopend; /* loop start & end offset */ int size; /* size (0 = ROM) */ short checksum_flag; /* use check sum = 1 */ unsigned short mode_flags; /* mode flags */ #define AWE_SAMPLE_8BITS 1 /* wave data is 8bits */ #define AWE_SAMPLE_UNSIGNED 2 /* wave data is unsigned */ #define AWE_SAMPLE_NO_BLANK 4 /* no blank loop is attached */ #define AWE_SAMPLE_SINGLESHOT 8 /* single-shot w/o loop */ #define AWE_SAMPLE_BIDIR_LOOP 16 /* bidirectional looping */ #define AWE_SAMPLE_STEREO_LEFT 32 /* stereo left sound */ #define AWE_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */ #define AWE_SAMPLE_REVERSE_LOOP 128 /* reverse looping */ unsigned int checksum; /* check sum */ #if defined(AWE_COMPAT_030) && AWE_COMPAT_030 unsigned short data[0]; /* sample data follows here */ #endif } awe_sample_info; /*#define AWE_SAMPLE_INFO_SIZE 32*/ #define AWE_SAMPLE_INFO_SIZE sizeof(awe_sample_info) /*---------------------------------------------------------------- * voice preset mapping *----------------------------------------------------------------*/ typedef struct awe_voice_map { int map_bank, map_instr, map_key; /* key = -1 means all keys */ int src_bank, src_instr, src_key; } awe_voice_map; #define AWE_VOICE_MAP_SIZE sizeof(awe_voice_map) /*---------------------------------------------------------------- * awe hardware controls *----------------------------------------------------------------*/ #define _AWE_DEBUG_MODE 0x00 #define _AWE_REVERB_MODE 0x01 #define _AWE_CHORUS_MODE 0x02 #define _AWE_REMOVE_LAST_SAMPLES 0x03 #define _AWE_INITIALIZE_CHIP 0x04 #define _AWE_SEND_EFFECT 0x05 #define _AWE_TERMINATE_CHANNEL 0x06 #define _AWE_TERMINATE_ALL 0x07 #define _AWE_INITIAL_VOLUME 0x08 #define _AWE_INITIAL_ATTEN _AWE_INITIAL_VOLUME #define _AWE_RESET_CHANNEL 0x09 #define _AWE_CHANNEL_MODE 0x0a #define _AWE_DRUM_CHANNELS 0x0b #define _AWE_MISC_MODE 0x0c #define _AWE_RELEASE_ALL 0x0d #define _AWE_NOTEOFF_ALL 0x0e #define _AWE_CHN_PRESSURE 0x0f /*#define _AWE_GET_CURRENT_MODE 0x10*/ #define _AWE_EQUALIZER 0x11 /*#define _AWE_GET_MISC_MODE 0x12*/ /*#define _AWE_GET_FONTINFO 0x13*/ #define _AWE_MODE_FLAG 0x80 #define _AWE_COOKED_FLAG 0x40 /* not supported */ #define _AWE_MODE_VALUE_MASK 0x3F /*----------------------------------------------------------------*/ #define _AWE_SET_CMD(p,dev,voice,cmd,p1,p2) \ {((char*)(p))[0] = SEQ_PRIVATE;\ ((char*)(p))[1] = dev;\ ((char*)(p))[2] = _AWE_MODE_FLAG|(cmd);\ ((char*)(p))[3] = voice;\ ((unsigned short*)(p))[2] = p1;\ ((unsigned short*)(p))[3] = p2;} /* buffered access */ #define _AWE_CMD(dev, voice, cmd, p1, p2) \ {_SEQ_NEEDBUF(8);\ _AWE_SET_CMD(_seqbuf + _seqbufptr, dev, voice, cmd, p1, p2);\ _SEQ_ADVBUF(8);} /* direct access */ #define _AWE_CMD_NOW(seqfd,dev,voice,cmd,p1,p2) \ {struct seq_event_rec tmp;\ _AWE_SET_CMD(&tmp, dev, voice, cmd, p1, p2);\ ioctl(seqfd, SNDCTL_SEQ_OUTOFBAND, &tmp);} /*----------------------------------------------------------------*/ /* set debugging mode */ #define AWE_DEBUG_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_DEBUG_MODE, p1, 0) /* set reverb mode; from 0 to 7 */ #define AWE_REVERB_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_REVERB_MODE, p1, 0) /* set chorus mode; from 0 to 7 */ #define AWE_CHORUS_MODE(dev,p1) _AWE_CMD(dev, 0, _AWE_CHORUS_MODE, p1, 0) /* reset channel */ #define AWE_RESET_CHANNEL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 0, 0) #define AWE_RESET_CONTROL(dev,ch) _AWE_CMD(dev, ch, _AWE_RESET_CHANNEL, 1, 0) /* send an effect to all layers */ #define AWE_SEND_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,type,value) #define AWE_ADD_EFFECT(dev,voice,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x80),value) #define AWE_UNSET_EFFECT(dev,voice,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((type)|0x40),0) /* send an effect to a layer */ #define AWE_SEND_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)),value) #define AWE_ADD_LAYER_EFFECT(dev,voice,layer,type,value) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x80),value) #define AWE_UNSET_LAYER_EFFECT(dev,voice,layer,type) _AWE_CMD(dev,voice,_AWE_SEND_EFFECT,((layer+1)<<8|(type)|0x40),0) /* terminate sound on the channel/voice */ #define AWE_TERMINATE_CHANNEL(dev,voice) _AWE_CMD(dev,voice,_AWE_TERMINATE_CHANNEL,0,0) /* terminate all sounds */ #define AWE_TERMINATE_ALL(dev) _AWE_CMD(dev, 0, _AWE_TERMINATE_ALL, 0, 0) /* release all sounds (w/o sustain effect) */ #define AWE_RELEASE_ALL(dev) _AWE_CMD(dev, 0, _AWE_RELEASE_ALL, 0, 0) /* note off all sounds (w sustain effect) */ #define AWE_NOTEOFF_ALL(dev) _AWE_CMD(dev, 0, _AWE_NOTEOFF_ALL, 0, 0) /* set initial attenuation */ #define AWE_INITIAL_VOLUME(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 0) #define AWE_INITIAL_ATTEN AWE_INITIAL_VOLUME /* relative attenuation */ #define AWE_SET_ATTEN(dev,atten) _AWE_CMD(dev, 0, _AWE_INITIAL_VOLUME, atten, 1) /* set channel playing mode; mode=0/1/2 */ #define AWE_SET_CHANNEL_MODE(dev,mode) _AWE_CMD(dev, 0, _AWE_CHANNEL_MODE, mode, 0) #define AWE_PLAY_INDIRECT 0 /* indirect voice mode (default) */ #define AWE_PLAY_MULTI 1 /* multi note voice mode */ #define AWE_PLAY_DIRECT 2 /* direct single voice mode */ #define AWE_PLAY_MULTI2 3 /* sequencer2 mode; used internally */ /* set drum channel mask; channels is 32bit long value */ #define AWE_DRUM_CHANNELS(dev,channels) _AWE_CMD(dev, 0, _AWE_DRUM_CHANNELS, ((channels) & 0xffff), ((channels) >> 16)) /* set bass and treble control; values are from 0 to 11 */ #define AWE_EQUALIZER(dev,bass,treble) _AWE_CMD(dev, 0, _AWE_EQUALIZER, bass, treble) /* remove last loaded samples */ #define AWE_REMOVE_LAST_SAMPLES(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_REMOVE_LAST_SAMPLES, 0, 0) /* initialize emu8000 chip */ #define AWE_INITIALIZE_CHIP(seqfd,dev) _AWE_CMD_NOW(seqfd, dev, 0, _AWE_INITIALIZE_CHIP, 0, 0) /* set miscellaneous modes; meta command */ #define AWE_MISC_MODE(dev,mode,value) _AWE_CMD(dev, 0, _AWE_MISC_MODE, mode, value) /* exclusive sound off; 1=off */ #define AWE_EXCLUSIVE_SOUND(dev,mode) AWE_MISC_MODE(dev,AWE_MD_EXCLUSIVE_SOUND,mode) /* default GUS bank number */ #define AWE_SET_GUS_BANK(dev,bank) AWE_MISC_MODE(dev,AWE_MD_GUS_BANK,bank) /* change panning position in realtime; 0=don't 1=do */ #define AWE_REALTIME_PAN(dev,mode) AWE_MISC_MODE(dev,AWE_MD_REALTIME_PAN,mode) /* extended pressure controls; not portable with other sound drivers */ #define AWE_KEY_PRESSURE(dev,ch,note,vel) SEQ_START_NOTE(dev,ch,(note)+128,vel) #define AWE_CHN_PRESSURE(dev,ch,vel) _AWE_CMD(dev,ch,_AWE_CHN_PRESSURE,vel,0) /*----------------------------------------------------------------*/ /* reverb mode parameters */ #define AWE_REVERB_ROOM1 0 #define AWE_REVERB_ROOM2 1 #define AWE_REVERB_ROOM3 2 #define AWE_REVERB_HALL1 3 #define AWE_REVERB_HALL2 4 #define AWE_REVERB_PLATE 5 #define AWE_REVERB_DELAY 6 #define AWE_REVERB_PANNINGDELAY 7 #define AWE_REVERB_PREDEFINED 8 /* user can define reverb modes up to 32 */ #define AWE_REVERB_NUMBERS 32 typedef struct awe_reverb_fx_rec { unsigned short parms[28]; } awe_reverb_fx_rec; /*----------------------------------------------------------------*/ /* chorus mode parameters */ #define AWE_CHORUS_1 0 #define AWE_CHORUS_2 1 #define AWE_CHORUS_3 2 #define AWE_CHORUS_4 3 #define AWE_CHORUS_FEEDBACK 4 #define AWE_CHORUS_FLANGER 5 #define AWE_CHORUS_SHORTDELAY 6 #define AWE_CHORUS_SHORTDELAY2 7 #define AWE_CHORUS_PREDEFINED 8 /* user can define chorus modes up to 32 */ #define AWE_CHORUS_NUMBERS 32 typedef struct awe_chorus_fx_rec { unsigned short feedback; /* feedback level (0xE600-0xE6FF) */ unsigned short delay_offset; /* delay (0-0x0DA3) [1/44100 sec] */ unsigned short lfo_depth; /* LFO depth (0xBC00-0xBCFF) */ unsigned int delay; /* right delay (0-0xFFFFFFFF) [1/256/44100 sec] */ unsigned int lfo_freq; /* LFO freq LFO freq (0-0xFFFFFFFF) */ } awe_chorus_fx_rec; /*----------------------------------------------------------------*/ /* misc mode types */ enum { /* 0*/ AWE_MD_EXCLUSIVE_OFF, /* obsolete */ /* 1*/ AWE_MD_EXCLUSIVE_ON, /* obsolete */ /* 2*/ AWE_MD_VERSION, /* read only */ /* 3*/ AWE_MD_EXCLUSIVE_SOUND, /* ignored */ /* 4*/ AWE_MD_REALTIME_PAN, /* 0/1: do realtime pan change (default=1) */ /* 5*/ AWE_MD_GUS_BANK, /* bank number for GUS patches (default=0) */ /* 6*/ AWE_MD_KEEP_EFFECT, /* 0/1: keep effect values, (default=0) */ /* 7*/ AWE_MD_ZERO_ATTEN, /* attenuation of max volume (default=32) */ /* 8*/ AWE_MD_CHN_PRIOR, /* 0/1: set MIDI channel priority mode (default=1) */ /* 9*/ AWE_MD_MOD_SENSE, /* integer: modwheel sensitivity (def=18) */ /*10*/ AWE_MD_DEF_PRESET, /* integer: default preset number (def=0) */ /*11*/ AWE_MD_DEF_BANK, /* integer: default bank number (def=0) */ /*12*/ AWE_MD_DEF_DRUM, /* integer: default drumset number (def=0) */ /*13*/ AWE_MD_TOGGLE_DRUM_BANK, /* 0/1: toggle drum flag with bank# (def=0) */ AWE_MD_END, }; /*----------------------------------------------------------------*/ /* effect parameters */ enum { /* modulation envelope parameters */ /* 0*/ AWE_FX_ENV1_DELAY, /* WORD: ENVVAL */ /* 1*/ AWE_FX_ENV1_ATTACK, /* BYTE: up ATKHLD */ /* 2*/ AWE_FX_ENV1_HOLD, /* BYTE: lw ATKHLD */ /* 3*/ AWE_FX_ENV1_DECAY, /* BYTE: lw DCYSUS */ /* 4*/ AWE_FX_ENV1_RELEASE, /* BYTE: lw DCYSUS */ /* 5*/ AWE_FX_ENV1_SUSTAIN, /* BYTE: up DCYSUS */ /* 6*/ AWE_FX_ENV1_PITCH, /* BYTE: up PEFE */ /* 7*/ AWE_FX_ENV1_CUTOFF, /* BYTE: lw PEFE */ /* volume envelope parameters */ /* 8*/ AWE_FX_ENV2_DELAY, /* WORD: ENVVOL */ /* 9*/ AWE_FX_ENV2_ATTACK, /* BYTE: up ATKHLDV */ /*10*/ AWE_FX_ENV2_HOLD, /* BYTE: lw ATKHLDV */ /*11*/ AWE_FX_ENV2_DECAY, /* BYTE: lw DCYSUSV */ /*12*/ AWE_FX_ENV2_RELEASE, /* BYTE: lw DCYSUSV */ /*13*/ AWE_FX_ENV2_SUSTAIN, /* BYTE: up DCYSUSV */ /* LFO1 (tremolo & vibrato) parameters */ /*14*/ AWE_FX_LFO1_DELAY, /* WORD: LFO1VAL */ /*15*/ AWE_FX_LFO1_FREQ, /* BYTE: lo TREMFRQ */ /*16*/ AWE_FX_LFO1_VOLUME, /* BYTE: up TREMFRQ */ /*17*/ AWE_FX_LFO1_PITCH, /* BYTE: up FMMOD */ /*18*/ AWE_FX_LFO1_CUTOFF, /* BYTE: lo FMMOD */ /* LFO2 (vibrato) parameters */ /*19*/ AWE_FX_LFO2_DELAY, /* WORD: LFO2VAL */ /*20*/ AWE_FX_LFO2_FREQ, /* BYTE: lo FM2FRQ2 */ /*21*/ AWE_FX_LFO2_PITCH, /* BYTE: up FM2FRQ2 */ /* Other overall effect parameters */ /*22*/ AWE_FX_INIT_PITCH, /* SHORT: pitch offset */ /*23*/ AWE_FX_CHORUS, /* BYTE: chorus effects send (0-255) */ /*24*/ AWE_FX_REVERB, /* BYTE: reverb effects send (0-255) */ /*25*/ AWE_FX_CUTOFF, /* BYTE: up IFATN */ /*26*/ AWE_FX_FILTERQ, /* BYTE: up CCCA */ /* Sample / loop offset changes */ /*27*/ AWE_FX_SAMPLE_START, /* SHORT: offset */ /*28*/ AWE_FX_LOOP_START, /* SHORT: offset */ /*29*/ AWE_FX_LOOP_END, /* SHORT: offset */ /*30*/ AWE_FX_COARSE_SAMPLE_START, /* SHORT: upper word offset */ /*31*/ AWE_FX_COARSE_LOOP_START, /* SHORT: upper word offset */ /*32*/ AWE_FX_COARSE_LOOP_END, /* SHORT: upper word offset */ /*33*/ AWE_FX_ATTEN, /* BYTE: lo IFATN */ AWE_FX_END, }; #endif /* AWE_VOICE_H */ playmidi-2.4.orig/io_gtk.c0100644000175000017500000002366706604564642013377 0ustar dsds/************************************************************************ io_gtk.c -- shows midi events in X11/Gnome using Gtk widgets Copyright (C) 1995-1996 Nathan I. Laredo Copyright (C) 1997 Elliot Lee This program is modifiable/redistributable under the terms of the GNU General Public Licence. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Send your comments and all your spare pocket change to laredo@gnu.ai.mit.edu (Nathan Laredo) or to PSC 1, BOX 709, 2401 Kelly Drive, Lackland AFB, TX 78236-5128, USA. *************************************************************************/ #include "playmidi.h" #include "bitmaps.h" #include #include #include extern int chanmask, play_gus, play_fm, play_ext, gus_dev, sb_dev, ext_dev; extern int graphics, verbose, perc, ntrks; extern int note_vel[16][128]; extern unsigned long int ticks; extern char *filename, *gmvoice[256]; extern float skew; extern void seq_reset(); extern struct chanstate channel[16]; extern void seq_stop_note(int, int, int, int); extern struct timeval start_time; struct timeval want_time, now_time; typedef unsigned char Boolean; #define True 1 #define False 0 /* Gives us t2 usecs - t1 usecs */ int cdeltat(struct timeval *t1, struct timeval *t2) { long long d1 = (t1->tv_sec * 10000) + t1->tv_usec; long long d2 = (t2->tv_sec * 10000) + t2->tv_usec; return (int)(d1 - d2); } int cdeltat_old(t1, t2) struct timeval *t1; struct timeval *t2; { int d1, d2; d1 = t1->tv_sec - t2->tv_sec; if((d2 = t1->tv_usec - t2->tv_usec) < 0) (d2 += 1000000, d1 -= 1); d2 /= 10000; return (d2 + d1 * 100); } GtkWindow *mainwin; GtkVBox *dispbox; GtkHBox *mwbox, *btnbox; GtkButton *exit_button, *nextsong, *prevsong, *repeatsong; GtkToggleButton *cbutton[16]; GtkProgressBar *cmeter[16]; GtkHScale *scrollbar; GtkAdjustment *sbadj; GtkText *miditext; GtkLabel *lbl_timer; gint timer_tag, quittimer_tag; #define TEXTSIZE 8192 char textbuf[TEXTSIZE]; int i, return_do_what; int vu_level[16], vu_delta[16]; char *drumset[11] = { "Standard Kit", "Room Kit", "Power Kit", "Electronic Kit", "TR-808 Kit", "Jazz Kit", "Brush Kit", "Orchestra Kit", "Sound FX Kit", "Program Kit", "MT-32 Kit" }; #define SET(x) (x == 8 ? 1 : x >= 16 && x <= 23 ? 2 : x == 24 ? 3 : \ x == 25 ? 4 : x == 32 ? 5 : x >= 40 && x <= 47 ? 6 : \ x == 48 ? 7 : x == 56 ? 8 : x >= 96 && x <= 111 ? 9 : \ x == 127 ? 10 : 0) void close_show(int error) { gtk_exit(error); } void ExitCallback(GtkWidget *w) { close_show(0); } void MaskCallback(GtkWidget *w) { int i, j, k; for (i = 0; i < 16 && cbutton[i] != GTK_TOGGLE_BUTTON(w); i++); if (i < 0 || i >= 16) return; if (GTK_TOGGLE_BUTTON(w)->active) /* channel should be enabled */ chanmask |= (1 << i); else { /* need to stop all notes in channel */ chanmask &= (~(1 << i)); if (ISGUS(i)) k = gus_dev; else if (ISFM(i)) k = sb_dev; else k = ext_dev; for (j = 0; j < 128; j++) if (note_vel[i][j]) seq_stop_note(k, i, j, note_vel[i][j] = 0); } } void SkewCallback(GtkScale *w) { skew = (sbadj->value * 3.75) + 0.25; } void playCallback(GtkButton *w) { seq_reset(); if(w == nextsong) return_do_what = 1; else if(w == prevsong) return_do_what = -1; else if(w == repeatsong) return_do_what = 0; else g_print("Unknown button pressed\n"); } void updateMeter(int chn) { gtk_progress_bar_update(cmeter[chn], (5 + vu_level[chn]) / 200.0); } Boolean return_now; int oldsec = 0, oldusec = 0; void TimerCallback(gpointer data) { int i, sec, usec; gettimeofday(&now_time, NULL); if(start_time.tv_sec && start_time.tv_usec) { sec = now_time.tv_sec - start_time.tv_sec; usec = now_time.tv_usec - start_time.tv_usec; } else sec = usec = 0; if (usec < 0) (usec += 1000000, sec -= 1); /* update vu meter values */ for (i = 0; i < 16; i++) if (vu_delta[i]) { /* decay meter */ vu_level[i] -= vu_delta[i]; if (vu_level[i] < 0) vu_level[i] = vu_delta[i] = 0; if(sec > oldsec) updateMeter(i); } usec /= 100000; /* change to 10ths of a second */ if(sec > oldsec) { sprintf(textbuf, "%02d:%02d.%d", sec / 60, sec % 60, usec); gtk_label_set(lbl_timer, textbuf); gtk_widget_queue_draw(lbl_timer); oldsec = sec; oldusec = usec; } if(return_do_what != NO_EXIT || cdeltat(&want_time, &now_time) < 100) { return_now = True; gtk_main_quit(); } } void quittimer(gpointer data) { gtk_timeout_remove(quittimer_tag); return_now = True; gettimeofday(&now_time, NULL); g_print("quittimer with %d\n", cdeltat(&want_time, &now_time)); gtk_main_quit(); } int updatestatus(void) { return_now = False; want_time.tv_sec = start_time.tv_sec + (ticks / 100); want_time.tv_usec = start_time.tv_usec + (ticks % 100) * 10000; if (want_time.tv_usec > 1000000) (want_time.tv_usec -= 1000000, want_time.tv_sec++); return_do_what = NO_EXIT; /* gettimeofday(&now_time, NULL); if(cdeltat(&want_time, &now_time) < 100) return return_do_what; quittimer_tag = gtk_timeout_add((cdeltat(&want_time, &now_time)/1000) - 5, quittimer, NULL); g_print("Timeout in %d ms\n", (cdeltat(&want_time, &now_time)/1000) - 5); */ gtk_main(); return return_do_what; } void AppendText(char *s) { return; } #define TEXTBUF (&textbuf[strlen(textbuf)]) void showevent(int cmd, unsigned char *data, int length) { int chn, note, vel, i; chn = (cmd & 0x0f); note = (data[0] & 0x7f); vel = (data[1] & 0x7f); if (cmd < 8 && cmd > 0) { strncpy(textbuf, data, length < TEXTSIZE - 4 ? length : TEXTSIZE - 3); textbuf[(length > TEXTSIZE + 2) ? TEXTSIZE - 2 : length] = '\0'; sprintf(TEXTBUF, "\n"); AppendText(textbuf); if (verbose > 2) printf(textbuf); } else if (cmd & 0x80) switch (cmd & 0xf0) { case MIDI_NOTEON: if (!vel && vu_level[chn]) vu_delta[chn] = 32; else (vu_level[chn] = vel, vu_delta[chn] = 0); updateMeter(chn); break; case MIDI_NOTEOFF: if (vu_level[chn]) vu_delta[chn] = vel / 2; updateMeter(chn); break; case MIDI_PGM_CHANGE: if (!ISPERC(chn)) gtk_label_set(GTK_BUTTON(cbutton[chn])->child, gmvoice[note]); else gtk_label_set(GTK_BUTTON(cbutton[chn])->child, drumset[SET(note)]); break; case 0xf0: case 0xf7: sprintf(textbuf, "Sysex(%2x): ", cmd); for (i = 0; i < length && i < (TEXTSIZE / 2) - 16; i++) sprintf(TEXTBUF, "%02x", data[i]); sprintf(TEXTBUF, "\n"); AppendText(textbuf); if (verbose > 2) printf(textbuf); break; default: break; } } void init_show(void) { int i; sbadj->value = 1.0; gtk_widget_queue_draw(GTK_WIDGET(scrollbar)); for(i = 0; i < 16; i++) { vu_level[i] = vu_delta[i] = 0; updateMeter(i); sprintf(textbuf, "channel%02d", i + 1); gtk_label_set(GTK_BUTTON(cbutton[i])->child, textbuf); } gtk_label_set(lbl_timer, "00:00.0"); gtk_window_set_title(mainwin, filename); } void nuttin(void) {} #define SW(x) gtk_widget_show(GTK_WIDGET(x)) void setup_show(int argc, char **argv) { int i; gtk_init(&argc, &argv); mainwin = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); graphics++; mwbox = GTK_HBOX(gtk_hbox_new(1, 5)); SW(mwbox); btnbox = GTK_HBOX(gtk_hbox_new(1, 5)); SW(btnbox); dispbox = GTK_VBOX(gtk_vbox_new(1, 5)); SW(dispbox); gtk_box_pack_start_defaults(GTK_WIDGET(mwbox), dispbox); gtk_box_pack_start_defaults(GTK_WIDGET(dispbox), btnbox); gtk_window_set_title(mainwin, "Gtk" RELEASE " by Nathan Laredo (Gtk by Elliot Lee)"); sbadj = gtk_adjustment_new(1.0, 0.0, 2.0, 0.05, 1.0, 2.0); /* XXX ??? */ scrollbar = GTK_HSCALE(gtk_hscale_new(sbadj)); gtk_scale_set_draw_value(GTK_WIDGET(scrollbar), TRUE); gtk_scale_set_digits(GTK_WIDGET(scrollbar), 1); gtk_signal_connect(GTK_OBJECT(sbadj), "changed", (GtkSignalFunc)SkewCallback, NULL); SW(scrollbar); gtk_box_pack_start_defaults(GTK_WIDGET(dispbox), scrollbar); for(i = 0; i < 16; i++) { GtkWidget *tmp; sprintf(textbuf, "channel%02d", i + 1); cbutton[i] = GTK_TOGGLE_BUTTON(gtk_toggle_button_new_with_label(textbuf)); gtk_toggle_button_set_state(cbutton[i], TRUE); gtk_signal_connect(GTK_OBJECT(cbutton[i]), "toggled", (GtkSignalFunc)MaskCallback, NULL); gtk_widget_set_usize(cbutton[i], 80, 10); SW(cbutton[i]); sprintf(textbuf, "meter%02d", i + 1); cmeter[i] = GTK_PROGRESS_BAR(gtk_progress_bar_new()); gtk_widget_set_usize(cmeter[i], 50, 10); SW(cmeter[i]); tmp = gtk_hbox_new(1, 5); SW(tmp); gtk_box_pack_start_defaults(tmp, cbutton[i]); gtk_box_pack_start_defaults(tmp, cmeter[i]); gtk_box_pack_start_defaults(dispbox, tmp); } lbl_timer = gtk_label_new("00:00.0"); SW(lbl_timer); gtk_box_pack_start_defaults(dispbox, lbl_timer); exit_button = GTK_BUTTON(gtk_button_new_with_label("Exit")); SW(exit_button); gtk_signal_connect(exit_button, "clicked", (GtkSignalFunc)ExitCallback, 0); prevsong = GTK_BUTTON(gtk_button_new_with_label("<<")); SW(prevsong); gtk_signal_connect(prevsong, "clicked", (GtkSignalFunc)playCallback, NULL); repeatsong = GTK_BUTTON(gtk_button_new_with_label(" > ")); SW(repeatsong); gtk_signal_connect(repeatsong, "clicked", (GtkSignalFunc)playCallback, NULL); nextsong = GTK_BUTTON(gtk_button_new_with_label(">>")); SW(nextsong); gtk_signal_connect(nextsong, "clicked", (GtkSignalFunc)playCallback, NULL); gtk_box_pack_start_defaults(btnbox, exit_button); gtk_box_pack_start_defaults(btnbox, nextsong); gtk_box_pack_start_defaults(btnbox, prevsong); gtk_box_pack_start_defaults(btnbox, repeatsong); /* timer_tag = gtk_timeout_add(100, (GtkFunction)TimerCallback, NULL); */ gtk_idle_add((GtkFunction)TimerCallback, NULL); gtk_container_add(mainwin, mwbox); gtk_main_iteration(); SW(mainwin); } #undef SW