Re: MusidDeviceStartNote
Re: MusidDeviceStartNote
- Subject: Re: MusidDeviceStartNote
- From: Bill Stewart <email@hidden>
- Date: Thu, 17 Jul 2003 15:18:59 -0700
No - actually I had this in the headers but took it out...
I don't think we can support this yet in the DLS synth - but I would
like to describe this as the way this struct is used, then we'll
implement this ourselves as well
Bill
On Thursday, July 17, 2003, at 02:56 PM, Chris Reed wrote:
This is excellent! Once you started talking about the possibility of
additional arguments to MusicDeviceStartNote, I had almost exactly the
same idea as you present here: a list of (ID,value) tuples. I had
always been somewhat concerned with the rather undefined nature of the
arguments to MusicDeviceStartNote.
Is this in the Panther AudioUnit API? I haven't had a chance to
install it yet and look...
-chris
On Thursday, Jul 17, 2003, at 14:54 US/Central, Bill Stewart wrote:
This is already supported with the MD API (but not specified) -
MusicDeviceStartNote can take an arbitrary list of arguments to apply
for that note... We haven't implemented this ourselves yet, but I
think
it has great potential: You'd start the note like this:
instID :)
Then your extended note params are:
noteNum -> this is a float32
Velocity -> this is a float32
controllerID (or paramID) -> UInt32
value -> float32
I'd actually like to standardise our usage of the ArgParams to
StartNote to use this scheme... So currently the struct is defined as:
struct MusicDeviceNoteParams
{
UInt32 argCount;
Float32 args[kVariableLengthArray];
};
Where we always expects currently that the argCount is 2. (with the
first being (a potentially fractional) "midi note number", the second
being "velocity")...
So - if the arg count > 2, then we'd expect the args to be paired -
which I can express with a struct:
struct MusicEventControlValue {
UInt32 mID;
Float32 mValue;
};
#endif
struct ExtendedNoteParams {
UInt32 argCount; //this is the total number of 4byte values
contained in this list
Float32 mNoteNum;
Float32 mVelocity;
MusicEventControlValue mControls[kVariableLengthArray]; //arbitrary
lengh
};
I would leave the mID as an UInt32, as this could either be a MIDI
controller number or a paramterID...
The affect of this call is to start a given note with the custom
values
for the specified parameterIDs... As with any call to a group/channel
based control, the note would then change to the value of the control
...
For eg> Lets say you started this note on Group/MIDI Channel == 0, but
specified a pitch bend of -4096 (a semitone down in normal pitch bend
range)... There are other notes playing on this group==0, and they are
playing with the current pitch bend of the channel...
Then you go and set the pitch bend of the channel to +8191 (2
semitones
up) - this then goes and sets ALL of the notes on that group
(including
the one you started differently) with this new pitch bend value... So,
this semantic provides a way to set the initial conditions of a note,
independently of the current state of the note's group (or MIDI
Channel)...
I don't know of any host that could do this yet (but potentially a
good
custom UI could allow the user to specify this), but this I think is
both within the API semantic of these calls, and I also believe makes
an otherwise arbitrary (and almost unusable) structure usable...
Using the mNoteNum/velocity semantic, you can always provide a more
natural interpretation of the values of these fields - we currently
interpret these as 0<128 ranged (as per MIDI), and I think that is
useful to continue to support... You could of course provide alternate
parameters (lets say you wanted so specify notes in "absolute cents",
then if that arg is presented, that could overide the mNoteNum
specification... (I think that is better than reinterpretting what the
mNoteNum field means... Then, its also easy to do (as MIDI does today)
to describe a standard matching of pitch to midi note num
Bill
mailto:email@hidden
tel: +1 408 974 4056
--
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.