On 11/23/13 1:24 AM, Evan Laforge wrote: >> And :-(( I have to quit the program, re-launch, re-open, re-scroll, re-zoom >> ... >> >> So I tried to implement a "Rescan MIDI devices" action in my program. > The way to do this is pass a notification callback to > MIDIClientCreate(), which gets called whenever a device is plugged in > or unplugged. But I use CoreMIDI directly, not portmidi. You can > check the portmidi sources, if it doesn't provide a second argument to > MIDIClientCreate then it can't do what you want. Presumably you'd > have to extend Pm_Initialize with a way to pass a notification > callback, and figure out if ALSA and Windows can support the same > thing (I use a callback for JACK too, so presumably ALSA also works > that way). > _______________________________________________ Thanks, Evan. Maybe PortMidi should be extended in that way. My original thinking was that adding or removing devices is basically a non-real-time operation that's better handled elsewhere. I thought perhaps the user should direct this from the interface at the appropriate time. But if we could support it in a cross-platform way, it could be a useful option.
Speaking of portmidi design, there's a request for creating named ports (as opposed to simply getting input/output to existing ports). I believe this is NOT supported by Windows, but IS supported by OS X and ALSA. This seems like an important feature, even if not cross-platform. If anyone has some sample code without licensing restrications for either platform, that would help move things along. Thanks, Roger _______________________________________________ media_api mailing list [email protected] http://lists.create.ucsb.edu/mailman/listinfo/media_api
