Re: MusicDevice documentation or host app?
Re: MusicDevice documentation or host app?
- Subject: Re: MusicDevice documentation or host app?
- From: Bill Stewart <email@hidden>
- Date: Tue, 08 Oct 2002 11:05:27 -0700
on 8/10/02 4:25 AM, Pev wrote:
>
Bill Stewart wrote:
>
> The CoreAudioSDK has a detailed overview of the MusicDevice API..
>
Thanks - I've read this a few times now and whilst I can make sense of
>
Airy's code in the context of the document, the document by itself wasnt
>
the clearest thing!
>
>
> We also understand that there are two things we need to add to the SDK
>
> (1) A sample Music Device
>
> - contrary to a previous post, we would implement the extended API and
>
> then have the MIDI messages factor to those (it actually ends up being
>
> easier this way believe it or not!)
>
This was something I think the doc could be improved on - the
>
relationship between the extended API and MIDI messages. The document
>
states :
>
>
"any component that implements the MusicDevice API can do so by just
>
implementing these extended API, and the MIDI messages can be translated
>
to those API internally. As the MIDI messages fit within the extended
>
protocol, a host can use either set of methods interchangably to address
>
the MusicDevice and there should be no inconsistency as a result of
>
that"
>
>
This seems a little strange to me. Will the host decide to use one
>
interface or the other (MIDI or Extended)? Should this be negotiated?
>
Can you expect a host to interchangably use both during the operation of
>
a MusicDevice? What should you do with conflicting data via both
>
interfaces?
Actually they are entirely free to use both/either and interchangeably.
Our synth does the following...
Take all of the MIDI messages
Implement them solely as calls through to the extended API
Thus MIDI note on:
Channel becomes group (this is what it is)
Current Patch Num for that Channel becomes Instrument ID (mapping in docs)
Note Num as is
Velocity as is
All of the MIDI controls become a control ID for the ExtControl API (there's
a description in the docs about how to translate pitchbend, etc, as well)
Note Off:
The noteNum is the note identifier, the group is the channel...
Then all you have to do is write:
Note creation methods (where each note is assigned to a group)
A big control switch statement (even "all notes off", etc just act on the
groupID) - and all of the control messages just key on the groupID
MIDI controls act totally in groups (as does the ext API) - but the trick is
not to base your implementation on MIDI limitations (primarily that an
instrument sound is solely associated with a group/channel - anyway to split
a keyboard in MIDI you have to do this work anyway) - this association can
be "made" by the user...
>
> (2) A sample app that hosts music devices - similar to AU Hosting,
>
> but allowing the direction of either MIDI files or MIDI input to
>
> the music device.
>
Can I suggest that if your hosting app could support hosting of multiple
>
MusicDevices and several concurrent midi inputs it would be of serious
>
use to a lot of musicians? I know a lot of people that have wanted a way
>
to drive several synth plugins at once from 'live' sources.
>
Alternatively I can see this as being a good oppurtunity for a third
>
party developer...!
A very good opportunity:)
We try to provide the basic functionality in sample code, keeping in mind
that this code has to be understood by people who are just learning (so tend
to get more easily confused and bewildered by too much functionality)
Bill
>
> We are working on these and will have them available as soon as we
>
> get them done.
>
Thats great thanks. I'll be watching the list keenly to await their
>
announcement!
>
>
Cheers,
>
>
~Pev
>
Everything you'll ever need on one web page
>
from News and Sport to Email and Music Charts
>
http://uk.my.yahoo.com
>
_______________________________________________
>
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.
--
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.