Skip to main content

Happy Birthday - A Core MIDI Primer

·2 mins

Around the same time last year, I made myself a birthday present:

  • I got myself two developer licenses from Apple, one for iOS and one for OSX.
  • Got an app icon designed over at 99designs.

The final happy birthday present resulted in the release of MIDI Aid for Mac and MIDI Aid for iPhone, iPad and iPod touch.

Get MIDI Aid for Mac
Get MIDI Aid for Mac

Get MIDI Aid for iPad, iPhone and iPod touch
Get MIDI Aid for iPad, iPhone and iPod touch

This years birthday present is related to MIDI Aid. I want to give back and share my knowledge gained writing MIDI Aid by starting a new blog additionally to my first blog “Ramp me up, Scotty!”. This blog is all about Core MIDI and a bit of Core Audio programming.

Although MIDI Aid has been written in Objective-C, I try to provide most examples in the Swift programming language in this blog for my own learning experience.

Once a nerd, always a nerd! Umh, okay. I have never been a nerd, but I like to learn new programming languages.

Let’s get the ball rolling, start XCode and write your first Core MIDI code. Am also trying to do most example in XCode playgrounds. They are kinda nice to use and share. When XCodes start screen comes up, just select “Get started with a playground”.

Welcome to XCode

Now add the below snippet into the editor and run it. The code will query your system for any registered MIDI devices and display their properties.

{% gist 5012d94ad6194d426048 %}

Did it work? Great! Congratulations to your first working Core MIDI code.

You should be able to see something like this after expanding the output of the last line by clicking on the little plus symbol.

Screenshot Example 1

Now you are all set for more. Watch this space in the future and follow me on twitter for any updates.

Done for today!