MusicPlayer questions
MusicPlayer questions
- Subject: MusicPlayer questions
- From: "brucecoughlin" <email@hidden>
- Date: Sat, 14 Jun 2003 10:49:07 -0400
I'm trying out the MusicPlayer functions and have a couple of questions.
What is NewMusicTrackFrom()? I assume it copies events from one track and
pastes them to a newly created track. I assume it creates the new track for
you (that you don't have to call MusicSequenceNewTrack()).
What are "extended" events (as in MusicTrackNewExtendedTempoEvent()).
MOST IMPORTANTLY:
I want to be able to PLAY the tempo track (ie output a click to a synth
(MIDI, not audio, event)).
Can I use the tempo track as is to do this (using
MusicSequenceGetTempoTrack())? How would I set the MIDI note/velocity for
the click?
Or do I have to copy the tempo track to a new track? And if that's so, is it
easy to globally make the beats play on a particular MIDI note?
Would it be WAY more involved to play the click as an audio event through
the computer's speakers? I'm trying (at the moment) to find the easiest way
to output the click from a MIDI File.
TIA
Here's the basic outline of what I'm using so far:
NewMusicPlayer(&myPlayer);
NewMusicSequence(&mySequence);
MusicSequenceLoadSMF(mySequence,&theFileSpec); // or
MusicSequenceLoadSMFData() if in memory
MusicPlayerSetSequence(myPlayer, mySequence);
MusicSequenceSetMIDIEndpoint(mySequence, theMIDIEndpoint);
MIDIPlayerSetTime(myPlayer, 0.0);
MusicPlayerStart(myPlayer);
MusicPlayerStop(myPlayer);
When done with it:
DisposeMusicSequence(mySequence);
DisposeMusicPlayer(myPlayer);
_______________________________________________
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.