different baud rates

Hi. I’d like to design a midi-controller with several sensors.
The sensors should influence the frequence and volume of the note.
The midi interface need the ability to send serial data at
a baud rate of 31250 bps (serial.begin 31250) but some of the
sensors do not work with this baud rate (or I didn’t mange it)
e.g. the compass sensor cmps03 works with 9600 bps
( A code by Tom Igoe: http://www.tigoe.net/pcomp/code/category/code/arduinowiring/9)
As a beginner I’d be very grateful for some advices.

Thanks and Happy New Year!

You can use the soft serial libary for the sensors (only up to 9600) and the ordinary serial for the MIDI stuff.

You can't use the same serial line to communicate with more than one device any way.

So you are basically limited to one sensor and the MIDI stuff, unless the sensors use I2C or some of the other protocols that allow a bus topology.

Se the playground for how to use the softserial libary and I2C