~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to kmidi/tables.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
        $Id: tables.h,v 1.11 2000/01/11 06:00:31 greglee Exp $
 
3
 
 
4
    TiMidity -- Experimental MIDI to WAVE converter
 
5
    Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
 
6
 
 
7
    This program is free software; you can redistribute it and/or modify
 
8
    it under the terms of the GNU General Public License as published by
 
9
    the Free Software Foundation; either version 2 of the License, or
 
10
    (at your option) any later version.
 
11
 
 
12
    This program is distributed in the hope that it will be useful,
 
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
    GNU General Public License for more details.
 
16
 
 
17
    You should have received a copy of the GNU General Public License
 
18
    along with this program; if not, write to the Free Software
 
19
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
20
 
 
21
    tables.h
 
22
*/
 
23
 
 
24
#ifdef LOOKUP_SINE
 
25
extern FLOAT_T sine(int x);
 
26
#else
 
27
#include <math.h>
 
28
#ifndef PI
 
29
#  define PI M_PI
 
30
#endif
 
31
#define sine(x) (sin((2*PI/1024.0) * (x)))
 
32
#endif
 
33
 
 
34
#define SINE_CYCLE_LENGTH 1024
 
35
extern uint32 freq_table[];
 
36
#ifdef tplus
 
37
extern FLOAT_T *vol_table;
 
38
extern FLOAT_T def_vol_table[];
 
39
extern FLOAT_T gs_vol_table[];
 
40
extern FLOAT_T *xg_vol_table; /* == gs_vol_table */
 
41
#else
 
42
extern FLOAT_T vol_table[];
 
43
#endif
 
44
extern FLOAT_T expr_table[];
 
45
extern FLOAT_T bend_fine[];
 
46
extern FLOAT_T bend_coarse[];
 
47
#ifdef tplus
 
48
extern FLOAT_T midi_time_table[], midi_time_table2[];
 
49
#endif
 
50
extern FLOAT_T butterworth[101][5];
 
51
extern uint8 *_l2u; /* 13-bit PCM to 8-bit u-law */
 
52
extern uint8 _l2u_[]; /* used in LOOKUP_HACK */
 
53
#ifdef LOOKUP_HACK
 
54
extern int16 _u2l[];
 
55
extern int32 *mixup;
 
56
#ifdef LOOKUP_INTERPOLATION
 
57
extern int8 *iplookup;
 
58
#endif
 
59
#endif
 
60
 
 
61
extern void init_tables(void);
 
62
 
 
63
extern struct short_voice_type {
 
64
        const char *vname;
 
65
#define SOLO_MASK 1
 
66
        char flags;
 
67
} gm_voice[];
 
68