#import <DBWave2vi.h>
Public Member Functions | |
(id) | - noteOnSelf: |
aNote is assumed to be a noteOn or noteDur. | |
(id) | - noteUpdateSelf: |
aNote is assumed to be a noteUpdate and the receiver is assumed to be currently playing a MKNote. | |
(double) | - noteOffSelf: |
aNote is assumed to be a noteOff. | |
(id) | - noteEndSelf |
Resest instance variables to default values. | |
Static Public Member Functions | |
(id) | + patchTemplateFor: |
Returns a template. |
DBWave2vi is a double interpolating oscillator wavetable synthesis MKSynthPatch with dynamic envelope-driven interpolation between the two oscillators, amplitude and frequency envelopes. Although DBWave2vi does not inherit from any other wavetable synthesis class, it is similar to DBWave1vi, except that there are two oscillators doing the synthesis.
The Timbre Data Base is a set of spectra derived from recordings of musical instruments and voices in various ranges. The database was created by Michael McNabb.
The MKSynthPatches that support the Data Base are DBWave1vi, DBWave2vi, and DBFm1vi. ("DB" stands for "Data Base".) 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. MKSynthPatches with multiple waveform parameters accept multiple timbre strings. Each timbre string represents a group of MKWaveTables, one for approximately every whole step in the normal range of the voice or instrument. The MKSynthPatch selects the MKWaveTable appropriate to the frequency. By default, the MKWaveTable selection is based on the parameter freq1 (synonym for freq, or MIDI keynum). By prefixing a timbre string with the zero character, e.g., "0SA", the timbre will be selected based on the freq0 parameter instead.
The various timbre groups have different numbers of MKWaveTables, as given in the chart below. Internally, the MKWaveTables for a particular timbre group are numbered sequentially, with 1 corresponding to the MKWaveTable for the bottom of the range of that timbre. Specific MKWaveTables in a timbre group can be requested by adding a numeric suffix. In this manner, the automatic selection based on frequencycan 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.
When using this MKSynthPatch in an interactive real-time context, such as playing from a MIDI keyboard, call MKUseRealTimeEnvelopes() before allocating the MKSynthPatch.
In addition to the parameters described in Wave1vi.rtfd, the following parameters are supported:
controlChange - MIDI pan (controller 10) has the same effect as bearing. If the panSensitivity is 1.0, a MIDI pan value of 0 is full left and 127 is full right. If the value of panSensitivity is less than 1.0, the pan range is narrowed toward the center. The value is set by the companion parameter, controlVal.
controlVal - See controlChange.
panSensitivity - In the range 0.0:1.0. Default is 1.0.
waveformEnv - wavetable cross-fading envelope
waveform0 - The waveform when waveformEnv is 0. Defaults to sine
waveform1 - The waveform when waveformEnv is 1. Defaults to sine
waveformAtt - Waveform envelope attack time.
waveformRel - Waveform envelope balance release time.
+ (id) patchTemplateFor: | (MKNote *) | aNote |
Returns a template.
A non-zero for svibAmpand rvibAmp determines whether vibrato resources are allocated.
aNote | is an MKNote instance. |
Reimplemented from MKSynthPatch.
- (id) noteOnSelf: | (MKNote *) | aNote |
aNote is assumed to be a noteOn or noteDur.
aNote | is an id. |
Reimplemented from MKSynthPatch.
- (id) noteUpdateSelf: | (MKNote *) | aNote |
aNote is assumed to be a noteUpdate and the receiver is assumed to be currently playing a MKNote.
Sets parameters as specified in aNote.
aNote | is an MKNote instance. |
Reimplemented from MKSynthPatch.
- (double) noteOffSelf: | (MKNote *) | aNote |
aNote is assumed to be a noteOff.
This method causes the MKNote's envelopes (if any) to begin its release portion and returns the time for the envelopes to finish. Also sets any parameters present in aNote.
aNote | is an MKNote instance. |
Reimplemented from MKSynthPatch.
- (id) noteEndSelf |
Resest instance variables to default values.
Reimplemented from MKSynthPatch.