• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Sequencer Sample Java Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sequencer Sample Java Code


  • Subject: Sequencer Sample Java Code
  • From: email@hidden (Patrick Beard)
  • Date: Tue, 10 Dec 2002 06:37:51 -0800

I've found a number of bugs in the Java wrapper for the AudioToolbox.framework's MusicTrack. I've managed to find workarounds for the ones that were blocking me, and the fruit of these efforts is available as sample code here:

http://homepage.mac.com/pcbeard/Sequencer.java

This class encapsulates MusicPlayer, MusicSequence, and MusicTrack, and provides a simple way to add note events at specified beat values. For example:

Sequencer s = new Sequencer();
s.setTempo(0, 60);
s.addNote(60, 127, 0, 2);
int[] CM7 = { 60, 64, 67, 71 }, velocities = { 127, 117, 107, 97 };
s.addChord(CM7, velocities, 2, 2);
s.start();

Merry Christmas!

- Patrick
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: MusicPlayer questions (From: email@hidden (Patrick Beard))

  • Prev by Date: Re: MusicPlayer questions
  • Next by Date: Re: Adding Note Events to MusicTrack during sequencing
  • Previous by thread: Re: MusicPlayer questions
  • Next by thread: Re: MusicPlayer questions
  • Index(es):
    • Date
    • Thread