Way to use other baud rates in console or different input/output rates I want to send some test codes to a MIDI synthesizer, so I wrote a program that lets me just type in hex codes on the serial monitor and send it over serial as the byte value. For example typing "90 45 63" should turn on note 0x45 with a velocity of 0x63.  This part works ok and I have the arduino hooked up to a midi connector and from there to a midi synth. I've verified that this works ok with some test code.

Where I'm having trouble is that MIDI requires a rather unorthodox baud rate of 31250.  The problem is then that on an Arduino Uno, I don't see how I can enter serial data when the Arduino's serial monitor doesn't allow that baud rate. Also trying to set that baud rate under Linux using stty generates an "stty: invalid argument ‘31250’" error.  So is there a way to use a different baud rate for input than for output or some other solution here?  I do have a Teensy 3.1 with multiple Serial ports, but its kinda tied up at the moment and I just thought I could use an Uno for this.

UPDATE: It works now. Something to keep in mind when working with complex external components like a professional synthesizer. The Roland JV-880 that I'm interfacing with wasn't receiving program changes even though I was sending the 0xC0 0x03 codes or whatever. This is why I made this debugging program to begin with. After searching around and being stumped, I looked around the system settings on the synthesizer and discovered a setting called "System MIDI Rx switch Program change=OFF". After I changed that to ON the program change codes worked. Sometimes the problem is nothing in your code or circuit.
The Arduino Uno is powered by an ATmega328P microcontroller. This
microcontroller has only one UART which is not capable of using
different baud rates for sending and receiving.

You could look into the different software serial port implementations
for the sending side. Another solution would be to continually change
the baud rate: each time you get a complete message from the serial
monitor,


you switch the baud rate to 31250 bps
you send the packet to the midi synth
you Serial.flush() to make sure the bytes have actually been sent
you switch back the baud rate to whatever you used in the serial
monitor


You will probably see some garbage on serial monitor as it receives the
bytes at the wrong rate, but that should not be an issue.