Hi,
I am facing a problem to run a MidiMoser library to control a Midi instrument. This code:
public class RunOnChannel {
private static String myMidiInstrument;
private static String myMidiChannel;
private static String myMidiCC;
private static String mySendMidiCommand;
private MidiMonitor midiMonitor;
private Thread thread = new Thread() {
@Override
public void run() {
try {
midiMonitor = new MidiMonitor(MidiSystem.defaultMidiSystem());
myMidiChannel = "Midi Channel";
myMidiInstrument = "Midi Instrument";
mySendMidiCommand = "Midi Channel to Send MIDI";
while(true) {
Thread.sleep(1000);
String message = midiMonitor.getInstrumentMessage(myMidiChannel, myMidiInstrument);
System.out.println("myMidiInstrument "+message);
}
} catch(Exception e) {
e.printStackTrace();
}
}
};
public static void main(String[] args) {
try {
Related links:
Comentários