3 Ann Hell Ex Machina - Music Software
4 Copyright (C) 2003/2005 Angel Ortega <angel@triptico.com>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 http://www.triptico.com
25 #define SS_GEN_NUM 256
30 int note_id
; /* note ID */
31 float vol
; /* volume */
32 struct ss_wave
* w
; /* the wave data */
34 double cursor
; /* offset to next sample */
35 double inc
; /* increment (frequency) */
37 int sustain
; /* number of frames to play after release */
38 float dvol
; /* volume decrement in sustain */
40 double vibrato
; /* vibrato oscillator */
41 double vib_depth
; /* vibrato depth */
42 double vib_inc
; /* increment for vibrato oscillator */
44 double portamento
; /* portamento sum to inc */
51 struct ss_gen
* ss_gen_alloc(struct ss_gen
** q
);
52 void ss_gen_free(struct ss_gen
** q
, struct ss_gen
* g
);
54 void ss_gen_sustain(struct ss_gen
* g
, double sustain
);
55 void ss_gen_vibrato(struct ss_gen
* g
, double depth
, double freq
);
57 void ss_gen_play(struct ss_gen
* g
, double freq
, float vol
, int note_id
,
60 void ss_gen_release(struct ss_gen
* g
);
62 int ss_gen_frame(struct ss_gen
* g
, int n_channels
, float frame
[]);