-
Notifications
You must be signed in to change notification settings - Fork 0
/
PluginEditor.h
99 lines (84 loc) · 4.31 KB
/
PluginEditor.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
==============================================================================
This file contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/
#pragma once
#include <JuceHeader.h>
#include "PluginProcessor.h"
#include "Constellations.h"
#include "MidiEnvelope.h"
//==============================================================================
/**
*/
class MixerPluginProjectFinaleAudioProcessorEditor : public juce::AudioProcessorEditor
{
public:
MixerPluginProjectFinaleAudioProcessorEditor (MixerPluginProjectFinaleAudioProcessor&);
~MixerPluginProjectFinaleAudioProcessorEditor() override;
//==============================================================================
void paint (juce::Graphics&) override;
void resized() override;
void getVisibleConstellations();
void updateMusicPath();
void managingConstellations(juce::String type);
void settingTheUI(juce::String type, juce::String itemText, juce::AudioProcessorGraph::Node::Ptr newNode,
AudioChannel* channel, MidiChannel* midi, FilterProcessor* filter, juce::AudioProcessorGraph::Node::Ptr filterNode);
void removeNodeAndUI(juce::AudioProcessorGraph::NodeID nodeToRemove, juce::AudioProcessorGraph::Node::Ptr nodePtr,
juce::Slider* slider, juce::TextButton* play, juce::TextButton* stop, juce::TextButton* del,
juce::DrawableText* text);
void removeNodeAndUIMidi(juce::AudioProcessorGraph::NodeID nodeID,
juce::AudioProcessorGraph::NodeID filterID,
juce::AudioProcessorGraph::Node::Ptr nodePtr,
juce::AudioProcessorGraph::Node::Ptr filterPtr,
juce::Slider* slider,
juce::TextButton* play, juce::TextButton* stop, juce::TextButton* del, juce::TextButton* open,
juce::DrawableText* text);
void volumeChangeSlider(juce::AudioProcessorGraph::Node::Ptr node, juce::Slider* slider);
void generalVolumeChanged();
//void playButtonClicked(juce::AudioProcessorGraph::Node::Ptr node,
// juce::TextButton* button, AudioChannel* channel);
void buttonClicked(juce::TextButton* playButton, juce::TextButton* stopButton, AudioChannel* channel, juce::String op);
void buttonClickedMidi(juce::TextButton* playButton, juce::TextButton* stopButton, MidiChannel* midiChan, juce::String op);
//void stopButtonClicked(juce::AudioProcessorGraph::Node::Ptr node,
// juce::TextButton* button, AudioChannel* channel);
void windowOpener(MidiChannel* midiChan, MidiEnvelope* env);
void settingUIAfterDelete(int index);
void changeOsc(MidiChannel* midiChan, MidiEnvelope* env);
void changeFilter(MidiEnvelope* env, FilterProcessor* filter);
void changeFrequency(MidiEnvelope* env, FilterProcessor* filter);
void changeResonance(MidiEnvelope* env, FilterProcessor* filter);
void changeAttack(MidiChannel* midiChan, MidiEnvelope* env);
void changeDecay(MidiChannel* midiChan, MidiEnvelope* env);
void changeRelease(MidiChannel* midiChan, MidiEnvelope* env);
void changeSustain(MidiChannel* midiChan, MidiEnvelope* env);
private:
// This reference is provided as a quick way for your editor to
// access the processor object that created it.
MixerPluginProjectFinaleAudioProcessor& audioProcessor;
Constellations starsInstance;
//Sonification soniInstance;
juce::TextButton startButton;
juce::ComboBox comboConstellations;
juce::ComboBox midiConstellations;
juce::Slider generalVolumeSlider;
juce::ComboBox alreadyAddedConstellations;
juce::TextEditor musicPath;
juce::TextButton getPathButton;
// User Interface //
juce::OwnedArray<juce::Slider> sliders;
juce::OwnedArray<juce::DrawableText> texts;
juce::OwnedArray<juce::TextButton> playButtons;
juce::OwnedArray<juce::TextButton> stopButtons;
juce::OwnedArray<juce::TextButton> removeButtons;
juce::OwnedArray<juce::TextButton> dialButtons;
juce::Array<juce::File> listOfFiles;
juce::File musicFolder;
int elementsOffset = 55;
bool testing = false;
std::unique_ptr<juce::DrawableText> generalVolumeText;
//MidiEnvelope midiEnv;
juce::DialogWindow::LaunchOptions dialog;
juce::OwnedArray<MidiEnvelope> envs;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MixerPluginProjectFinaleAudioProcessorEditor)
};