Not getting any Midi output devices


#1

Hello,
I’m having a problem with MidiOutput on mac. Below is a code snippet that tries to find the MidiDevice. It’s returning 0 for the size. Any idea what is going on?

AudioSystem::AudioSystem()
{
	int deviceIdx = MidiOutput::getDefaultDeviceIndex();
	
	Logger::outputDebugString(String(MidiOutput::getDevices().size()));
	for (int x = 0; x < MidiOutput::getDevices().size(); x++){
		Logger::outputDebugString("*" + MidiOutput::getDevices()[x]);
	}
	
	Logger::outputDebugString(T("Opening MIDI Device: ") + MidiOutput::getDevices()[deviceIdx]);

	// Open the default MIDI device
	myMidiOutput = MidiOutput::openDevice(deviceIdx);
}

Thanks.[/code]


#2

Well it’s obviously not finding any devices! Are you sure you’ve got any?

If you want to dig deeper, you could trace through the code in juce_mac_CoreMidi.cpp where it tries to iterate the devices - you might see where it’s failing.


#3

After further testing I found that it is detecting my USB MIDI interface which is used with a keyboard (the input device). The keyboard works fine with my application. But when I am trying to play a Midi Message on mac it wont. I have gotten Midi messages to play natively on the Windows platform (with out using sine wave).


#4

Well no - the mac doesn’t have a fake soft-synth midi output like windows does.

No idea how you’d set one up, but there’s probably some way of doing it with the mac midi setup app and audio units. It’s not something I’ve ever tried to do.


#5

Everything is working now. Went to the Mac Audio MIDI Setup, enabled the IAC Driver. Then I downloaded a software synth from http://pete.yandell.com/software/. You have to run SimpleSynth before you launch your application.

Thanks for the help.


#6