From b297348e8e2cd76be6f1d546fb458865cc4d263b Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Tue, 23 Oct 2012 07:10:16 +0000 Subject: Added ALSA driver aftertouch (chan pressure) controller output --- muse2/muse/driver/alsamidi.cpp | 5 +++++ muse2/muse/mididev.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/muse2/muse/driver/alsamidi.cpp b/muse2/muse/driver/alsamidi.cpp index 978cca98..80595fb0 100644 --- a/muse2/muse/driver/alsamidi.cpp +++ b/muse2/muse/driver/alsamidi.cpp @@ -327,6 +327,11 @@ bool MidiAlsaDevice::putMidiEvent(const MidiPlayEvent& e) snd_seq_ev_set_pitchbend(&event, chn, b); break; } + else if(a == CTRL_AFTERTOUCH) + { + snd_seq_ev_set_chanpress(&event, chn, b); + break; + } } #if 1 diff --git a/muse2/muse/mididev.cpp b/muse2/muse/mididev.cpp index e8f88960..96fee89a 100644 --- a/muse2/muse/mididev.cpp +++ b/muse2/muse/mididev.cpp @@ -456,6 +456,9 @@ bool MidiDevice::putEvent(const MidiPlayEvent& ev) if (a == CTRL_PITCH) { return putMidiEvent(MidiPlayEvent(t, port, chn, ME_PITCHBEND, b, 0)); } + if (a == CTRL_AFTERTOUCH) { + return putMidiEvent(MidiPlayEvent(t, port, chn, ME_AFTERTOUCH, b, 0)); + } if (a == CTRL_PROGRAM) { int hb = (b >> 16) & 0xff; int lb = (b >> 8) & 0xff; -- cgit v1.2.3