Re: unable to populate MusicTrack (one solved, one new problem)
Re: unable to populate MusicTrack (one solved, one new problem)
- Subject: Re: unable to populate MusicTrack (one solved, one new problem)
- From: William Stewart <email@hidden>
- Date: Tue, 2 Dec 2003 16:59:19 -0800
On 01/12/2003, at 7:25 PM, Will Benton wrote:
Thanks for your reply, Bill.
With a sequence you can only set a MIDI endpoint as a destination -
ie. as a place for the sequence to send MIDI events.
That is what I want to accomplish; sorry if my message was unclear.
Here's what I'm doing now:
1. calling MIDIClientCreate() to create a new MIDI client
2. calling MIDISourceCreate() to create a new "source" endpoint,
owned by the client I just created. This shows up as a source in apps
like MIDI Monitor and SynthTest.
3. calling MusicSequenceSetMIDIEndpoint() to set the endpoint of
my MusicSequence to the endpoint I just created.
If I send noteon/noteoff messages to the MIDISource, they will pass
through to SynthTest, MIDI Monitor, or whatever, but the notes in the
playing sequence won't. (If, however, I set up the MusicSequence to
output to an AUGraph, I get sound.) My code ("test.m", although it's
mostly C-classic) is attached, in case that helps. I'm really at a
loss to what's going wrong.
You weren't suggesting that I create an output with
MIDIDestinationCreate, were you?
Yes - the definition of a MIDI Source is that it is a source of MIDI
events - not a destination that you send MIDI events too. Perhaps Doug
might have some more to say here, but I don't believe that what you are
doing would work.
Ideally, you would work this the other way I think. ie. You *get* the
destination endpoints that are created for you by other apps, and then
set that endpoint as the sequence's MIDI destination endpoint
Bill
The sequence won't take midi endpoints as a source and add events to
that track as it receives it (though maybe that might be a good
feature request!) - if you like this idea, write a bug for me :)
(http://developer.apple.com/bugreporter)
That is a good feature request; perhaps it is fortunate that I was
unclear. :-) I'll write it up.
best,
wb
---
Will Benton <email@hidden>
"Wir sind Bettler, das ist wahr"
recently updated (11/1/03) contact info at:
http://www.cs.wisc.edu/~willb/willb.vcf
<test.m>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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.