Sending midi cc to hardware and simultaneously int's to processing

Hi there,
Im trying to control video mixer by midi from arduino by using standart midi library. I would like to send simultaneously some integers to processing. Code to control mixer is very simple, the problem is with sending integers to processing since midi overtook port 31250. Is there any way to have also 9600 for communication with computer ?. I was trying to use SoftwareSerial but no results. Any advices ?

Greetings
Peter

since midi overtook port 31250.

You can have ONE device/application on the other end of the serial port. It doesn't matter what the baud rate of that device is. If you are sending MIDI data via the Serial instance (using hardware serial pins 0 and 1) you can NOT also send data to another application.

You could write an application on the PC that gets the serial data and sends it to two different application, on other serial ports.

Thx for replay. Im using pin 1 tx for sending midi cc. The midi connection is like in this tutorial:

In processing on serial 9600 im getting some int numbers between 222-225 but not related to pot
This is Arduino code:

#include <MIDI.h>
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);

void setup() {
pinMode(5, INPUT);
pinMode(10, INPUT);
pinMode(11, OUTPUT);
MIDI.begin(1);
mySerial.begin(9600);
}
void loop() {
int pot = map(analogRead(5),0,1023,0,8);
MIDI.send(ControlChange, 20, pot, 1);
mySerial.write(pot);
delay(10);
}

Im using pin 1 tx for sending midi cc.

Completely unnecessary. Use SoftwareSerial and some other pin. Keep the hardware serial port for talking to the PC.

What are you using SoftwareSerial for now?

I resolved it by using usb to midi converter, but i'll check also your proposition. Thx for help :slight_smile:
Greetings