initial: added first widget

This commit is contained in:
2017-06-19 16:59:27 -04:00
parent 755ee11d51
commit 1842a6cfeb
6 changed files with 185 additions and 49 deletions

View File

@@ -1,18 +1,7 @@
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin processor.
==============================================================================
*/
#include "PluginProcessor.h"
#include "PluginEditor.h"
//==============================================================================
LampshadeAudioProcessor::LampshadeAudioProcessor()
#ifndef JucePlugin_PreferredChannelConfigurations
: AudioProcessor (BusesProperties()
@@ -31,7 +20,6 @@ LampshadeAudioProcessor::~LampshadeAudioProcessor()
{
}
//==============================================================================
const String LampshadeAudioProcessor::getName() const
{
return JucePlugin_Name;
@@ -48,11 +36,7 @@ bool LampshadeAudioProcessor::acceptsMidi() const
bool LampshadeAudioProcessor::producesMidi() const
{
#if JucePlugin_ProducesMidiOutput
return true;
#else
return false;
#endif
return false;
}
double LampshadeAudioProcessor::getTailLengthSeconds() const
@@ -62,8 +46,7 @@ double LampshadeAudioProcessor::getTailLengthSeconds() const
int LampshadeAudioProcessor::getNumPrograms()
{
return 1; // NB: some hosts don't cope very well if you tell them there are 0 programs,
// so this should be at least 1, even if you're not really implementing programs.
return 1;
}
int LampshadeAudioProcessor::getCurrentProgram()
@@ -84,31 +67,22 @@ void LampshadeAudioProcessor::changeProgramName (int index, const String& newNam
{
}
//==============================================================================
void LampshadeAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
{
// Use this method as the place to do any pre-playback
// initialisation that you need..
}
void LampshadeAudioProcessor::releaseResources()
{
// When playback stops, you can use this as an opportunity to free up any
// spare memory, etc.
}
#ifndef JucePlugin_PreferredChannelConfigurations
bool LampshadeAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
#if JucePlugin_IsMidiEffect
ignoreUnused (layouts);
return true;
#else
// This is the place where you check if the layout is supported.
// In this template code we only support mono or stereo.
if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono()
&& layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
return false;
// This is the place where you check if the layout is supported.
// In this template code we only support mono or stereo.
if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono()
&& layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
return false;
// This checks if the input layout matches the output layout
#if ! JucePlugin_IsSynth
@@ -117,7 +91,6 @@ bool LampshadeAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts
#endif
return true;
#endif
}
#endif
@@ -139,16 +112,15 @@ void LampshadeAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffe
// audio processing...
for (int channel = 0; channel < totalNumInputChannels; ++channel)
{
float* channelData = buffer.getWritePointer (channel);
//float* channelData = buffer.getWritePointer (channel);
// ..do something to the data...
}
}
//==============================================================================
bool LampshadeAudioProcessor::hasEditor() const
{
return true; // (change this to false if you choose to not supply an editor)
return true;
}
AudioProcessorEditor* LampshadeAudioProcessor::createEditor()
@@ -156,7 +128,6 @@ AudioProcessorEditor* LampshadeAudioProcessor::createEditor()
return new LampshadeAudioProcessorEditor (*this);
}
//==============================================================================
void LampshadeAudioProcessor::getStateInformation (MemoryBlock& destData)
{
// You should use this method to store your parameters in the memory block.