I’m pretty new to Sonic Pi, so apologies if I’m missing something obvious here. I’ve been using VSCode with Jackson Kearl’s excellent Sonic Pi extension and loopMIDI to create virtual midi ports to connect Sonic Pi to my DAW.
What I’d like to do is programmatically get the names of the ports that Sonic Pi can see, so I can determine the input/output port numbers without opening the GUI. I’ve found a few likely-looking candidates in the Ruby Sonic Pi docs: “__resolve_midi_ports(opts)”, " “current_midi_ports”, and “available_midi_ports”.
Unfortunately I can’t get the former to work (not sure what opts it wants, and it looks like it relies on current_midi_ports anyway). If I print the results of the latter two I get ["*"] which is not particularly informative. Any suggestions?