diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 162a62d..d3c12b6 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -188,7 +188,15 @@ void JuicySFAudioProcessor::processBlock (AudioBuffer& buffer, MidiBuffer fluid_midi_event_set_program(midi_event, m.getChannelPressureValue()); fluid_synth_handle_midi_event(fluidSynth, midi_event); delete_fluid_midi_event(midi_event); - } else if (m.isResetAllControllers()) { + } else if (m.isAftertouch()) { + fluid_midi_event_t *midi_event(new_fluid_midi_event()); + fluid_midi_event_set_type(midi_event, static_cast(KEY_PRESSURE)); + fluid_midi_event_set_channel(midi_event, fluidSynthModel.getChannel()); + fluid_midi_event_set_key(midi_event, m.getNoteNumber()); + fluid_midi_event_set_value(midi_event, m.getAfterTouchValue()); + fluid_synth_handle_midi_event(fluidSynth, midi_event); + delete_fluid_midi_event(midi_event); + } else if (m.isMetaEvent()) { fluid_midi_event_t *midi_event(new_fluid_midi_event()); fluid_midi_event_set_type(midi_event, static_cast(MIDI_SYSTEM_RESET)); fluid_synth_handle_midi_event(fluidSynth, midi_event); diff --git a/Source/SoundfontSynthVoice.cpp b/Source/SoundfontSynthVoice.cpp index aa8d942..30b6afa 100644 --- a/Source/SoundfontSynthVoice.cpp +++ b/Source/SoundfontSynthVoice.cpp @@ -67,7 +67,8 @@ void SoundfontSynthVoice::pitchWheelMoved (int newValue) { } void SoundfontSynthVoice::controllerMoved (int controllerNumber, int newValue) { - Logger::outputDebugString ( juce::String::formatted("Controlled moved: %d, %d\n", controllerNumber, newValue) ); + // this seems to be "program change" event + Logger::outputDebugString ( juce::String::formatted("Controller moved: %d, %d\n", controllerNumber, newValue) ); } void SoundfontSynthVoice::renderNextBlock (AudioBuffer& outputBuffer, int startSample, int numSamples) {