//See associated .cpp file for copyright and other info #ifndef MDA_PIANO_H #define MDA_PIANO_H #pragma GCC system_header #include "mdaPianoVoice.h" #include "mdaPiano.peg" #include class mdaPiano : public LV2::Synth { public: mdaPiano(double rate); ~mdaPiano() { free(waves); } void load_kgrp(KGRP*); void load_samples(short**); unsigned find_free_voice(unsigned char, unsigned char); void handle_midi(uint32_t size, unsigned char* data); void setVolume(float); void setParameter(unsigned char, float); private: void update(); //my parameter update void noteOn(uint32_t note, uint32_t velocity); float param[NPARAMS]; float Fs, iFs; ///global internal variables KGRP kgrp[16]; mdaPianoVoice *voices[NVOICES]; short *waves; uint32_t sustain; }; #endif