2 ZynAddSubFX - a software synthesizer
4 Envelope.h - Envelope implementation
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
35 EnvelopeParams
* envpars
,
43 bool finished(); // returns whether envelope has finished or not
47 int envsustain
; // "-1" means disabled
48 float envdt
[MAX_ENVELOPE_POINTS
]; // millisecons
49 float envval
[MAX_ENVELOPE_POINTS
]; // [0.0 .. 1.0]
53 int currentpoint
; // current envelope point (starts from 1)
54 bool m_forced_release
;
55 bool m_key_released
; // whether the key was released or not
56 bool m_finished
; // whether envelope has finished or not
57 float t
; // the time from the last point
58 float inct
; // the time increment
59 float envoutval
; // used to do the forced release