💾 Archived View for blitter.com › OLGA › MUSIC › RESOURCES › DOS_TAB_UTILS › TABPLAY › SOURCES › TPL… captured on 2024-08-18 at 19:38:39.

View Raw

More Information

⬅️ Previous capture (2022-06-12)

-=-=-=-=-=-=-

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <dos.h>
#include <bios.h>
#include <conio.h>
#include <stdlib.h>
#include "adlib.h"

#define PORT 0x388
#define tabs_per_page 1
#define DETUNE 1       /* play DETUNE midi notes lower than standard */
#define LEN 100

void intro(void);
void get_tab(char filename[25]);
void init_strgs(void);
void drawfrets(void);
void drawbanjofrets(void);
void drawbassfrets(void);
void drawnote(int str, int numb);
void erasenote(int str, int numb);
void status_bar(void);
void score_board(void);

/* serial midi functions support midi interface (in serl.asm) */

extern void _snon(int ch,int num);
extern void _snoff(int ch,int num);
extern void _init(void);
extern volatile unsigned long int ticks_td;

/* various Sound Card FM stuff */
int Drum_Volume=110,Inst_Volume=127,Beats_per_minute=60;
int Delay_per_beat;

int PIANO[28] ={1,3,3,15,5,0,1,3,15,0,0,0,1,0,7,0,15,7,0,2,4,0,0,0,1,0,0,0 };
int MARIMBA[28] ={0,2,5,15,0,0,0,5,21,0,0,1,1,2,1,-72,15,0,0,0,3,0,0,0,1,0,0,0 };
int KEYBRD2[28] ={2,1,4,15,11,0,2,13,15,0,0,0,1,2,4,59,8,11,0,2,13,0,0,0,1,0,0,0 };
int CLSGTR[28] ={2,1,4,15,32,30,2,3,15,0,0,0,1,2,4,72,8,11,0,2,7,0,0,0,1,0,0,0 };
/*int ACCGTR[28] ={2,1,4,15,11,0,2,3,15,1,0,1,1,2,24,40,8,4,0,2,13,0,0,0,1,0,0,0 };*/
int ACCGTR[28] ={2,1,4,15,40,0,2,13,15,0,1,0,1,2,2,40,8,11,0,2,13,0,0,0,1,0,0,0 };
/* v1.53 int ACCGTR[28] ={2,1,4,15,11,0,2,13,15,0,1,0,1,2,4,40,8,11,0,2,13,0,0,0,1,0,0,0 }; */
int BASSGTR[28] ={1,1,4,15,6,0,2,13,15,0,0,0,1,2,4,2,8,11,0,2,7,0,0,0,1,0,0,0 };
int BANJOLIN[28] ={0,1,3,15,1,0,0,5,1,0,0,1,1,2,1,2,-72,0,0,0,3,0,0,0,1,0,0,0 };
int ELECPNO[28] ={1,1,3,15,5,0,1,3,15,0,0,0,1,0,1,1,15,7,0,2,12,0,0,0,1,0,0,0 };

/* global vars for tplay */
char TabFilename[25];
char instrument[12];
char tuning[6];
char version[6]="1.53�\0";
int data[50][6][80];
int buffer[6];
int string[6];
int tabl[50];
int dashtime=100;    /* default timing delay */
unsigned long int tick_1, tick_2, elapsedtime;
int dashmax=32;
int eraseall=0;
int instrnum=4;
int vol=64;
int tdone=0;
int showtab=1;
int sb_ok;
int strgs=6;    /* change for other instruments */
int bass=0;
int Fine_Tune=3321;
int dest_hw=0;

/* instrument table */
char	  inst[128][16] =
    {
	       /* instrument1 */
        {   0x021,0x011,0x04C,0x000,0x0F1,0x0F2,0x063,0x072,
            0x000,0x000,0x004,0x000,0x000,0x000,0x000,0x000 },

        {   0x0A5,0x0B1,0x0D2,0x080,0x081,0x0F1,0x003,0x005,
            0x000,0x000,0x002,0x000,0x000,0x000,0x000,0x000 },

        {   0x072,0x062,0x01C,0x005,0x051,0x052,0x003,0x013,
            0x000,0x000,0x00E,0x000,0x000,0x000,0x000,0x000 },

        {   0x011,0x001,0x08A,0x040,0x0F1,0x0F1,0x011,0x0B3,
            0x000,0x000,0x006,0x000,0x000,0x000,0x000,0x000 },

        {   0x021,0x011,0x011,0x000,0x0A3,0x0C4,0x043,0x022,
            0x002,0x000,0x00D,0x000,0x000,0x000,0x000,0x000 },

	       /* instrument6 */
        {   0x031,0x0A1,0x01C,0x080,0x041,0x092,0x00B,0x03B,
            0x000,0x000,0x00E,0x000,0x000,0x000,0x000,0x000 },

        {   0x071,0x062,0x0C5,0x005,0x06E,0x08B,0x017,0x00E,
            0x000,0x000,0x002,0x000,0x000,0x000,0x000,0x000 },

        {   0x041,0x091,0x083,0x000,0x065,0x032,0x005,0x074,
            0x000,0x000,0x00A,0x000,0x000,0x000,0x000,0x000 },

        {   0x032,0x016,0x087,0x080,0x0A1,0x07D,0x010,0x033,
            0x000,0x000,0x008,0x000,0x000,0x000,0x000,0x000 },

        {   0x001,0x013,0x08D,0x000,0x051,0x052,0x053,0x07C,
            0x001,0x000,0x00C,0x000,0x000,0x000,0x000,0x000 }
    } ;