arirusso / unimidi

Realtime MIDI IO for Ruby
Other
255 stars 28 forks source link

No MIDI inputs or outputs listed OSX 10.6.8 #16

Closed aaronats closed 9 years ago

aaronats commented 12 years ago

Hi Ari,

I am fairly new to messing around with MIDI IO in general and I am basically attempting to run the output.rb in the examples directory out of the built-in speakers on my mac. I am unable to get a list of any MIDI device inputs or outputs.

In irb the following returns an empty list

@output = UniMIDI::Output.gets Select a MIDI output...

Same thing for input. Any help would be greatly appreciated!

Thanks, Aaron

daqo commented 9 years ago

I have the same issue in Yosemite. Any workaround?

arirusso commented 9 years ago

Have you configured IAC ? http://tx81z.blogspot.com/2011/06/osx-unimidi-and-midi-patch-bay.html

daqo commented 9 years ago

Thanks. Now I can select the output device. Though when I run sample code, there would be no sound even if GarageBand is open.

arirusso commented 9 years ago

It's likely your GarageBand configuration-- I don't use that program so it'd be difficult to be of much help. Might be something to post on stackoverflow

daqo commented 9 years ago

But shouldn't the sample problem work even if GarageBand is not open?

require 'rubygems'
require 'unimidi'

notes = [36, 40, 43, 48, 52, 55, 60, 64, 67] # C E G arpeggios
duration = 0.1
output = UniMIDI::Output.open(:first)
output.open do |output|
  notes.each do |note|
    output.puts(0x90, note, 100) # note on message
    sleep(duration)  # wait
    output.puts(0x80, note, 100) # note off message
  end
end
arirusso commented 9 years ago

Is there any indication that it's not working?

daqo commented 9 years ago

It's successfully quitting but there is no sound coming out.

arirusso commented 9 years ago

This program doesn't make sound-- it sends MIDI messages ostensibly to a program that makes sound according to those messages. (In your case GB)

I encourage you to post questions on stackoverflow! you'll be able to get help with this there

daqo commented 9 years ago

Ok, thank you so much for your help. If I found a workaround I will post it here.

daqo commented 9 years ago

A simple restart and reopening Garageband solved the issue for me.

Thank you.