Version: 1.1

Posted: 2006-05-11

Build Requirements: XCode 2.2, or Java 2 SDK for Windows, and QuickTime 7

Runtime Requirements: Java 1.5 and QuickTime 7, or later, recommended

View Source Code:

Download Sample (“PlayTune.zip”, 78.2K)
Download Sample (“PlayTune.dmg”, 140.4K)



Description

The user is shown a small window with a button on it - click the button to play the tune.

NoteChannels are constructed and given to the TunePlayer to play the tune with. The tune is then constructed using the static methods of the MusicData class to stuff the desired notes/rests/etc. into the data format that the TunePlayer expects.

An AtomicInstrument is used as the instrument for the second part of the tune. It uses a Sin Wave at 440KHz stored in an AIFF file as the sample data.

The sample also shows you how to make a Movie from the Tune that has been constructed.

Document Revision History

Date Notes
2006-05-11Cleaned up code, updated for new Java and QTJava API, and cleaned up project layout.
2003-01-14Shows how to use the TunePlayer to play a Tune using the QuickTime Music Architecture.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.