LMMS
Loading...
Searching...
No Matches
EnvelopeFreeEdit.h
Go to the documentation of this file.
1/*
2 ZynAddSubFX - a software synthesizer
3
4 EnvelopeFreeEdit.h - Envelope Edit View
5 Copyright (C) 2016 Mark McCurry
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11*/
12#pragma once
13#include <FL/Fl_Box.H>
15#include "Fl_Osc_Widget.H"
16
17
18//Define the types of envelope (TODO a properly located enum)
19//TODO check if ASR should be ASR *OR* ADR
20
21#define ENV_ADSR 1
22//#define ENV_ADSR 2
23#define ENV_ASR 3
24#define ENV_ADSR_FILTER 4
25#define ENV_ADSR_BW 5
26
27class EnvelopeFreeEdit : public Fl_Box, public Fl_Osc_Widget
28{
29 public:
30 EnvelopeFreeEdit(int x,int y, int w, int h, const char *label=0);
31 void init(void);
32 void setpair(Fl_Box *pair_);
33 int handle(int event) override;
34
35 void draw(void) override;
36 void OSC_raw(const char *msg) override;
37 void update(void) override;
38 void rebase(std::string new_base) override;
39
40
42
43 //How many points
45 private:
46 int getpointx(int n) const;
47 int getpointy(int n) const;
48 int getnearest(int x,int y) const;
49 float getdt(int i) const;
50
51 Fl_Box *pair; //XXX what the heck is this?
52
53 //cursor state
55
56 //The Points
59 //The Sustain point
63};
#define MAX_ENVELOPE_POINTS
Definition globals.h:191
int getpointy(int n) const
Definition EnvelopeFreeEdit.cpp:96
float getdt(int i) const
Definition EnvelopeFreeEdit.cpp:129
void setpair(Fl_Box *pair_)
Definition EnvelopeFreeEdit.cpp:75
int cpx
Definition EnvelopeFreeEdit.h:54
void OSC_raw(const char *msg) override
Definition EnvelopeFreeEdit.cpp:45
char Penvdt[MAX_ENVELOPE_POINTS]
Definition EnvelopeFreeEdit.h:57
Fl_Box * pair
Definition EnvelopeFreeEdit.h:51
char Penvval[MAX_ENVELOPE_POINTS]
Definition EnvelopeFreeEdit.h:58
int getnearest(int x, int y) const
Definition EnvelopeFreeEdit.cpp:107
int cpval
Definition EnvelopeFreeEdit.h:54
void rebase(std::string new_base) override
Definition EnvelopeFreeEdit.cpp:338
int handle(int event) override
Definition EnvelopeFreeEdit.cpp:216
int cpy
Definition EnvelopeFreeEdit.h:54
char Penvsustain
Definition EnvelopeFreeEdit.h:60
int button_state
Definition EnvelopeFreeEdit.h:61
int cpdt
Definition EnvelopeFreeEdit.h:54
int lastpoint
Definition EnvelopeFreeEdit.h:41
char Penvpoints
Definition EnvelopeFreeEdit.h:44
EnvelopeFreeEdit(int x, int y, int w, int h, const char *label=0)
Definition EnvelopeFreeEdit.cpp:22
void init(void)
Definition EnvelopeFreeEdit.cpp:31
void draw(void) override
Definition EnvelopeFreeEdit.cpp:136
int getpointx(int n) const
Definition EnvelopeFreeEdit.cpp:80
void update(void) override
Definition EnvelopeFreeEdit.cpp:330
int currentpoint
Definition EnvelopeFreeEdit.h:54
int mod_state
Definition EnvelopeFreeEdit.h:62
Fl_Osc_Widget(void)
Definition Fl_Osc_Widget.cpp:16
UINT_D64 w
Definition inflate.c:942
int y
Definition inflate.c:1588
register unsigned i
Definition inflate.c:1575
unsigned x[BMAX+1]
Definition inflate.c:1586
const char * msg
Definition missing_descriptor.c:20
int n
Definition crypt.c:458
uch h[RAND_HEAD_LEN]
Definition crypt.c:459