2 ZynAddSubFX - a software synthesizer
4 EnvelopeParams.h - Parameters for Envelope
5 Copyright (C) 2002-2005 Nasca Octavian Paul
6 Author: Nasca Octavian Paul
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of version 2 of the GNU General Public License
10 as published by the Free Software Foundation.
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 (version 2) for more details.
17 You should have received a copy of the GNU General Public License (version 2)
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef ENVELOPE_PARAMS_H
24 #define ENVELOPE_PARAMS_H
26 #define MAX_ENVELOPE_POINTS 40
27 #define MIN_ENVELOPE_DB -40
29 #define ZYN_ENVELOPE_MODE_ADSR 1 // ADSR parameters (linear amplitude)
30 #define ZYN_ENVELOPE_MODE_ADSR_DB 2 // ADSR_dB parameters (dB amplitude)
31 #define ZYN_ENVELOPE_MODE_ASR 3 // ASR parameters (frequency LFO)
32 #define ZYN_ENVELOPE_MODE_ADSR_FILTER 4 // ADSR_filter parameters (filter parameters)
33 #define ZYN_ENVELOPE_MODE_ASR_BW 5 // ASR_bw parameters (bandwidth parameters)
43 unsigned char stretch
,
48 char release_duration
,
53 unsigned char stretch
,
58 char release_duration
);
62 unsigned char stretch
,
68 char release_duration
,
73 unsigned char stretch
,
78 char release_duration
);
96 unsigned char duration
);
98 REALTYPE
getdt(unsigned char i
);
99 void set_point_value(int i
, unsigned char value
);
101 unsigned char Penvpoints
;
102 unsigned char Penvsustain
; // 127 pentru dezactivat
103 unsigned char Penvdt
[MAX_ENVELOPE_POINTS
];
104 float m_values
[MAX_ENVELOPE_POINTS
];
105 unsigned char m_values_params
[MAX_ENVELOPE_POINTS
];
108 // 64 = normal stretch (piano-like)
109 // 127 = 200% = envelope is stretched about 4 times/octave
110 unsigned char m_stretch
;
112 bool m_forced_release
;
114 bool m_linear
; // if the amplitude envelope is linear
116 unsigned int m_mode
; // one of ZYN_ENVELOPE_MODE_XXX
118 int m_attack_duration_index
;
119 int m_decay_duration_index
;
120 int m_release_duration_index
;
122 int m_attack_value_index
;
123 int m_decay_value_index
;
124 int m_sustain_value_index
;
125 int m_release_value_index
;