Cocoa, MIDI, how to?
April 9, 2008 10:22 PM   RSS feed for this thread Subscribe

How do I play MIDI notes from a Cocoa application, simply?

Okay, fully nerdcore. I have a Cocoa application which needs to play a series of MIDI notes using the 'guitar' general MIDI sound. I know the MIDI notenumbers and can handle the timing. How do I do it?

My application has a window in which I could embed a hidden Quicktime player. I could probably ask this to play a MIDI sequence, but I still need classes to construct the sequence etc.

Context: the application is a guitar chord/scale finder. I would like to be able to play the currently selected notes in sequence as a chord or scale. That's all.

A bonus would be to be able to detect incoming MIDI and use this to map the incoming MIDI notes to a virtual guitar fretboard.
posted by unSane to computers & internet (4 comments total) 1 user marked this as a favorite
You want to make use of the Core Audio framework.
posted by Blazecock Pileon at 10:25 PM on April 9


Here is sample code.
posted by Blazecock Pileon at 10:26 PM on April 9


You could also use the QuickTime framework to play MIDI notes.
posted by Blazecock Pileon at 11:10 PM on April 9


Brilliant, Pileon, that third link is just what I needed. I was looking in the Cocoa documentation which is why I missed it.
posted by unSane at 5:22 AM on April 10


« Older I'm trying to run a MySQL quer...   |   "I Me Me I" performa... Newer »

You are not logged in, either login or create an account to post comments



Related Questions
Newbie wants to convert a simple website into an... March 10, 2008
Small mac app idea wanted January 24, 2008
How long does it take to learn how to program for... July 26, 2007
OS X plugins June 25, 2007
Help a 98 lb weakling develop into a Mac... September 22, 2005