Sequencer Sample Java Code
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.