You can also check the device name to make sure you’re opening
what you want, or iterate through midi device numbers until you find
the device you want. Something like:
for(0 => int i; true ; i++){
if (!midin.open(i)) me.exit();
if (midin.name() == "Intern in") break;
}
I think there’s also a capability to open by Device name (as printed
out by chuck —probe). I’ve never used it, but I think Spencer put
it in fairly recently.
PRC
> On Mar 3, 2016, at 9:00 AM, chuck-users-request@lists.cs.princeton.edu wrote:
>
> Send chuck-users mailing list submissions to
> chuck-users@lists.cs.princeton.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> or, via email, send a message with subject or body 'help' to
> chuck-users-request@lists.cs.princeton.edu
>
> You can reach the person managing the list at
> chuck-users-owner@lists.cs.princeton.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of chuck-users digest..."
>
>
> Today's Topics:
>
> 1. Re: not receiving midi messages (Daniel Chapiro) (Perry Cook)
> 2. Re: not receiving midi messages (Daniel Chapiro) (Daniel Chapiro)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 2 Mar 2016 14:50:23 -0800
> From: Perry Cook <prc@CS.Princeton.EDU>
> To: chuck-users@lists.cs.princeton.edu
> Subject: Re: [chuck-users] not receiving midi messages (Daniel
> Chapiro)
> Message-ID: <CE790EAF-FEAB-45C7-A2A7-38648331B0AA@cs.princeton.edu>
> Content-Type: text/plain; charset=utf-8
>
> Whenever this happens to me, It almost invariable has to do with
> some other MIDI device getting loaded and bumping the number
> of the actual device I want around. Make sure you?ve only got one
> MIDI device available, or if multiple, make sure that you?re explicitly
> opening the one you want. miniAudicle will show the devices, and
> also try running:
>
> chuck --probe
>
> in a terminal/shell/dosbox, and see what it prints out for MIDI devices.
>
> That?s my best guess. Also try another MIDI device, a basic keyboard
> or other, and make sure messages from it are getting received.
>
> PRC
>
>
>> On Mar 1, 2016, at 9:00 AM, chuck-users-request@lists.cs.princeton.edu wrote:
>>
>> Send chuck-users mailing list submissions to
>> chuck-users@lists.cs.princeton.edu
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>> or, via email, send a message with subject or body 'help' to
>> chuck-users-request@lists.cs.princeton.edu
>>
>> You can reach the person managing the list at
>> chuck-users-owner@lists.cs.princeton.edu
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of chuck-users digest..."
>>
>>
>> Today's Topics:
>>
>> 1. not receiving midi messages (Daniel Chapiro)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 29 Feb 2016 18:03:48 -0800
>> From: Daniel Chapiro <dchapiro@gmail.com>
>> To: ChucK Users Mailing List <chuck-users@lists.cs.princeton.edu>
>> Subject: [chuck-users] not receiving midi messages
>> Message-ID: <C3FE748A-D746-484F-B420-916DBDA98890@gmail.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Hi - I have beeen using the same version of Chuck (1.3.5.2-beta-2) on OSX Lion (10.7.5) for over a year, without any changes or problems. However something strange happened, and I'm stuck:
>>
>> All versions of my Chuck-based software stopped working with my WX-5 (including those that I had frozen and worked fine)
>> I tried the WX-5 with GB+Wivi, and it works fine, so I know the hardware is ok, and OSX is passing the midi events to the applications.
>> As one more check, I ran "MIDI Monitor.app", and it reports correctly all the Note on/off and CC events I'm sending with the WX-5.
>> So I tried MiniAudicle->File->examples->gomidi. It opens succesfully Midi dev 0, and then it blocks forever at min.recv(msg) ...
>>
>> Can anybody give me a suggestion of what could make Chuck not see the Midi events, or what I can try next?
>>
>> Thanks!
>> Daniel
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20160229/cb7e5ce5/attachment-0001.html>
>>
>> ------------------------------
>>
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users@lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
>>
>> End of chuck-users Digest, Vol 128, Issue 1
>> *******************************************
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 2 Mar 2016 20:18:00 -0800
> From: Daniel Chapiro <dchapiro@gmail.com>
> To: ChucK Users Mailing List <chuck-users@lists.cs.princeton.edu>
> Subject: Re: [chuck-users] not receiving midi messages (Daniel
> Chapiro)
> Message-ID: <E08AD2F8-3BB4-423B-B87C-4198A0594017@gmail.com>
> Content-Type: text/plain; charset=windows-1252
>
> Hi Perry,
> You are right, and solved my problem :)
> I was using only one physical Midi input device, and had overlooked network Midi, which got in front (I'll change my code to check it doesn't just open "some" Midi dev, but the right one...)
> Thanks!
> --Daniel
>
> On Mar 2, 2016, at 2:50 PM, Perry Cook wrote:
>
>> Whenever this happens to me, It almost invariable has to do with
>> some other MIDI device getting loaded and bumping the number
>> of the actual device I want around. Make sure you?ve only got one
>> MIDI device available, or if multiple, make sure that you?re explicitly
>> opening the one you want. miniAudicle will show the devices, and
>> also try running:
>>
>> chuck --probe
>>
>> in a terminal/shell/dosbox, and see what it prints out for MIDI devices.
>>
>> That?s my best guess. Also try another MIDI device, a basic keyboard
>> or other, and make sure messages from it are getting received.
>>
>> PRC
>>
>>
>>> On Mar 1, 2016, at 9:00 AM, chuck-users-request@lists.cs.princeton.edu wrote:
>>>
>>> Send chuck-users mailing list submissions to
>>> chuck-users@lists.cs.princeton.edu
>>>
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>> or, via email, send a message with subject or body 'help' to
>>> chuck-users-request@lists.cs.princeton.edu
>>>
>>> You can reach the person managing the list at
>>> chuck-users-owner@lists.cs.princeton.edu
>>>
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of chuck-users digest..."
>>>
>>>
>>> Today's Topics:
>>>
>>> 1. not receiving midi messages (Daniel Chapiro)
>>>
>>>
>>> ----------------------------------------------------------------------
>>>
>>> Message: 1
>>> Date: Mon, 29 Feb 2016 18:03:48 -0800
>>> From: Daniel Chapiro <dchapiro@gmail.com>
>>> To: ChucK Users Mailing List <chuck-users@lists.cs.princeton.edu>
>>> Subject: [chuck-users] not receiving midi messages
>>> Message-ID: <C3FE748A-D746-484F-B420-916DBDA98890@gmail.com>
>>> Content-Type: text/plain; charset="us-ascii"
>>>
>>> Hi - I have beeen using the same version of Chuck (1.3.5.2-beta-2) on OSX Lion (10.7.5) for over a year, without any changes or problems. However something strange happened, and I'm stuck:
>>>
>>> All versions of my Chuck-based software stopped working with my WX-5 (including those that I had frozen and worked fine)
>>> I tried the WX-5 with GB+Wivi, and it works fine, so I know the hardware is ok, and OSX is passing the midi events to the applications.
>>> As one more check, I ran "MIDI Monitor.app", and it reports correctly all the Note on/off and CC events I'm sending with the WX-5.
>>> So I tried MiniAudicle->File->examples->gomidi. It opens succesfully Midi dev 0, and then it blocks forever at min.recv(msg) ...
>>>
>>> Can anybody give me a suggestion of what could make Chuck not see the Midi events, or what I can try next?
>>>
>>> Thanks!
>>> Daniel
>>> -------------- next part --------------
>>> An HTML attachment was scrubbed...
>>> URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20160229/cb7e5ce5/attachment-0001.html>
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> chuck-users mailing list
>>> chuck-users@lists.cs.princeton.edu
>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>>
>>>
>>> End of chuck-users Digest, Vol 128, Issue 1
>>> *******************************************
>>
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users@lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
>
> ------------------------------
>
> _______________________________________________
> chuck-users mailing list
> chuck-users@lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
> End of chuck-users Digest, Vol 128, Issue 2
> *******************************************
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users