BlankenhainAudioProcessor::BlankenhainAudioProcessor() { busArrangement.inputBuses.clear(); busArrangement.outputBuses.clear(); busArrangement.inputBuses.add(AudioProcessorBus("Input", AudioChannelSet::stereo())); busArrangement.outputBuses.add(AudioProcessorBus("Output", AudioChannelSet::stereo())); }
AudioProcessor::AudioProcessor() : wrapperType (wrapperTypeBeingCreated.get()), playHead (nullptr), sampleRate (0), blockSize (0), latencySamples (0), #if JUCE_DEBUG textRecursionCheck (false), #endif suspended (false), nonRealtime (false), processingPrecision (singlePrecision) { #if ! JucePlugin_IsMidiEffect #ifdef JucePlugin_PreferredChannelConfigurations const short channelConfigs[][2] = { JucePlugin_PreferredChannelConfigurations }; #else const short channelConfigs[][2] = { {2, 2} }; #endif int numChannelConfigs = sizeof (channelConfigs) / sizeof (*channelConfigs); if (numChannelConfigs > 0) { #if ! JucePlugin_IsSynth busArrangement.inputBuses.add (AudioProcessorBus ("Input", AudioChannelSet::canonicalChannelSet (channelConfigs[0][0]))); #endif busArrangement.outputBuses.add (AudioProcessorBus ("Output", AudioChannelSet::canonicalChannelSet (channelConfigs[0][1]))); } #endif updateSpeakerFormatStrings(); }
//============================================================================== NoiseGate() { addParameter (threshold = new AudioParameterFloat ("threshold", "Threshold", 0.0f, 1.0f, 0.5f)); addParameter (alpha = new AudioParameterFloat ("alpha", "Alpha", 0.0f, 1.0f, 0.8f)); // add single side-chain bus busArrangement.inputBuses. add (AudioProcessorBus ("Sidechain In", AudioChannelSet::stereo())); busArrangement.outputBuses.add (AudioProcessorBus ("Sidechain Out", AudioChannelSet::stereo())); }
AudioProcessor::AudioProcessor() : wrapperType (wrapperTypeBeingCreated.get()), playHead (nullptr), currentSampleRate (0), blockSize (0), latencySamples (0), #if JUCE_DEBUG textRecursionCheck (false), #endif suspended (false), nonRealtime (false), processingPrecision (singlePrecision) { #ifdef JucePlugin_PreferredChannelConfigurations const short channelConfigs[][2] = { JucePlugin_PreferredChannelConfigurations }; #else const short channelConfigs[][2] = { {2, 2} }; #endif #ifdef JucePlugin_MaxNumInputChannels const int maxInChannels = JucePlugin_MaxNumInputChannels; #else const int maxInChannels = std::numeric_limits<int>::max(); #endif ignoreUnused (maxInChannels); #ifdef JucePlugin_MaxNumOutputChannels const int maxOutChannels = JucePlugin_MaxNumOutputChannels; #else const int maxOutChannels = std::numeric_limits<int>::max(); #endif ignoreUnused (maxOutChannels); #if ! JucePlugin_IsMidiEffect // #if ! JucePlugin_IsSynth const int numInChannels = jmin (maxInChannels, (int) channelConfigs[0][0]); if (numInChannels > 0) busArrangement.inputBuses.add (AudioProcessorBus ("Input", AudioChannelSet::canonicalChannelSet (numInChannels))); // #endif const int numOutChannels = jmin (maxOutChannels, (int) channelConfigs[0][1]); if (numOutChannels > 0) busArrangement.outputBuses.add (AudioProcessorBus ("Output", AudioChannelSet::canonicalChannelSet (numOutChannels))); #ifdef JucePlugin_PreferredChannelConfigurations // #if ! JucePlugin_IsSynth AudioProcessor::setPreferredBusArrangement (true, 0, AudioChannelSet::stereo()); // #endif AudioProcessor::setPreferredBusArrangement (false, 0, AudioChannelSet::stereo()); #endif #endif updateSpeakerFormatStrings(); }
//============================================================================== Spatializer() : currentSpeakerLayout (0) { // clear the default bus arrangements which were created by the base class busArrangement.inputBuses .clear(); busArrangement.outputBuses.clear(); // add mono in and default out busArrangement.inputBuses .add (AudioProcessorBus ("Input", AudioChannelSet::mono())); busArrangement.outputBuses.add (AudioProcessorBus ("Output", speakerPositions[currentSpeakerLayout].set)); addParameter (radius = new AudioParameterFloat ("radius", "Radius", 0.0f, 1.0f, 0.5f)); addParameter (phi = new AudioParameterFloat ("phi", "Phi", 0.0f, 1.0f, 0.0f)); }
//============================================================================== MultiOutSynth() { // The base class constructor will already add a main stereo output bus // If you want to add your own main channel then simply call clear the // output buses (busArrangement.outputBuses.clear()) and then add your own // Add additional output buses but disable these by default for (int busNr = 1; busNr < maxMidiChannel; ++busNr) busArrangement.outputBuses.add (AudioProcessorBus (String ("Output #") += String (busNr + 1), AudioChannelSet::disabled())); // initialize other stuff (not related to buses) formatManager.registerBasicFormats(); for (int midiChannel = 0; midiChannel < maxMidiChannel; ++midiChannel) { synth.add (new Synthesiser()); for (int i = 0; i < maxNumberOfVoices; ++i) synth[midiChannel]->addVoice (new SamplerVoice()); } loadNewSample (BinaryData::singing_ogg, BinaryData::singing_oggSize); }