Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2009, 03:42 PM
Member
 
Join Date: Jul 2009
Posts: 2
Rep Power: 0
Ben Wheatley is on a distinguished road
Default Getting input from MIDI devices on a Mac
Hi,

I have a Mac, and I'm trying to write a rhythm-action game, taking input from a MIDI keyboard attached to the computer. Following the examples I've seen elsewhere, I have this code to list the available MIDI devices:

Code:
MidiDevice.Info md_infos[] = MidiSystem.getMidiDeviceInfo();
for (i=0; i<md_infos.length; ++i) {
	System.out.println(md_infos[i].getName());
}
Unfortunately, this code will always print exactly two lines ("Real Time Sequencer" and "Java Sound Synthesizer"), regardless of whether or not I have my MIDI keyboard plugged in. Other applications on the system (e.g. GarageBand) recognise they keyboard and it's input. Can anyone help?

(Intel MacMini, MacOS X 10.5.7; MIDI keyboard is attached via a MIDI-to-USB converter)
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 08-05-2009, 07:08 PM
Member
 
Join Date: Jan 2009
Location: Belgium
Posts: 21
Rep Power: 0
freqrush is on a distinguished road
Send a message via MSN to freqrush
Default
Check out the code of JSynthLib, which is an "Open Source Universal Synthesizer Patch Editor / Librarian written in the Java Language".

It must have a method you can get an example from, as it also recognises the available MIDI ports. Browse or download the code here: http : // jsynthlib . svn . sourceforge.net/viewvc/jsynthlib/trunk/ (remove spaces, I can't post links yet)
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Tags
mac, midi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to usb devices alex1234 Advanced Java 2 03-30-2009 05:39 PM
Deploying MIDlets onto Mobile Devices (II) JavaForums Java Blogs 0 04-08-2008 06:50 PM
Deploying MIDlets onto Mobile Devices (I) JavaForums Java Blogs 0 04-08-2008 06:50 PM
How to control robots and other devices francojava Advanced Java 0 01-24-2008 05:03 PM
How can I figure out all the IPs on my network devices coco Networking 3 12-25-2007 05:10 AM


All times are GMT +2. The time now is 03:39 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org