2 ==============================================================================
4 This file was auto-generated by the Jucer!
6 It contains the basic startup code for a Juce application.
8 ==============================================================================
11 #ifndef __PLUGINPROCESSOR_H_526ED7A9__
12 #define __PLUGINPROCESSOR_H_526ED7A9__
14 #include "../JuceLibraryCode/JuceHeader.h"
15 #include "../JuceLibraryCode/JucePluginCharacteristics.h"
18 //==============================================================================
21 class JuceDemoPluginAudioProcessor
: public AudioProcessor
24 //==============================================================================
25 JuceDemoPluginAudioProcessor();
26 ~JuceDemoPluginAudioProcessor();
28 //==============================================================================
29 void prepareToPlay (double sampleRate
, int samplesPerBlock
);
30 void releaseResources();
31 void processBlock (AudioSampleBuffer
& buffer
, MidiBuffer
& midiMessages
);
34 //==============================================================================
35 bool hasEditor() const { return true; }
36 AudioProcessorEditor
* createEditor();
38 //==============================================================================
39 const String
getName() const { return JucePlugin_Name
; }
41 int getNumParameters();
42 float getParameter (int index
);
43 void setParameter (int index
, float newValue
);
44 const String
getParameterName (int index
);
45 const String
getParameterText (int index
);
47 const String
getInputChannelName (int channelIndex
) const;
48 const String
getOutputChannelName (int channelIndex
) const;
49 bool isInputChannelStereoPair (int index
) const;
50 bool isOutputChannelStereoPair (int index
) const;
52 bool acceptsMidi() const;
53 bool producesMidi() const;
55 //==============================================================================
56 int getNumPrograms() { return 0; }
57 int getCurrentProgram() { return 0; }
58 void setCurrentProgram (int /*index*/) { }
59 const String
getProgramName (int /*index*/) { return String::empty
; }
60 void changeProgramName (int /*index*/, const String
& /*newName*/) { }
62 //==============================================================================
63 void getStateInformation (MemoryBlock
& destData
);
64 void setStateInformation (const void* data
, int sizeInBytes
);
66 //==============================================================================
67 // These properties are public so that our editor component can access them
68 // A bit of a hacky way to do it, but it's only a demo! Obviously in your own
69 // code you'll do this much more neatly..
71 // this is kept up to date with the midi messages that arrive, and the UI component
72 // registers with it so it can represent the incoming messages
73 MidiKeyboardState keyboardState
;
75 // this keeps a copy of the last set of time info that was acquired during an audio
76 // callback - the UI component will read this and display it.
77 AudioPlayHead::CurrentPositionInfo lastPosInfo
;
79 // these are used to persist the UI's size - the values are stored along with the
80 // filter's other parameters, and the UI component will update them when it gets
82 int lastUIWidth
, lastUIHeight
;
84 //==============================================================================
96 //==============================================================================
97 AudioSampleBuffer delayBuffer
;
103 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceDemoPluginAudioProcessor
);
106 #endif // __PLUGINPROCESSOR_H_526ED7A9__