Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
$69

Application License

1 application Binary restricted distribution
$299

Developer License

5 projects Source and binary distribution
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

  • Released: Sep 24, 2012
    Last Update: Nov 19, 2012
  • Language: Objective-C
  • Time / costs savings: 60h / $3600 *

Karaoke Starter Kit for iPhone

Karaoke Starter Kit for iPhone
Developed by Ben Smiley, Released Sep 24, 2012

A starter kit and PDF tutorial that demonstrates and explains how to load, parse and play multi-instrument MIDI files in iOS, and how display karaoke lyrics which change color in real-time as the song progresses.

Objective-C

Tags: coreaudio , coremidi , iphone , karaoke

Making a karaoke app for the iPhone or iPad sounds like a simple project. However, If you look at the iPhone API, you won't find anything about karaoke. That's because the API doesn't support karaoke!

To create this starter kit, everything had to be worked out from scratch because there isn't much information publicly available on the subject. This starter kit provides a fully functional karaoke player with full screen or subtitle modes. If you want to write a karaoke app this starter kit will save you a huge amount of development time.

This component is an objective-C library that wraps around CoreAudio and includes a comprehensive PDF guide of how to work with it to create MIDI based iOS apps.

What's included

  • Loading and parsing a MIDI file using CoreMidi: Showing you how to load a MIDI file using CoreMidi and then access the MIDI events (Note, Tempo, Time Signature, etc...) individually. This puts you in full control and gives you access to all the information the file contains. I also clearly explain how the MIDI file fits together and what the important MIDI messages mean.

  • Plenty of background information: The tutorial doesn't just explains how the example project works. It also gives lots of background information and useful tips for processing MIDI files. That includes: bitwise operations, hex and binary, general Midi, how the percussion track work and much more! The guide alone is over 5000 words long.

  • Writing a fully functional MIDI player: Step by step, this guide and code explains how to interpret the sequence of messages you retrieved from the MIDI file. The MIDI player uses multi-threading to play the sequence of MIDI messages in real-time. The MIDI clock class ensures that the MIDI file plays smoothly at the correct tempo. The MIDI player provides easy to use callback functions which give you access to all MIDI events in real-time. If you need events which aren't included, it's easy to extend the framework to support all existing MIDI messages.

  • Audio Manager provides multi-timbral playback: CoreAudio on the iPhone only comes with a mono-timbral sampler. This means that you can only play your MIDI notes using one instrument sound. The Audio Manager which is included in the tutorial makes it easy to play your MIDI file using up to 10 instruments using a custom SoundFont. Included is a step by step guide to setting up a complex audio graph. It also shows how to set up the instruments based on information provided in the MIDI file. Doing this provides a rich sound as demonstrated in the video.

  • Karaoke: How to write a karaoke module. This module manually parses the MIDI file to extract all the lyric events. The lyrics are then displayed on the screen and are colored red as the song advances. With a little polish, this starter kit could easily form the karaoke engine of your app saving you a lot of development time.

  • More than just a tutorial: The sample project, provided with the tutorial, provides a solid framework for your CoreMidi iOS project. You can use this project as a learning exercise to learn CoreAudio and CoreMidi or base your whole project on the code.

This component and included tutorial took over 120 hours to research and write. If you're planning to write a karaoke app for the iPhone it's guaranteed to save you a substantial amount of time.

Back to top

Installation Instructions

When you've downloaded the sample project unzip the directory to the desired location.

  • The directory contains the Xcode sample project and a PDF document containing a detailed explanation of the code.
  • In order for the MIDI file to be played it's necessary to download a SoundFont file. The SoundFont provides the instrument sounds for the MIDI file. Due to it's size, the SoundFont file is not included with the sample project.
  • The SoundFont can be downloaded here. Once downloaded, place the SoundFont file in the "Resources" directory of the Xcode project and you're ready to go!

User Reviews

No reviews have been submitted yet.
Read all 4 comments »

Questions & Comments


Or enter your name and Email
  • Leveret 6 months ago
    Do you know a few good sources for such MIDI files with embedded lyrics?
  • gholias 6 months ago
    can you explain a little more about the karaoke function? How the lyrics are loaded? How do you map the Lyric and the MIDI file?
    • Ben Smiley Developer 6 months ago
      The Lyrics are loaded from the MIDI file. The MIDI specification supports adding text and lyric information as MIDI meta events. When the MIDI file is parsed, the parser looks for events of this type and adds them to the array of all MIDI events - this includes note events, control events, tempo events etc... As the song is played, any lyric events are passed to a karaoke manager. The karaoke manager then changes the color of the on-screen text as appropriate.
You must be logged-in to vote. Log-in to your account or register now.