Hey Tom!<div><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">That's what I thought too, as it seemed logical. but it doesn't work.<br>
</blockquote><div><br></div><div>Ok. Well, that should work so we'll have to trace where it fails then....</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Let's say I don't have any alsa-midi apps running. in qjackctl, I only<br>
have "Midi Through" (in and out)<br></blockquote><div><br></div><div>And no hardware MIDI ports either, right?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
% chuck-jack <a href="http://test.ck:0" target="_blank">test.ck:0</a><br>
<br>
this will create a new MidiIn and connect it to "Midi Through (out)".<br>
<br></blockquote><div><br></div><div>Yes. good.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
% chuck-jack <a href="http://test.ck:1" target="_blank">test.ck:1</a><br>
<br>
this won't work, with this message :<br>
<br>
> [chuck]: MidiIn: couldn't open MIDI port 1...<br>
<br>
my conclusion: the port parameter to the MidiIn.open() function is not<br>
the number of the port you open, but the port number of the source or<br>
the target to which it is supposed to be connected.<br>
<br>
... which isn't that useful, in my opinion.<br><br></blockquote><div><br></div><div>I think I understand the issue. Inside of ChucK and in your code there are objects of type MidiIn. The objects are abstractions for hardware ports and/or virtual ports that might exist on your system. We link the objects to the ports using .open( int device ) These objects have names in our code, like "min" in your case; I tend to name mine after the controller or synth used which I find helps keep things clear. The objects in our code don't have numbers, typically.</div>
<div><br></div><div>The numbers you saw correspond to the number of the device. If you run this;</div><div><br></div><div>chuck --probe</div><div><br></div><div>(might be "chuck-jack --probe" in your case)</div>
<div>At your terminal you will see a list of available soundcards and MIDI devices with their ID number. The MIDI stuff will be at the bottom of the output of that command. The numbers of those correspond to the numbers for devices to open using the .open() function. I suspect that you would only see a single input device there, with number "0". If so then that would explain the failure at opening the second devices (numbered at "1").</div>
<div><br></div><div>If that's right that would mean you only have a single virtual port on your system and no hardware attached (at least no working hardware). That would mean that -for once  ;¬) -  ChucK would be working fine and the question becomes what you were trying to do and how you could accomplish that.</div>
<div><br></div><div>Could you confirm this is all more or less right? If something is still unclear we can take another step back.</div><div><br></div><div>Yours,</div><div>Kas.</div></div></div>