-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No input devices for my Macbook running OSX 10.5 via SSH #2
Comments
It could certainly be... Unfortunately, I don't have a 10.5 setup available to me right now. I'll try and walk you through some debugging The fact that you just received a blank list rather than an exception is interesting... Just to rule out any other causes-- you've confirmed that your keyboard is being seen by the OS in another program? Also, what version of Ruby/Gem/RVM are you using? and is your OS 32 or 64 bit? If by chance you want to take a shot at debugging further on your own, the CoreMIDI binding code is contained in this library: http://github.com/arirusso/ffi-coremidi. |
Yes, it shows up in Ableton Live on that machine, and I can play notes as Output of ruby --version: ruby 1.9.2p180 (2011-02-18 revision 30909) [i386-darwin9.8.0] gem version is 1.3.7 Not using RVM on this machine. The OS is 32-bit, it's a Core Duo Macbook if that matters. No problems on my On Tue, Jun 28, 2011 at 7:55 AM, arirusso <
|
OK, everything sounds normal. I have had reports that it's working on 32-bit osx, but that was 10.6 as well. :/ We'll get it working if you can bear with either having me walk you through debugging or diving in and debugging it yourself The first thing I would recommend is taking unimidi out of the equation and dealing with ffi-coremidi directly Please confirm that this is also returning an empty array require 'coremidi' p CoreMIDI::Device.all.map { |device| device.entities.values }.flatten |
Sure, sounds good to me. I've poked around in ffi-coremidi a bit already, Yes, that returns an empty array as well. I also tried:
and that returned 0. On Thu, Jun 30, 2011 at 7:13 AM, arirusso <
|
That's odd. That method supposedly works the same way in 10.5 That said, I don't think I actually used that method in the app I assume Map.MIDIGetDevice(0) gives you nil? |
Yeah, I just tried it out because it looked useful.
On 2011-06-30, at 8:21 AM, arirusso
|
try adding this to the Map class extern MIDIDeviceRef MIDIGetExternalDevice( ItemCount deviceIndex0 );attach_function :MIDIGetExternalDevice, [:ItemCount], :MIDIDeviceRef and then doing Map.MIDIGetExternalDevice(0) |
Same result, a null pointer. On Thu, Jun 30, 2011 at 8:52 AM, arirusso <
|
OK, thanks. This is a tough one. I'm going to need to think about it for a day or two. Feel free to message me if you have any ideas/questions in the meantime |
Sure - thanks for your help so far! On Thu, Jun 30, 2011 at 8:20 PM, arirusso <
|
No problem at all Maybe try another ffi library to make sure that your configuration is okay? Here's a big list |
Maybe try an older version of ruby-ffi too-- after 1.0 but earlier than 1.0.9 or whatever you're using now |
Ok - I just figured it out. Sort of. It fails when I connect to the machine over SSH and try to access MIDI. When Even connecting to itself locally will cause it to fail and not find the I've just tried out the MIDI interfaces from Java and Python as well, exact On Thu, Jun 30, 2011 at 8:55 PM, arirusso <
|
Oh okay, you didn't mention ssh!! :) Howabout when you ssh into the 10.6 laptop? Does the same thing happen? If I had to guess... perhaps OSX disallows remote access to some system APIs |
Nope, it doesn't happen on the 10.6 laptop. Surely there must be some way to disable this. I found this post, which But that doesn't explain why it works on my 10.6 laptop... On Fri, Jul 1, 2011 at 8:13 AM, arirusso <
|
Well, maybe the person asking the question is using 10.5 too. But yeah, I'm not sure what to do. There may be other options depending on what it is you're trying to do... I mean, writing an EventMachine server to accept OSC or shortcuts to MIDI commands would be pretty simple...and probably be simpler in the long-run if you want to allow other people to deploy the app |
I tried listing the MIDI inputs using
UniMIDI::Device.all
on both my Macbook Pro (running 10.6) and old Macbook (10.5), with the same USB MIDI keyboard connected.The keyboard and two built-in MIDI sources show up on the Macbook Pro. Reading input works as expected.
Nothing shows up on the Macbook.
Could this be an issue with the older MIDI API of the OS?
The text was updated successfully, but these errors were encountered: