MIDI song with CC

After that, Midi wanted to add Custom Control (CC) to reduce the number of channels 0 and 1 to 10% using ShortMessage: http://www.jsresources.org/examples/MidiPlayer.html

I believe that this did not decrease the volume immediately after the start of midi playback.

ShortMessage volMessage = new ShortMessage();
  for(int i=0;i<2;i++) {
    try{
      volMessage.setMessage(ShortMessage.CONTROL_CHANGE,i, 7, 10);
    } catch(InvalidMidiDataException e) {}
      midiReceiver.send(volMessage,-1); 
    }

Has anyone done using ShortMessage to control MIDI channels?

0
source share
2 answers

You are trying to complete the message in the block catch- it should be right after the call .setMessage()in the block try!

+1
source

MIDI CC 7 , GM (General MIDI). , .

, , - 0 127, 0-100. , 10% , 12 13.;)

0

All Articles