Add tools/ and manual/, move sources to src/
[dpadhero2.git] / src / sound / effect.h
blobe9f2abd81cde3bc1a4ab7a4b206b2e89210b9004
2 ; Copyright (C) 2004, 2005 Kent Hansen.
4 ; This file is part of Neotoxin.
6 ; Neotoxin is free software; you can redistribute it and/or modify
7 ; it under the terms of the GNU General Public License as published by
8 ; the Free Software Foundation; either version 2 of the License, or
9 ; (at your option) any later version.
11 ; Neotoxin 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
21 .ifndef EFFECT_H
22 .define EFFECT_H
24 .include <common/int16.h>
26 ; The possible kinds of effect.
27 .enum effect_kind
28 NO_EFFECT
29 SLIDE_UP_EFFECT
30 SLIDE_DOWN_EFFECT
31 PORTAMENTO_EFFECT
32 VIBRATO_EFFECT
33 ARPEGGIO_EFFECT
34 VOLUME_SLIDE_EFFECT
35 CUT_EFFECT
36 .ende
38 ; State associated with slide up/down effect generator.
39 .struc slide_state
40 amount .byte
41 .ends
43 ; State associated with portamento effect generator.
44 .struc portamento_state
45 amount .byte
46 ctrl .byte ; bit 7: halt. bit 0: direction
47 target .int16 ; target period
48 .ends
50 .record vibrato_param speed:4, depth:4
52 ; State associated with vibrato effect generator.
53 .struc vibrato_state
54 param .vibrato_param
55 delay .byte ; Initial delay
56 counter .byte ; Delay counter
57 pos .byte ; Position in vibrato lookup table
58 .ends
60 .record arpeggio_param first:4, second:4
62 ; State associated with arpeggio effect generator.
63 .struc arpeggio_state
64 param .arpeggio_param
65 pos .byte
66 .ends
68 ; Structure that describes effect state.
69 .struc effect_state
70 kind .effect_kind
71 .union
72 slide .slide_state ; kind == SLIDE_*_EFFECT
73 portamento .portamento_state ; kind == PORTAMENTO_EFFECT
74 vibrato .vibrato_state ; kind == VIBRATO_EFFECT
75 arpeggio .arpeggio_state ; kind == ARPEGGIO_EFFECT
76 tremolo .vibrato_state ; kind == TREMOLO_EFFECT
77 .ends
78 .ends
80 .endif ; !EFFECT_H