-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMidiEnvelope.h
62 lines (43 loc) · 1.33 KB
/
MidiEnvelope.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
==============================================================================
MidiEnvelope.h
Created: 15 Mar 2022 11:05:33am
Author: renda
==============================================================================
*/
#include <JuceHeader.h>
#include "Oscillator.h"
#include "Filter.h"
#include "Adsr.h"
//==============================================================================
class MidiEnvelope : public juce::Component
{
public:
MidiEnvelope(MidiChannel* midiChan)
{
setSize(600, 200);
addAndMakeVisible(&oscGui);
addAndMakeVisible(adsrGui);
addAndMakeVisible(&filterGui);
//oscGui.oscMenu.onChange = [this] {prova(); };
}
~MidiEnvelope()
{
}
void paint(juce::Graphics& g) override
{
}
void resized() override
{
juce::Rectangle<int> area = getLocalBounds();
const int componentWidth = 200;
const int componentHeight = 200;
oscGui.setBounds(area.removeFromLeft(componentWidth).removeFromTop(componentHeight));
filterGui.setBounds(area.removeFromLeft(componentWidth).removeFromTop(componentHeight));
adsrGui.setBounds(area.removeFromLeft(componentWidth).removeFromTop(componentHeight));
}
//private:
Oscillator oscGui;
Filter filterGui;
Adsr adsrGui;
};