mirror of
https://github.com/yokemura/Magical8bitPlug2.git
synced 2025-05-24 23:00:21 -04:00
Subclass Synthesiser
This commit is contained in:
parent
857ac48b58
commit
be1f0b4e3b
@ -68,6 +68,8 @@
|
||||
file="Source/VibratoParamsComponent.h"/>
|
||||
</GROUP>
|
||||
<GROUP id="{630C27C7-03AA-CFC6-2FC4-4CE2DBE3640A}" name="Source">
|
||||
<FILE id="LHv5E3" name="CustomSynth.cpp" compile="1" resource="0" file="Source/CustomSynth.cpp"/>
|
||||
<FILE id="kpCPIX" name="CustomSynth.h" compile="0" resource="0" file="Source/CustomSynth.h"/>
|
||||
<FILE id="H2Vgbj" name="FrameSequenceParseErrors.cpp" compile="1" resource="0"
|
||||
file="Source/FrameSequenceParseErrors.cpp"/>
|
||||
<FILE id="Gwt2vB" name="FrameSequenceParseErrors.h" compile="0" resource="0"
|
||||
|
21
Source/CustomSynth.cpp
Normal file
21
Source/CustomSynth.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
CustomSynth.cpp
|
||||
Created: 17 May 2021 11:29:59pm
|
||||
Author: 除村武志
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "CustomSynth.h"
|
||||
|
||||
CustomSynth::CustomSynth(Magical8bitPlug2AudioProcessor& p) : processor(p) {}
|
||||
|
||||
void CustomSynth::noteOn(int midiChannel, int midiNoteNumber, float velocity) {
|
||||
Synthesiser::noteOn(midiChannel, midiNoteNumber, velocity);
|
||||
}
|
||||
|
||||
void CustomSynth::noteOff(int midiChannel, int midiNoteNumber, float velocity, bool allowTailOff) {
|
||||
Synthesiser::noteOff(midiChannel, midiNoteNumber, velocity, allowTailOff);
|
||||
}
|
25
Source/CustomSynth.h
Normal file
25
Source/CustomSynth.h
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
CustomSynth.h
|
||||
Created: 17 May 2021 11:29:59pm
|
||||
Author: 除村武志
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
|
||||
class Magical8bitPlug2AudioProcessor;
|
||||
|
||||
class CustomSynth : public Synthesiser {
|
||||
public:
|
||||
CustomSynth(Magical8bitPlug2AudioProcessor& p);
|
||||
|
||||
void noteOn(int midiChannel, int midiNoteNumber, float velocity) override;
|
||||
void noteOff(int midiChannel, int midiNoteNumber, float velocity, bool allowTailOff) override;
|
||||
|
||||
private:
|
||||
Magical8bitPlug2AudioProcessor& processor;
|
||||
};
|
@ -124,6 +124,7 @@ Magical8bitPlug2AudioProcessor::Magical8bitPlug2AudioProcessor()
|
||||
}
|
||||
)
|
||||
, settingRefs (¶meters)
|
||||
, synth(*this)
|
||||
#ifndef JucePlugin_PreferredChannelConfigurations
|
||||
, AudioProcessor (BusesProperties()
|
||||
#if ! JucePlugin_IsMidiEffect
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
#include "Settings.h"
|
||||
#include "Voices.h"
|
||||
#include "CustomSynth.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
@ -77,7 +78,7 @@ public:
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
Synthesiser synth;
|
||||
CustomSynth synth;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Magical8bitPlug2AudioProcessor)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user