-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPluginProcessor.h
113 lines (92 loc) · 3.72 KB
/
PluginProcessor.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*
==============================================================================
This file was auto-generated by the Introjucer!
It contains the basic framework code for a JUCE plugin processor.
==============================================================================
*/
#ifndef PLUGINPROCESSOR_H_INCLUDED
#define PLUGINPROCESSOR_H_INCLUDED
//#include <../drowaudio-master/dRowAudio/gui/dRowAudio_AudioOscilloscope.h>
//#include "../drowaudio-master/dRowAudio.h"
#include "../JuceLibraryCode/JuceHeader.h"
#include "iSynth.h"
#include "MIDIContentComponent.h"
//==============================================================================
/**
*/
class ISynthPluginAudioProcessor : public AudioProcessor /*classe base per audio-processing*/
{
public:
//==============================================================================
ISynthPluginAudioProcessor();
~ISynthPluginAudioProcessor();
//==============================================================================
void prepareToPlay (double sampleRate, int samplesPerBlock) override;
void releaseResources() override;
void processBlock (AudioSampleBuffer&, MidiBuffer&) override;
//==============================================================================
AudioProcessorEditor* createEditor() override;
bool hasEditor() const override;
//==============================================================================
const String getName() const override;
int getNumParameters() override;
float getParameter (int index) override;
void setParameter (int index, float newValue) override;
const String getParameterName (int index) override;
const String getParameterText (int index) override;
const String getInputChannelName (int channelIndex) const override;
const String getOutputChannelName (int channelIndex) const override;
bool isInputChannelStereoPair (int index) const override;
bool isOutputChannelStereoPair (int index) const override;
bool acceptsMidi() const override;
bool producesMidi() const override;
bool silenceInProducesSilenceOut() const override;
double getTailLengthSeconds() const override;
//==============================================================================
int getNumPrograms() override;
int getCurrentProgram() override;
void setCurrentProgram (int index) override;
const String getProgramName (int index) override;
void changeProgramName (int index, const String& newName) override;
//==============================================================================
void getStateInformation (juce::MemoryBlock& destData) override;
void setStateInformation (const void* data, int sizeInBytes) override;
enum Parameters
{
SliderOsc,
SliderOsc1,
ByPass,
ByPass1,
oscMode,
oscMode1,
envA,
envD,
envS,
envR,
ByPass4,
cof,
res,
ByPass2,
filMode,
ByPass3,
lfoFreq,
lfoFilterModAmount,
lfoMode,
lfoMode2,
midiMSG,
seqMode,
sliderSeq,
totalNumParam
};
bool NeedsUIUpdate(){return UIUpdateFlag;};
void RequestUIUpdate(){UIUpdateFlag=true;};
void ClearUIUpdateFlag(){UIUpdateFlag=false;};
private:
int lastSeqMode;
bool UIUpdateFlag;
float UserParams[totalNumParam];
iSynth synth;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ISynthPluginAudioProcessor)
};
#endif // PLUGINPROCESSOR_H_INCLUDED