1 #ifndef MDA_PIANO_VOICE_H
2 #define MDA_PIANO_VOICE_H
4 #include "mdaPianoCommon.h"
5 #include "mdaPiano.peg"
7 #pragma GCC system_header
8 #include <lv2synth.hpp>
15 class mdaPianoVoice
: public LV2::Voice
{
19 /// global internal variables
22 float default_preset
[NPARAMS
]; // contains the default preset
27 uint32_t delta
; //sample playback
36 float f0
; //first-order LPF
42 uint32_t note
; //remember what note triggered this
49 mdaPianoVoice(double, short*, KGRP
*);
50 void set_volume(float v
) { volume
= v
; }
51 void set_muff(float v
) { muff
= v
; }
53 float p_helper(unsigned short, Param
);
54 void update(Param
); // recalculates internal variables
55 void on(unsigned char key
, unsigned char velocity
);
57 unsigned char get_key(void) const { return m_key
; }