Questions about MidiInput and AudioDeviceManager

Hi, all. I am working on the final year project which needs to use MIDI controller like UNTZtrument or launchpad as input.

It seems like I need to use AudioDeviceManager to recognize them and I refer to the JuceDemo and API Library. But I still have some confusion. 

For processBlock(AudioSampleBuffer& buffer, MidiBuffer& midiMessages) , midiMessages can't receive any input from my MIDI controller but handleIncomingMidiMessage() can receive. So how to let processBlock() also receive the MIDI messages from the controller. I would like to receive certain MIDI notes and then output audio sounds I preset before.

Do I express my question clear? I am new to the concept of MIDI in JUCE and hope someone who is familiar with this could give me some suggestions. 

Thanks very much for help.