MKWaveTable
DatabaseThe Timbre Data Base is a set of spectra derived from recordings of musical instruments and voices in various ranges. The Data Base was created by Michael McNabb.
The MusicKit provides a library of
MKWaveTable
objects that can be accessed by the
DB (“DB” stands for “Data Base”) family of
MKSynthPatch
es: DBFm1vi
,
DBWave1v(i)
, and
DBWave2vi
. Note that the use of the Data Base
is strictly optional in these instruments. For example, if the Data
Base is not used, DBWave1vi
acts just like
Wave1vi
. That is, the waveform
parameter may be passed either an ordinary
MKWaveTable
(as in
Wave1vi
) or a timbre string (as defined below).
To use the Data Base, you specify a timbre as a string (such as
“SA”, including the quotation marks) to the
MKSynthPatch
's waveform parameter.
MKSynthPatch
es with multiple waveform parameters accept multiple timbre
strings. Each timbre string represents a group of
MKWaveTable
s, one for approximately every whole
step in the normal range of the voice or instrument. The
MKSynthPatch
selects the
MKWaveTable
appropriate to the frequency.
The entries in the database are referred to by string names, both in
an application and in a scorefile. The precise
MKWaveTable
that's used depends on the
frequency of the MKNote
that's being
synthesized. By default, the value of freq (or its synonym freq1) is used to determine the
MKNote
's frequency; you can find an entry based
on the value of freq0 by preceding
the database string name with the character “0” (zero);
for example, “0BA”, the timbre will be selected based on
the freq0 parameter instead.
The various timbre groups have different numbers of
MKWaveTable
s, as given in the chart below.
Internally, the MKWaveTable
s for a particular
timbre group are numbered sequentially, with 1 corresponding to the
MKWaveTable
for the bottom of the range of that
timbre. Specific MKWaveTable
s in a timbre
group can be requested by adding a numeric suffix. In this manner,
the automatic selection based on frequency can be overridden. For
example, the timbre group “BA” (bass voice singing
“AH”) consists of 15 timbres. The timbre string
“BA12” requests the 12th
MKWaveTable
, independent of the frequency.
Some of the timbres are actually recordings of the attack of an
instrument. These are best used with the
MKSynthPatch
DBWave2vi
,
which can interpolate between timbres. Note also that for realism,
appropriate envelopes, attack/decay values and vibrato must be used.
Here are the string keywords for the timbres currently in the timbre
database. Note that case is significant. The number in the third column
is the number of MKWaveTable
s for that timbre.
The normal range of the timbre corresponds to that of the
corresponding instrument. For example, “BA” is normally
used from about c2
to about d4
.
Table A-7. Subclasses of MKSynthPatch
Name | Description | Number of MKWaveTable s |
---|---|---|
“BA” | Bass voice “ah” | 15 |
“BE” | Bass voice “eh” | 14 |
“BO” | Bass voice “oh” | 15 |
“BU” | Bass voice “oo” | 15 |
“TA” | Tenor voice “ah” | 12 |
“TE” | Tenor voice “eh” | 12 |
“TI” | Tenor voice “ee” | 12 |
“TO” | Tenor voice “oh” | 12 |
“TU” | Tenor voice “oo” | 12 |
“SA” | Soprano voice “ah” | 13 |
“SE” | Soprano voice “eh” | 13 |
“SI” | Soprano voice “ee” | 13 |
“SO” | Soprano voice “oh” | 13 |
“SU” | Soprano voice “oo” | 13 |
“VCA” | Cello attack | 53 |
“VCS” | Cello sustain | 53 |
“VNA” | Violin attack | 56 |
“VNS” | Violin sustain | 56 |
“TR” | Trumpet | 31 |
“BN” | Bassoon | 41 |
“AS” | Alto saxophone | 31 |
“SS” | Soprano saxophone | 31 |
“BC” | Bass clarinet | 47 |
“CL” | Clarinet | 45 |
“EH” | English horn | 32 |
“OB” | Oboe | 33 |
“PN” | Piano | 62 |
“TW” | Triangle wave | 31 |
“SW” | Sawtooth wave | 35 |
“IW” | Impulse wave | 29 |
The MusicKit allows you to add your own timbres. This can only be done
from an Objective-C program - it can not be done in a ScoreFile. See the
MKTimbre
class for details.