save the current state...

pull/1/head
Holger Wirtz 8 years ago
parent c4be756007
commit f18aa020be
  1. 31
      src/dexed.cpp
  2. 19
      src/dexed.h

@ -8,16 +8,43 @@
#include "msfa/exp2.h"
#include "msfa/sin.h"
DexedVoice::DexedVoice(double rate)
DexedVoice::DexedVoice(double rate) : m_key(LV2::INVALID_KEY), m_rate(rate)
{
Exp2::init();
Tanh::init();
Sin::init();
};
void DexedVoice::on(unsigned char key, unsigned char velocity)
{
}
void DexedVoice::off(unsigned char velocity)
{
}
unsigned char DexedVoice::get_key(void) const
{
return m_key;
}
void DexedVoice::render(uint32_t from, uint32_t to)
{
if (m_key == LV2::INVALID_KEY)
return;
}
//==============================================================================
Dexed::Dexed(double rate) : LV2::Synth<DexedVoice, Dexed>(p_n_ports, p_lv2_events_in)
{
add_voices(new DexedVoice(rate), new DexedVoice(rate), new DexedVoice(rate));
feedback_bitdepth=11;
engineType=DEXED_ENGINE_MARKI;
core=&engineMkI;
add_voices(new DexedVoice(rate));
add_audio_outputs(p_lv2_audio_out_1);
}

@ -50,6 +50,15 @@ class DexedVoice : public LV2::Voice
{
public:
DexedVoice(double rate);
void on(unsigned char key, unsigned char velocity);
void off(unsigned char velocity);
unsigned char get_key(void) const;
void render(uint32_t from, uint32_t to);
protected:
unsigned char m_key;
double m_rate;
ProcessorVoice voice;
};
//==============================================================================
@ -58,6 +67,16 @@ class Dexed : public LV2::Synth<DexedVoice, Dexed>
{
public:
Dexed(double rate);
FmCore *core;
protected:
// dexed internal
int feedback_bitdepth;
uint32_t engineType;
FmCore engineMsfa;
EngineMkI engineMkI;
EngineOpl engineOpl;
};
#endif // PLUGINPROCESSOR_H_INCLUDED

Loading…
Cancel
Save