<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">I’m not sure if they can be closed, but as long as you don’t chuck them to now, the extra ones really shouldn’t take up (much) computational resources. &nbsp;<div><br></div><div>One option would be to first run a MIDIConfig.ck file that opens them all and writes all the names and numbers into a MIDICONFIG.txt file. &nbsp;Then when you run your main file, it reads that and only opens the one(s) you need. &nbsp;Or your first&nbsp;<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">MIDIConfig.ck file could pick the one(s) you need and write only them into the temp file.</span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">I’ve done this for PLOrk pieces, to figure out if laptops have accelerometers, and what orientation those are.</span></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">prc<br></span></font><br><div dir="ltr">from MyiPhone</div><div dir="ltr"><br><blockquote type="cite">On Mar 27, 2020, at 9:00 AM, chuck-users-request@lists.cs.princeton.edu wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Send chuck-users mailing list submissions to</span><br><span> &nbsp; &nbsp;chuck-users@lists.cs.princeton.edu</span><br><span></span><br><span>To subscribe or unsubscribe via the World Wide Web, visit</span><br><span> &nbsp; &nbsp;https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</span><br><span>or, via email, send a message with subject or body 'help' to</span><br><span> &nbsp; &nbsp;chuck-users-request@lists.cs.princeton.edu</span><br><span></span><br><span>You can reach the person managing the list at</span><br><span> &nbsp; &nbsp;chuck-users-owner@lists.cs.princeton.edu</span><br><span></span><br><span>When replying, please edit your Subject line so it is more specific</span><br><span>than "Re: Contents of chuck-users digest..."</span><br><span></span><br><span></span><br><span>Today's Topics:</span><br><span></span><br><span> &nbsp;&nbsp;1. Closing MIDI ports (mario buoninfante)</span><br><span></span><br><span></span><br><span>----------------------------------------------------------------------</span><br><span></span><br><span>Message: 1</span><br><span>Date: Thu, 26 Mar 2020 19:51:41 +0000</span><br><span>From: mario buoninfante &lt;mario.buoninfante@gmail.com&gt;</span><br><span>To: ChucK Users Mailing List &lt;chuck-users@lists.cs.princeton.edu&gt;</span><br><span>Subject: [chuck-users] Closing MIDI ports</span><br><span>Message-ID: &lt;dc574e2e-9f93-cb07-c743-38f88fa575e9@gmail.com&gt;</span><br><span>Content-Type: text/plain; charset="utf-8"; Format="flowed"</span><br><span></span><br><span>Hi,</span><br><span></span><br><span></span><br><span>Is it possible to close a MIDI port?</span><br><span></span><br><span>I'm working on a MIDI class, and to print all the available ports, I </span><br><span>open them one at the time and get the name. Then I end up with tons of </span><br><span>open MIDI ports I'm not actually using.</span><br><span></span><br><span>Apart from this, another user case could be a live set where different </span><br><span>scripts are launched and each of them wants to talk to a specific MIDI </span><br><span>port. Doing so one ends up with a lot of /leftovers/.</span><br><span></span><br><span></span><br><span>Cheers,</span><br><span></span><br><span>Mario</span><br><span></span><br><span>-- </span><br><span>electronic musician, sound artist, creative coder, QA engineer</span><br><span>https://vimeo.com/creativecodingsalerno</span><br><span>http://mbuoninfante.tumblr.com/</span><br><span>https://github.com/mariobuoninfante</span><br><span>https://bitbucket.org/mariobuoninfante/</span><br><span></span><br><span>-------------- next part --------------</span><br><span>An HTML attachment was scrubbed...</span><br><span>URL: &lt;http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200326/75ed2599/attachment-0001.html&gt;</span><br><span></span><br><span>------------------------------</span><br><span></span><br><span>_______________________________________________</span><br><span>chuck-users mailing list</span><br><span>chuck-users@lists.cs.princeton.edu</span><br><span>https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</span><br><span></span><br><span></span><br><span>End of chuck-users Digest, Vol 175, Issue 15</span><br><span>********************************************</span><br></div></blockquote></div></body></html>