Logo Search packages:      
Sourcecode: s3mod version File versions

tables.h

#ifndef _TABLES_H
#define _TABLES_H 1

#define NUM_PERIODS 128         /* number of periods in period table */
#define NUM_VIBRA 64            /* number of values in vibrato table */
#define NOTE_BASE 0             /* lowest note possible */
 

/* This file is part of the GMOD package */

/* base frequencies for the various sample tunings */

unsigned short base_freq_table[] =
{
  8448, 8508, 8568, 8629, 8692, 8755, 8819, 8884,
  7982, 8035, 8089, 8144, 8199, 8274, 8331, 8389
};

unsigned short period_table[] =
{
13696, 12928, 12192, 11520, 10848, 10240, 9664, 9120, 8606, 8128, 7680, 7248,
  6848, 6464, 6096, 5760, 5424, 5120, 4832, 4560, 4304, 4064, 3840, 3624,
  3424, 3232, 3048, 2880, 2712, 2560, 2416, 2280, 2152, 2032, 1920, 1812,
  1712, 1616, 1524, 1440, 1356, 1280, 1208, 1140, 1076, 1016, 960, 906,
  856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453,
  428, 404, 381, 360, 339, 320, 302, 285, 269, 254, 240, 226,
  214, 202, 190, 180, 170, 160, 151, 143, 135, 127, 120, 113,
  107, 101, 95, 90, 85, 80, 75, 71, 67, 63, 60, 57,
  54, 51, 48, 45, 42, 40, 38, 36, 34, 32, 30, 28,
  27, 25, 24, 22, 21, 20, 19, 18, 17, 16, 15, 14,
  13, 13, 12, 11, 11, 10, 9, 9
};

short vibra_table[][NUM_VIBRA] =
{
/* sine wave */

  {0, 24, 49, 74, 97, 120, 141, 161,
   180, 197, 212, 224, 235, 244, 250, 253,
   255, 253, 250, 244, 235, 224, 212, 197,
   180, 161, 141, 120, 97, 74, 49, 24,
   0, -24, -49, -74, -97, -120, -141, -161,
   -180, -197, -212, -224, -235, -244, -250, -253,
   -255, -253, -250, -244, -235, -224, -212, -197,
   -180, -161, -141, -120, -97, -74, -49, -24},

/* ramp down wave */

  {0, 8, 16, 24, 32, 40, 48, 56,
   64, 72, 80, 88, 96, 104, 112, 120,
   128, 136, 144, 152, 160, 168, 176, 184,
   192, 200, 208, 216, 224, 232, 240, 248,
   -255, -248, -240, -232, -224, -216, -208, -200,
   -192, -184, -176, -168, -160, -152, -144, -136,
   -128, -120, -112, -104, -96, -88, -80, -72,
   -64, -56, -48, -40, -32, -24, -16, -8},

/* square wave */

  {255, 255, 255, 255, 255, 255, 255, 255,
   255, 255, 255, 255, 255, 255, 255, 255,
   255, 255, 255, 255, 255, 255, 255, 255,
   255, 255, 255, 255, 255, 255, 255, 255,
   -255, -255, -255, -255, -255, -255, -255, -255,
   -255, -255, -255, -255, -255, -255, -255, -255,
   -255, -255, -255, -255, -255, -255, -255, -255,
   -255, -255, -255, -255, -255, -255, -255, -255},
};


int byte_pan_table[16] =
{
  -128, -112, -96, -84, -72, -60, -48, -36,
  35, 47, 59, 71, 83, 56, 111, 127
};

#endif /* _TABLES_H */

Generated by  Doxygen 1.6.0   Back to index