Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Barabas5532 committed Jun 14, 2019
0 parents commit e10c600
Show file tree
Hide file tree
Showing 18 changed files with 602 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Builds/
JuceLibraryCode/
compile_commands.json
29 changes: 29 additions & 0 deletions Source/Clipping.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "Clipping.h"
#define OVERSAMPLING_ORDER 3

Clipping::Clipping() : oversampling(1, OVERSAMPLING_ORDER,
dsp::Oversampling<float>::filterHalfBandPolyphaseIIR)
{
waveshaper.functionToUse = waveshape;
}

Clipping::~Clipping() {}

void Clipping::process(dsp::AudioBlock<float> block)
{
auto oversampledBlock = oversampling.processSamplesUp(block);

dsp::ProcessContextReplacing<float> ctx(oversampledBlock);
waveshaper.process(ctx);

oversampling.processSamplesDown(block);
}
void Clipping::prepare(dsp::ProcessSpec spec)
{
oversampling.initProcessing(spec.maximumBlockSize);
}

void Clipping::reset()
{
oversampling.reset();
}
30 changes: 30 additions & 0 deletions Source/Clipping.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
==============================================================================
Clipping.h
Created: 14 Jun 2019 9:46:07am
Author: barabas
==============================================================================
*/

#pragma once
#include "../JuceLibraryCode/JuceHeader.h"
#include "WaveShape.h"

class Clipping
{
public:
Clipping();
~Clipping();

void process(dsp::AudioBlock<float> block);
void prepare(dsp::ProcessSpec spec);
void reset();

private:
dsp::WaveShaper<float> waveshaper;
dsp::Oversampling<float> oversampling;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Clipping);
};
11 changes: 11 additions & 0 deletions Source/Contour.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
Contour.cpp
Created: 14 Jun 2019 9:46:54am
Author: barabas
==============================================================================
*/

#include "Contour.h"
11 changes: 11 additions & 0 deletions Source/Contour.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
Contour.h
Created: 14 Jun 2019 9:46:54am
Author: barabas
==============================================================================
*/

#pragma once
11 changes: 11 additions & 0 deletions Source/FMV.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
FMV.cpp
Created: 14 Jun 2019 9:45:03am
Author: barabas
==============================================================================
*/

#include "FMV.h"
11 changes: 11 additions & 0 deletions Source/FMV.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
FMV.h
Created: 14 Jun 2019 9:45:03am
Author: barabas
==============================================================================
*/

#pragma once
11 changes: 11 additions & 0 deletions Source/GainControl.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
GainControl.cpp
Created: 14 Jun 2019 9:45:31am
Author: barabas
==============================================================================
*/

#include "GainControl.h"
11 changes: 11 additions & 0 deletions Source/GainControl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
GainControl.h
Created: 14 Jun 2019 9:45:31am
Author: barabas
==============================================================================
*/

#pragma once
11 changes: 11 additions & 0 deletions Source/InputFilter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
InputFilter.cpp
Created: 14 Jun 2019 9:45:24am
Author: barabas
==============================================================================
*/

#include "InputFilter.h"
11 changes: 11 additions & 0 deletions Source/InputFilter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
==============================================================================
InputFilter.h
Created: 14 Jun 2019 9:45:24am
Author: barabas
==============================================================================
*/

#pragma once
42 changes: 42 additions & 0 deletions Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/

#include "PluginProcessor.h"
#include "PluginEditor.h"

//==============================================================================
ValvestateAudioProcessorEditor::ValvestateAudioProcessorEditor (ValvestateAudioProcessor& p)
: AudioProcessorEditor (&p), processor (p)
{
// Make sure that before the constructor has finished, you've set the
// editor's size to whatever you need it to be.
setSize (400, 300);
}

ValvestateAudioProcessorEditor::~ValvestateAudioProcessorEditor()
{
}

//==============================================================================
void ValvestateAudioProcessorEditor::paint (Graphics& g)
{
// (Our component is opaque, so we must completely fill the background with a solid colour)
g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));

g.setColour (Colours::white);
g.setFont (15.0f);
g.drawFittedText ("Hello World!", getLocalBounds(), Justification::centred, 1);
}

void ValvestateAudioProcessorEditor::resized()
{
// This is generally where you'll want to lay out the positions of any
// subcomponents in your editor..
}
35 changes: 35 additions & 0 deletions Source/PluginEditor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
==============================================================================
This file was auto-generated!
It contains the basic framework code for a JUCE plugin editor.
==============================================================================
*/

#pragma once

#include "../JuceLibraryCode/JuceHeader.h"
#include "PluginProcessor.h"

//==============================================================================
/**
*/
class ValvestateAudioProcessorEditor : public AudioProcessorEditor
{
public:
ValvestateAudioProcessorEditor (ValvestateAudioProcessor&);
~ValvestateAudioProcessorEditor();

//==============================================================================
void paint (Graphics&) override;
void resized() override;

private:
// This reference is provided as a quick way for your editor to
// access the processor object that created it.
ValvestateAudioProcessor& processor;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValvestateAudioProcessorEditor)
};
Loading

0 comments on commit e10c600

Please sign in to comment.