-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
815c948
commit 954ea20
Showing
8 changed files
with
210 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
jucerFormatVersion="1" companyWebsite="reillyspitzfaden.netlify.app" | ||
companyEmail="[email protected]" pluginManufacturer="Reilly Spitzfaden" | ||
pluginManufacturerCode="Rspi" pluginCode="Rsav" aaxIdentifier="com.reillyspitzfaden.RSAlgorithmicVerb" | ||
bundleIdentifier="com.reillyspitzfaden.RSAlgorithmicVerb" version="0.1.1" | ||
bundleIdentifier="com.reillyspitzfaden.RSAlgorithmicVerb" version="0.2.0" | ||
pluginFormats="buildAU,buildVST3" pluginAUMainType="'aufx'" pluginVST3Category="Fx" | ||
pluginAAXCategory="8" pluginVSTCategory="kPlugCategEffect"> | ||
<MAINGROUP id="h5VveC" name="RSAlgorithmicVerb"> | ||
|
@@ -21,6 +21,7 @@ | |
<FILE id="jwqlsc" name="EarlyReflections.h" compile="0" resource="0" | ||
file="Source/EarlyReflections.h"/> | ||
<FILE id="GtffiZ" name="Freeverb.h" compile="0" resource="0" file="Source/Freeverb.h"/> | ||
<FILE id="E3u2WC" name="IOBlocks.h" compile="0" resource="0" file="Source/IOBlocks.h"/> | ||
<FILE id="mCFD5y" name="DelayLineWithSampleAccess.h" compile="0" resource="0" | ||
file="Source/DelayLineWithSampleAccess.h"/> | ||
<FILE id="mYaXC8" name="ProcessorBase.h" compile="0" resource="0" file="Source/ProcessorBase.h"/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
============================================================================== | ||
IOBlocks.h | ||
Created: 30 May 2023 1:46:25pm | ||
Author: Reilly Spitzfaden | ||
============================================================================== | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <JuceHeader.h> | ||
|
||
#include "ProcessorBase.h" | ||
|
||
class OutputBlock : public ProcessorBase | ||
{ | ||
public: | ||
OutputBlock() {} | ||
|
||
void prepareToPlay(double sampleRate, int samplesPerBlock) override | ||
{ | ||
juce::dsp::ProcessSpec spec; | ||
spec.sampleRate = sampleRate; | ||
spec.maximumBlockSize = samplesPerBlock; | ||
spec.numChannels = getMainBusNumInputChannels(); | ||
|
||
lowCutFilter.prepare(spec); | ||
lowCutFilter.reset(); | ||
lowCutFilter.setType(juce::dsp::FirstOrderTPTFilterType::highpass); | ||
highCutFilter.prepare(spec); | ||
highCutFilter.reset(); | ||
highCutFilter.setType(juce::dsp::FirstOrderTPTFilterType::lowpass); | ||
} | ||
|
||
void processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBuffer&) override | ||
{ | ||
juce::ScopedNoDenormals noDenormals; | ||
auto totalNumInputChannels = getTotalNumInputChannels(); | ||
auto totalNumOutputChannels = getTotalNumOutputChannels(); | ||
|
||
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i) | ||
buffer.clear (i, 0, buffer.getNumSamples()); | ||
|
||
// filtering | ||
lowCutFilter.setCutoffFrequency(mLowCut); | ||
highCutFilter.setCutoffFrequency(mHighCut); | ||
|
||
juce::dsp::AudioBlock<float> block { buffer }; | ||
|
||
lowCutFilter.process(juce::dsp::ProcessContextReplacing<float>(block)); | ||
highCutFilter.process(juce::dsp::ProcessContextReplacing<float>(block)); | ||
} | ||
|
||
void setLowCut(float newCutoff) { mLowCut = newCutoff; } | ||
void setHighCut(float newCutoff) { mHighCut = newCutoff; } | ||
|
||
private: | ||
juce::dsp::FirstOrderTPTFilter<float> lowCutFilter; | ||
juce::dsp::FirstOrderTPTFilter<float> highCutFilter; | ||
|
||
float mLowCut = 0; | ||
float mHighCut = 20000; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.