Which method initiates functions of AudioProcessor class?

I’m having a problem with initiating function AudioProcessor :processBlock. How can it be done?

…some context?

I’m trying to build a plugin, which plays a midi-file, using this thread and files: Playing a MIDI file (revisited). As I understand the playback is realized via processBlock method. So far my midi-file is read fine, but processBlock is not working.

How is it not working? Is it not called at all? It’s called but you get no output? It’s called and you get an output but it’s the wrong one? The plugin in the thread you linked outputs MIDI events -you’ll need a host that supports a plugin with MIDI output, and you must route it to the MIDI input of an instrument to hear anything. No one can know what you mean with “a problem with initiating processBlock” or “processBlock is not working” -be specific.

Your plugin is not supposed to read midi files. Instead the host will send midi events when calling processBlock().
The processBlock() is a callback that you implement, but the host will call it supplying a buffer where you can replace samples and MidiBuffer supplying the midi events.
If you can send midi out of your plugin and if it is processed at all depends on the host and the settings you set up in the Projucer when setting up the project.

Nevertheless, IvanC provided a way to do that in a plugin in the forum post linked above.