LMMS
Loading...
Searching...
No Matches
Envelope.h
Go to the documentation of this file.
1/*
2 ZynAddSubFX - a software synthesizer
3
4 Envelope.h - Envelope implementation
5 Copyright (C) 2002-2005 Nasca Octavian Paul
6 Author: Nasca Octavian Paul
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12*/
13
14#ifndef ENVELOPE_H
15#define ENVELOPE_H
16
17#include "../globals.h"
18#include "WatchPoint.h"
19
20namespace zyncarla {
21
24{
25 public:
26
28 Envelope(class EnvelopeParams &pars, float basefreq, float dt, WatchManager *m=0,
29 const char *watch_prefix=0);
31 ~Envelope(void);
32 void releasekey(void);
34 void forceFinish(void);
35 float envout(bool doWatch=true);
36 float envout_dB(void);
39 bool finished(void) const;
40 private:
42 int envsustain; //"-1" means disabled
43 float envdt[MAX_ENVELOPE_POINTS]; //millisecons
44 float envval[MAX_ENVELOPE_POINTS]; // [0.0f .. 1.0f]
47
48 int currentpoint; //current envelope point (starts from 1)
50 bool keyreleased; //if the key was released
52 float t; // the time from the last point
53 float inct; // the time increment
54 float envoutval; //used to do the forced release
55
57};
58
59}
60
61#endif
#define MAX_ENVELOPE_POINTS
Definition globals.h:191
static float dt(char val)
Definition EnvelopeFreeEdit.cpp:124
struct Envelope Envelope
~Envelope(void)
Definition Envelope.cpp:83
bool envfinish
Definition Envelope.h:51
int currentpoint
Definition Envelope.h:48
bool forcedrelease
Definition Envelope.h:49
float envoutval
Definition Envelope.h:54
float envval[MAX_ENVELOPE_POINTS]
Definition Envelope.h:44
Envelope(class EnvelopeParams &pars, float basefreq, float dt, WatchManager *m=0, const char *watch_prefix=0)
Definition Envelope.cpp:20
void releasekey(void)
Definition Envelope.cpp:90
float t
Definition Envelope.h:52
void forceFinish(void)
Definition Envelope.cpp:99
float envout(bool doWatch=true)
Definition Envelope.cpp:107
int linearenvelope
Definition Envelope.h:46
VecWatchPoint watchOut
Definition Envelope.h:56
int envpoints
Definition Envelope.h:41
float inct
Definition Envelope.h:53
bool keyreleased
Definition Envelope.h:50
float envstretch
Definition Envelope.h:45
float envout_dB(void)
Definition Envelope.cpp:181
bool finished(void) const
Definition Envelope.cpp:213
int envsustain
Definition Envelope.h:42
float envdt[MAX_ENVELOPE_POINTS]
Definition Envelope.h:43
Definition EnvelopeParams.h:24
unsigned * m
Definition inflate.c:1559
Definition zynaddsubfx-src.cpp:569
Definition WatchPoint.h:75
Definition WatchPoint.h:37