velolala / touchosc2midi

a (linux compatible) TouchOSC Midi Bridge written in python
MIT License
106 stars 22 forks source link

Multiple Instances #15

Open douggy12345 opened 6 years ago

douggy12345 commented 6 years ago

This little program is fantastic - thank you for creating!

Do you know if it is possible to do the following all with one Pi 3...?

I have 5 x ipads running TouchOSC and 5 pieces of midi equipment (5 x behringer P16-M). I've got a 4x4 usb midi interface and also a 1x1 usb midi interface which touchosc2midi recognises all of when I list ports.

I need ipad 1 to be able to control P16M 1, ipad 2 to control P16m 2 and so on...And I was rather hoping to do this all with just one pi 3.

Unfortunately the midi parameters on the P16s use channels 1-16 and control so it's not possible to use the same midi port to control all 5 of them separately (there's no way of altering the midi mapping) - they each need a separate midi out port.

I've had a go at trying to fire up two terminal windows and run touchosc2midi twice, but it throws up error that address is already in use. I tried also seeing if entereing the ips of each iPad - but it won't connect to a manual ip that I enter for some reason.

velolala commented 6 years ago

Hmm, I never tried to run multiple instances on the same host. The first hurdle would be the network port used for the MidiBridge (it is not configurable from TouchOSC settings). What you could try:

Run your second touchosc2midi instance from source code and adjust the PORT setting in https://github.com/velolala/touchosc2midi/blob/master/touchosc2midi/advertise.py#L13 to 12103 -- this setting is currently not exposed at the commandline and I am not sure, if TouchOSC would accept a different port when it is announced via zeroconf.