summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mdaPiano.cpp11
-rw-r--r--src/mdaPiano.h7
2 files changed, 6 insertions, 12 deletions
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp
index 7d68d66..562dac9 100644
--- a/src/mdaPiano.cpp
+++ b/src/mdaPiano.cpp
@@ -43,7 +43,8 @@ mdaPianoProgram::mdaPianoProgram()
}
-mdaPiano::mdaPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, NPROGS, NPARAMS)
+mdaPiano::mdaPiano(double rate)
+ : LV2::Synth<mdaPianoVoice, mdaPiano>(NPROGS, NPARAMS)
{
Fs = 44100.0f; iFs = 1.0f/Fs; cmax = 0x7F; //just in case...
@@ -57,14 +58,6 @@ mdaPiano::mdaPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster,
setProgram(0);
}
- if(audioMaster)
- {
- setNumInputs(0);
- setNumOutputs(NOUTS);
- canProcessReplacing();
- isSynth();
- setUniqueID('MDAp'); ///
- }
//Waveform data and keymapping is hard-wired in *this* version
kgrp[ 0].root = 36; kgrp[ 0].high = 37; kgrp[ 0].pos = 0; kgrp[ 0].end = 36275; kgrp[ 0].loop = 14774;
diff --git a/src/mdaPiano.h b/src/mdaPiano.h
index 8f2c7b3..750fd6c 100644
--- a/src/mdaPiano.h
+++ b/src/mdaPiano.h
@@ -5,6 +5,8 @@
#include <string.h>
+#include <lv2synth.hpp>
+
#define NPARAMS 12 //number of parameters
#define NPROGS 8 //number of programs
#define NOUTS 2 //number of outputs
@@ -56,10 +58,9 @@ struct KGRP //keygroup
VstInt32 loop;
};
-class mdaPiano : public AudioEffectX
-{
+class mdaPiano : public LV2::Synth<mdaPianoVoice, mdaPiano> {
public:
- mdaPiano(audioMasterCallback audioMaster);
+ mdaPiano(double rate);
~mdaPiano();
virtual void process(float **inputs, float **outputs, VstInt32 sampleframes);