3 Ann Hell Ex Machina - Music Software
4 Copyright (C) 2003/2004 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
26 double base_freq
; /* base frequency */
27 double min_freq
; /* minimum frequency */
28 double max_freq
; /* maximum frequency */
30 int n_channels
; /* # of channels */
31 float * wave
[CHANNELS
]; /* the PCM waves */
33 double size
; /* size in samples */
34 int s_rate
; /* original sample rate */
35 double loop_start
; /* start of loop (-1, no loop) */
36 double loop_end
; /* end of loop */
42 int trk_id
; /* track ID */
43 struct ss_ins_layer
* layers
; /* layers */
44 int n_layers
; /* # of layers */
46 float vol
[CHANNELS
]; /* channel map */
47 int sustain
; /* sustain */
51 void ss_ins_init(struct ss_ins
* i
, int trk_id
);
53 int ss_ins_add_layer(struct ss_ins
* i
,
54 double base_freq
, double min_freq
, double max_freq
,
55 int n_channels
, float * wave
[],
56 double size
, int s_rate
,
57 double loop_start
, double loop_end
);
59 void ss_ins_set_channel_map(struct ss_ins
* i
,
60 int n_channels
, float vol
[]);
62 void ss_ins_set_sustain(struct ss_ins
* i
, int sustain
);
64 int ss_ins_note_on(struct ss_ins
* i
, int note
, float vol
, int note_id
);
66 void ss_ins_note_off(int note_id
);
68 void ss_ins_frame(int trk_id
, float frame
[]);