diff options
Diffstat (limited to 'src/mdaPiano.cpp')
-rw-r--r-- | src/mdaPiano.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mdaPiano.cpp b/src/mdaPiano.cpp index 1b153c8..6e3d8e7 100644 --- a/src/mdaPiano.cpp +++ b/src/mdaPiano.cpp @@ -22,6 +22,8 @@ mdaPiano::mdaPiano(double rate) : LV2::Synth<mdaPianoVoice, mdaPiano>(p_n_ports, p_midi) { + sustain = 0; + static const char* sample_names[] = { "0c.raw", "0e.raw", "0g.raw" , "1c.raw", "1e.raw", "1g.raw" @@ -41,18 +43,9 @@ mdaPiano::mdaPiano(double rate) add_voices(voices[i]); } - sustain = 0; - add_audio_outputs(p_left, p_right); } -//parameter change -void mdaPiano::update() { - for (uint32_t v=0; v<NVOICES; ++v) { - voices[v]->update(Current); - } -} - unsigned mdaPiano::find_free_voice(unsigned char key, unsigned char velocity) { //is this a retriggered note during sustain? @@ -85,6 +78,14 @@ void mdaPiano::setVolume(float value) { } +//parameter change +void mdaPiano::update() { + for (uint32_t v=0; v<NVOICES; ++v) { + voices[v]->update(Current); + } +} + + void mdaPiano::handle_midi(uint32_t size, unsigned char* data) { #ifdef DEBUG printf("%d\n", data[1]); |