Midi Processing


#1

When I generete a new project with jucer I get a "hello world" example with a midi input/output bypass. I want to create something simple to understand midi processing like a midi gain, how do I acess the data of the midi buffer?.

I want something like this but with the midi buffer not the audio buffer

buffer.applyGain (channel, 0, buffer.getNumSamples(), gain);

 

Thanks for your time!!!


#2

MIDI definitely does not work the same way audio does.

To do apply something like an "audio gain change" to MIDI, you have to either edit a note's velocity or a channel's volume.


#3

I know that audio is diferent sorry if i wasnt clear enough, but how do you acess midi data in the audio processing loop to change it? 


#4

The MidiBuffer object that is passes to the processing function is a reference, you can modify it in any way you like.

 

If you leave any messages in it, those messages will be passed (sent) to the host, you can add new ones, or remove as many as you like. THe MidiBuffer::Iterator class will help you with that.