Convert input audio or filename (wav, mp3) to MIDI in real-time

It’s possible, but Juce does not provide any ready-to-use tools for doing that. You need to figure out the audio pitch and onset detection code yourself. (Or find some library that does it, that is compatible with how Juce/plugins work.)