Interesting… I’ve never seen these before.
In the future, I believe MIDIIn.connectAll
and MIDIIn.disconnectAll
will simply perform MIDIClient.respectivePorts.do{ |x, in| MIDIIn.*nect(in, x )}
I think we can all agree how important it is, to keep the experience and functionality of SC’s MIDI interface as clear and smooth as possible, just as I think we can all commend the devs for understanding that until the absolute perfection of this particular class/feature takes an urgent level of precedence (all respect and gratitude to our dev team) … until then, connectAll has always kept everyone satisfied, and worked well enough for eighty to ninety percent of everyone’s needs… what with all the complications between operating systems, as well as different in-case uses, desires, necessities, etc… they’ve boiled down MIDI (all platforms) into mostly only two methods: connectAll
(in) & newByName
(out).
And so, I believe the issue you’re trying to shed light upon is:
sclang crashes when the call to disconnect conflicts with any immediate or nearly simultaneous incoming messages…
Such situations must be somewhat rare, however, not quite so unusual when one is calling disconnect, hitting cmd+enter upon wearing a ring-shaped instrument capable of sending 6 or more classes of messages!
Whether for as needed use only, or, as a safety precaution implemented into everyone class files, I believe that perhaps one solution would be:
MIDIdef.freeAll
~connected_port.latency.wait
MIDIIn.disconnectAll
s.latency.wait // extra safe
and finally,
MIDIClient.disposeClient (might be all that’s really necessary)
…before updating the client list.
…
Perhaps MIDIIn needs a ‘clearAllResponseDefs’, or even an ‘ignoreAllPreviouslyScheduledTasksInstantiatedFromMIDIResponseDefinitions’… internal use function or something, or perhaps a ‘quit’ and ‘hardQuit’ version of the SC-MIDI, just like our CmdPeriod and server-quit functionality.
Just my thoughts… I know without having to over-explain everything, even while our heads are scratching, the devs know what to do, what they’re doing, etc… big thanks to all the devs here, god-speed to all the developers working hard on SC.
And thanks for your input regarding the G-wave rings… if they become rage, hopefully SC can beat the clock for achieving full support for such a unique & idiosyncratic interface, before a sort of tipping point is reached… as well as for any other electronic instrument that could potentially become a sensation.