This section lists and describes the parameters that are
recognized by the MusicKit MKSynthPatch
es.
The following information is given for each parameter:
Print name
Typical value range
Description of use
Keep in mind that a parameter's print name is used when the parameter is written to a scorefile. In an application, a parameter is known as an integer identifier that's represented as MK_printName. For example, the parameter listed below as amp is identified in an application as MK_amp.
As described in Chapter 4, a constant-valued
parameter can be retrieved as any data type, regardless of how it was
set. However, the MusicKit MKSynthPatch
es
always retrieve parameter values as specific types. The type by which
a particular parameter is retrieved is implied by the value range.
For example, a value range of [0.0, 1.0] implies that the parameter
value is retrieved as a double; the
range [0, 127] means that the type is int.
The parameters are organized according to synthesis technique. Many of the parameters, such as those that affect frequency, are common to more than one synthesis technique. Thus, for completeness, the same parameter description may be given in more than one section.
For further information (or rather, the same info presented in a
different style!), see MKSynthPatch
es
Introduction.
When doing synthesis in a realtime interactive context, such as when playing it from a MIDI keyboard, you should invoke:
and call:
before allocating the |
There are seven subclasses of
MKSynthPatch
that implement wave table
synthesis. The first four use MKWaveTable
objects that you supply, the others have access to the
MusicKit MKWaveTable
database:
Table A-1. Wave Table Subclasses of MKSynthPatch
MKSynthPatch | Description |
---|---|
Wave1 | One MKWaveTable |
Wave1v | One MKWaveTable with vibrato |
Wave1i | One MKWaveTable with frequency interpolation |
Wave1vi | One MKWaveTable with
vibrato and interpolation |
DBWave1v | One database MKWaveTable
with vibrato |
DBWave1vi | One database MKWaveTable with
vibrato and interpolation |
DBWave2vi | Two database
MKWaveTable s with vibrato and
interpolation |
The wave table synthesis parameters are:
Table A-2. Wave Table Synthesis Parameters
Name | Value Range | Description |
---|---|---|
amp | [0.0, 1.0] or [-∞, 0.0] dB | Basic amplitude (but see amp1). The dB (decibel) scaling
is obtained through the MKdB() C function; in a scorefile, with the
dB postfix operator. |
amp0 | same as amp | Amplitude when ampEnv = 0.0. |
amp1 | same as amp | Amplitude when ampEnv = 1.0; synonym for amp. |
ampAtt | [0.0, ∞] | ampEnv attack duration in seconds. |
ampEnv | MKEnvelope object | Amplitude envelope. |
ampRel | [0.0, ∞] | ampEnv release duration in seconds. |
bearing | [-45.0, 45.0] | Stereophonic placement in degrees. 0.0 is center, -45.0 is hard left, and 45.0 is hard right. |
controlChange | [0,127] | If controlChange is 7, then controlVal is
MIDI volume. Implemented as an attenuation of
amplitude. Default is 127 (no attenuation). If
controlChange is 1, then controlVal is MIDI modWheel.
Implemented as an attenuation of vibrato. Default is 127 (no
attenuation).
Some Wave
MKSynthPatch es also implement MIDI pan and MIDI
balance. |
controlVal | [0,127] | See controlChange. |
freq | [~15.0, ~11000.0] or pitch variable | Fundamental frequency (but see freq1). |
freq0 | same as freq | Frequency when freqEnv = 0.0. |
freq1 | same as freq | Frequency when freqEnv = 1.0; synonym for freq. |
freqAtt | [0.0, ∞] | freqEnv attack duration in seconds. |
freqEnv | MKEnvelope object | Frequency envelope. |
freqRel | [0.0, ∞] | freqEnv release duration in seconds. |
keyNum | [0, 127] or key number | Specifies pitch as an index into the default TuningSystem, an array of frequencies. Used only in the absence of freq. |
phase | [-180.0, 180] | Initial
phase of the first MKWaveTable , in degrees. |
pitchbend | [0,0x3fff] | MIDI pitch bend. Default is no bend |
pitchbendSensitivity | [0,∞] | Number of semitones represented by full pitch bend deviation. Default is 3. |
portamento | [0.0, ∞] | Phrase rearticulation time in seconds. Resets the x value of the second point of all Envelopes. |
rvibAmp | [0.0, 1.0] | Random vibrato amplitude; unused by Fm1 and Fm1i. |
svibAmp | [0.0, 1.0] | Sinusoidal vibrato amplitude; see above. |
svibFreq | [0.0, ~15.0] | Sinusoidal vibrato frequency; see above. |
velocity | [0,127] | MIDI velocity is a scaling on amplitude. 64 produces no modification. Below produces an attenuation. Above produces an amplification. |
velocitySensitivity | [0.0, 1.0] | Scaling on velocity. If velocitySensitivity is 0, velocity has no effect. If it is 1.0, a velocity of 0 produces silence. Default is 0.5. |
waveform | MKWaveTable object or
database string | First MKWaveTable (but see
waveform1). The
database string is used only by database
MKSynthPatch es. |
waveform0 | same as waveform | MKWaveTable when
waveformEnv = 0.0. Used by DBWave2vi
only. |
waveform1 | same as waveform | MKWaveTable when waveformEnv = 1.0; synonym for waveform. |
waveformEnv | MKEnvelope
object | MKEnvelope that pans between the two MKWaveTable s. Used by
DBWave2vi only. |
waveLen | power of 2 | waveform length (optimal value by default). |
vibWaveform | MKWaveTable object | Specifies shape of vibrato. |
There are nine subclasses of MKSynthPatch
that perform frequency modulation (FM). The simplest of these are
single-modulator instruments. There's also a simple FM that has access
to the MusicKit MKWaveTable
database for use
in the carrier oscillator. The rest of the FM
MKSynthPatch
es use two modulators. All of
these classes provide frequency interpolation and vibrato:
Table A-3. FM Subclasses of MKSynthPatch
MKSynthPatch | Description |
---|---|
Fm1 | Simple (one-modulator) FM |
Fm1i | Simple FM with frequency interpolation |
Fm1v | Simple FM with vibrato |
Fm1vi | Simple FM with interpolation and vibrato |
DBFm1vi | Simple FM with
interpolation, vibrato, and MKWaveTable database |
Fm2cvi | Cascade FM |
Fm2cnvi | Cascade FM with random modulation (noise) on the modulators |
Fm2pvi | Parallel FM |
Fm2pnvi | Parallel FM with noise |
The database contents are listed in the Section called MKWaveTable
Database.
The parameters recognized by the
FM MKSynthPatch
es are listed below; parameters
that are recognized by only a subset of the
MKSynthPatch
es are so noted.
Table A-4. Frequency Modulation Parameters
Name | Value Range | Description |
---|---|---|
amp | [0.0, 1.0] or [-∞, 0.0] dB | Basic amplitude
(but see amp1). The dB
(decibel) scaling is obtained through the
MKdB()
C function; in
a scorefile, with the dB postfix operator. |
amp0 | same as amp | Amplitude when ampEnv = 0.0. |
amp1 | same as amp | Amplitude when ampEnv = 1.0; synonym for amp. |
ampAtt | [0.0, ∞] | ampEnv attack duration in seconds. |
ampEnv | MKEnvelope object | Amplitude envelope. |
ampRel | [0.0, ∞] | ampEnv release duration in seconds. |
bearing | [-45.0, 45.0] | Stereophonic placement in degrees. 0.0 is center, -45.0 is hard left, and 45.0 is hard right. |
bright | [0.0, 1.0] | Modulation index scaler (defaults to 1.0). |
controlChange | [0,127] | If controlChange is 7, then
controlVal is MIDI volume. Implemented as an
attenuation of amplitude. Default is 127 (no attenuation).
If controlChange is 1, then controlVal is MIDI modWheel.
Implemented as an attenuation of vibrato. Default is
127 (no attenuation).
Some FM
MKSynthPatch es also implement MIDI pan and MIDI
balance. |
controlVal | [0,127] | See controlChange. |
cRatio | [0.0, ~10.0] | Carrier frequency as a ratio of the fundamental. |
c1Ratio | same as cRatio | Synonym for cRatio. |
freq | [~15.0, ~11000.0] or pitch variable | Fundamental frequency (but see freq1). |
freq0 | same as freq | Frequency when freqEnv = 0.0. |
freq1 | same as freq | Frequency when freqEnv = 1.0; synonym for freq. |
freqAtt | [0.0, ∞] | freqEnv attack duration in seconds. |
freqEnv | MKEnvelope object | Frequency envelope. |
freqRel | [0.0, ∞] | freqEnv release duration in seconds. |
keyNum | [0, 127] or key number | Specifies pitch as an index into the default TuningSystem, an array of frequencies. Used only in the absence of freq. |
m1Ind | [0.0, ~10.0] | Index of modulator 1 (but see m1Ind1). |
m1Ind0 | same as m1Ind | Index of modulator 1 when m1IndEnv = 0.0. |
m1Ind1 | same as m1Ind | Index of modulator 1 when m1IndEnv = 1.0; synonym for m1Ind. |
m1IndAtt | [0.0, ∞] | m1IndEnv attack duration in seconds. |
m1IndEnv | MKEnvelope object | Index Envelope for modulator 1. |
m1IndRel | [0.0, ∞] | m1IndEnv release duration in seconds. |
m1Phase | [-180.0, 180] | Initial phase of modulator 1. |
m1Ratio | [0.0, ~10.0] | Modulator 1 frequency as a ratio of the fundamental. |
m1Waveform | MKWaveTable object | Waveform of modulator 1. |
m2Ind through m2Waveform | Same as the similarly named parameters above, applied to modulator 2. | Used by the two-modulator
MKSynthPatch es only (Fm2cvi, Fm2cnvi,
Fm2pvi, and Fm2pnvi). |
noiseAmp | [0.0, 1.0] | Amplitude of noise. This parameter and the following noise parameters are used by Fm2cnvi and Fm2pnvi only. |
noiseAmp0 | same as noiseAmp | Amplitude of noise when noiseAmpEnv = 0.0. |
noiseAmp1 | same as noiseAmp | Amplitude of noise when noiseAmpEnv = 1.0 ; synonym for noiseAmp. |
noiseAmpAtt | [0.0, ∞] | noiseAmpEnv attack duration in seconds. |
noiseAmpEnv | MKEnvelope object | Noise amplitude Envelope. |
noiseAmpRel | [0.0, ∞] | noiseAmpEnv release duration in seconds. |
phase | [-180.0, 180] | Initial phase of the carrier, in degrees. |
pitchbend | [0,0x3fff] | MIDI pitch bend. Default is no bend |
pitchbendSensitivity | [0,∞] | Number of semitones represented by full pitch bend deviation. Default is 3. |
portamento | [0.0, ∞] | Phrase rearticulation time in seconds. Resets the x value of the second point of all Envelopes. |
rvibAmp | [0.0, 1.0] | Random vibrato amplitude; unused by Fm1 and Fm1i. |
svibAmp | [0.0, 1.0] | Sinusoidal vibrato amplitude; see above. |
svibFreq | [0.0, ~15.0] | Sinusoidal vibrato frequency; see above. |
waveform | MKWaveTable object or database string | Waveform of the carrier (sine wave by default). The database string is used only by DBFm1vi. |
waveLen | Power of 2 | waveform length (optimal value by default). |
velocity | [0,127] | MIDI velocity is a scaling on amplitude. 64 produces no modification. Below produces an attenuation. Above produces an amplification. |
velocitySensitivity | [0.0, 1.0] | Scaling on velocity. If velocitySensitivity is 0, velocity has no effect. If it is 1.0, a velocity of 0 produces silence. Default is 0.5. |
vibWaveform | MKWaveTable object | Specifies shape of vibrato. |
Pluck
ParametersThere's only one Pluck
. An example of
physical modeling synthesis, Pluck
derives much
of its characteristic sound naturally, without requiring much
attention. As such, it recognizes fewer parameters than the other
MKSynthPatch
es:
Table A-5. Pluck
Parameters
Name | Value Range | Description |
---|---|---|
amp | [0.0, 1.0] or [-∞, 0.0] dB | Basic amplitude (but see amp1). The dB
(decibel) scaling is obtained through the MKdB() C function; in a scorefile, with the
dB postfix
operator. |
ampRel | [0.0, ∞] | noteOff release time in seconds (to -60 dB). |
bright | [0.0, 1.0] | Dynamic level (a timbral parameter). 1.0 is the sharpest (brightest). |
bearing | [-45.0, 45.0] | Stereophonic placement in degrees. 0.0 is center, -45.0 is hard left, and 45.0 is hard right. |
controlChange | [0,127] | If controlChange is 7, then controlVal is MIDI volume. Implemented as an attenuation of amplitude. Default is 127 (no attenuation). |
controlVal | [0,127] | See controlChange. |
decay | [0.0, ∞] | Initial decay in seconds (to -60 dB). 0.0 means no decay. |
freq | [~15.0, ~1300 or ~2600, depending on sampling rate] | Fundamental frequency or pitch variable NOTE LOW UPPER LIMIT! ALSO NOTE THAT VERY LOW FREQUENCIES MAY CAUSE YOU TO RUN OUT OF DSP MEMORY! |
keyNum | [0, 127] or key number | Specifies pitch as an index into the default TuningSystem, an array of frequencies. Used only in the absence of freq. |
lowestFreq | same as freq | Lowest frequency among subsequent noteUpdates. |
pickNoise | [0.0, ~0.06] | Duration of initial noise burst in seconds. |
pitchbend | [0,0x3fff] | MIDI pitch bend. Default is no bend |
pitchbendSensitivity | [0,∞] | Number of semitones represented by full pitch bend deviation. Default is 3. |
sustain | [0.0, 1.0] | Level of sustain. |
velocity | [0,127] | MIDI velocity is a scaling on amplitude. 64 produces no modification. Below produces an attenuation. Above produces an amplification. |
velocitySensitivity | [0.0, 1.0] | Scaling on velocity. If velocitySensitivity is 0, velocity has no effect. If it is 1.0, a velocity of 0 produces silence. Default is 0.5. |