~luke.andrew/whysynth-controller/whysynth-refactor-filters

« back to all changes in this revision

Viewing changes to src/wave_tables.h

  • Committer: Luke Andrew
  • Date: 2011-03-30 10:05:45 UTC
  • Revision ID: luke.bzr@la.id.au-20110330100545-d90fiznwavvyc1mi
initial checkin from 20100922 tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* WhySynth DSSI software synthesizer plugin
 
2
 *
 
3
 * Copyright (C) 2005-2007 Sean Bolton.
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License as
 
7
 * published by the Free Software Foundation; either version 2 of
 
8
 * the License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be
 
11
 * useful, but WITHOUT ANY WARRANTY; without even the implied
 
12
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 
13
 * PURPOSE.  See the GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public
 
16
 * License along with this program; if not, write to the Free
 
17
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
 * Boston, MA 02110-1301 USA.
 
19
 */
 
20
 
 
21
#ifndef _WAVE_TABLES_H
 
22
#define _WAVE_TABLES_H
 
23
 
 
24
#define WAVETABLE_POINTS  1024
 
25
 
 
26
#define WAVETABLE_CROSSFADE_RANGE     5
 
27
 
 
28
#define WAVETABLE_MAX_WAVES  14 /* 'Formant' 1, 2 and 3, and 'Kick' each have 13, but PADsynth expands 'Formant 1' to 14 */
 
29
 
 
30
struct wave
 
31
{
 
32
    unsigned short max_key;    /* MIDI key number */
 
33
    unsigned short wavetable;  /* true for wavetable waves, false for sampleset samples */
 
34
    signed short * data;
 
35
};
 
36
 
 
37
struct wavetable
 
38
{
 
39
    char *      name;
 
40
#ifdef Y_GUI
 
41
    int         priority;
 
42
#endif
 
43
#ifdef Y_PLUGIN
 
44
    struct wave wave[WAVETABLE_MAX_WAVES];
 
45
#endif
 
46
};
 
47
 
 
48
extern int wavetables_count;
 
49
 
 
50
extern struct wavetable wavetable[];
 
51
 
 
52
void wave_tables_set_count(void);
 
53
 
 
54
#endif /* _WAVE_TABLES_H */