Re: MIDI device/entity/endpoint names
Re: MIDI device/entity/endpoint names
- Subject: Re: MIDI device/entity/endpoint names
- From: Thomas Hudson <email@hidden>
- Date: Sun, 18 Nov 2001 17:37:17 -0800
On Tuesday, November 13, 2001, at 04:49 PM, Doug Wyatt wrote:
In looking at some MIDI apps and drivers that are starting to appear,
I've realized that there's a convention I'd like to see used, but
hasn't been documented beyond its use in sample code (if even there).
Driver writers should name things like this:
Manufacturer: MyGreatHardware
Model: MyBox
Device: MyBox #1 (i.e. append some sort of unique identifier if
there are multiple instances)
Entity: Port 1
Endpoints will inherit "Port 1" as their name -- so you don't have to
bother to name the endpoints, unless there are more than one of each,
which is usually not as good an idea as having one pair of endpoints
per entity.
Then, application writers can make a choice:
If the endpoint name "Port 1" is unique, as it will be in a
single-device studio, you can choose to display just that, and it's
nice and short.
Or, if you always want to be precise, you can concatenate the device
and endpoint names, and even prepend the manufacturer name if you like.
I need to do something similar for virtual sources of other apps. I had
intended to use a concatenation of the client name and endpoint name,
but there doesn't seem to be a way to get the client name of an
endpoint. Or should there be convention where creators of virtual
endpoints set Model/Manufacturer properties on their endpoints?
To complicate things further, if I have a cocoa-based multiple document
application, I might have MIDI sources associated with each document,
in which case I would like to name things like:
MyApp:Sequencer 1: Track 1
MyApp:Sequencer 1: Track 2
MyApp:Arpeggiator 1: Output
The alternative is that I stuff all this into the source name. I just
want
to be consistent.
Thomas