I'm making a Serial to MIDI interface in Java, with the serial data coming from an Arduino and being processed through the RXTX library.
Unfortunately, using the suggested code from Arduino website link, I'm unable to retrieve the serial data.
The example code uses
void MIDI_TX(unsigned char MESSAGE, unsigned char PITCH, unsigned char VELOCITY)
status = MESSAGE + midichannel;
char buf = new char;
int channel = (int)buf ;
int key = (int)buf ;
int vel = (int)buf ;
It was just an error in the
port.setSerialPortParams, I was writing at baudrate 115200 but reading at 9600.