Csound Csound-dev Csound-tekno Search About

[Csnd] Multiple midi out ports? Do parallel instances of Csound need to have matching CsOptions flags?

Date2024-07-04 01:50
FromAdam Willetts
Subject[Csnd] Multiple midi out ports? Do parallel instances of Csound need to have matching CsOptions flags?
Hi,

I’ve recently found myself needing a second MIDI output port in order to enable both of my midi controllers to provide important visual feedback and stay up to date with relevant parameter changes. I couldn’t find an option for setting multiple midi out ports directly in Csound but I have been able to get the results I want by running two very simple midi thru csd files in separate terminal windows before running my main csd in another terminal or CsoundQT. My main file has -M set to all and -Q set to the IAC Bus (I’m on an old MacBook Air) and the two midi thru files each have -M set to the IAC bus and -Q set to one of the controllers and a single always on instrument that looks like this:

instr midithru
  kstatus,kchan,kdata1,kdata2 midiin
  midiout kstatus,kchan,kdata1,kdata2
endin

Everything seems to be working fine but I thought I should ask here in case this kind of workaround is bad practice that will eventually cause problems and in case anyone knows of a tidier solution (like a built-in option for multiple midi out ports that I have failed to notice). Trying the same thing by enabling simultaneous playback in CsoundQT doesn’t work which made me think that there might also be problems using simultaneous terminal windows with mismatched CsOptions.

Thanks,
Adam

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here