Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I draw music notes on a staff in an iOS or Mac app? [closed]

Tags:

macos

ios

I want to write a program that will generate random notes and draw them on the screen on a staff. I want to use Cocoa or Cocoa Touch. What's the best way to go about displaying the notes? Should I somehow use a music font, or pngs of each note, or what? Are there any good tutorials or sources of info out there on this topic?

like image 687
TraxusIV Avatar asked Nov 06 '22 08:11

TraxusIV


1 Answers

I would be very tempted to use a custom music font and render it using the new ability in iOS4 to import custom fonts (I'm pretty sure it's iOS4 in general, and not just the iPad). I also assume that the entirety of CoreText is available on the mac too, but even if not, I'm sure the code wouldn't be vastly different.

Anyway, you can read about loading custom fonts here;

http://www.freetimestudios.com/2010/09/20/ipad-and-ios-4-custom-font-loading/

Or the slightly more hardcore way here;

http://www.freetimestudios.com/2010/09/13/custom-fonts-on-the-ipad-and-ios-4/

like image 165
John Wordsworth Avatar answered Nov 09 '22 10:11

John Wordsworth