#import <Wave1.h>
Static Public Member Functions | |
(id) | + patchTemplateFor: |
Returns a template using the non-interpolating osc. |
Wave1i is a single-interpolating-oscillator wavetable MKSynthPatch with an amplitude and frequency envelope. Wave1 (a subclass of Wave1i) is identical, but it uses a non-interpolating-oscillator (lower quality, but uses less DSP computation.) Wave1i is used as the root class for a number of wavetable MKSynthPatches.
Here is a diagram of Wave1:
When using this MKSynthPatch in an interactive real-time context, such as playing from a MIDI keyboard, call MKUseRealTimeEnvelopes() before allocating the MKSynthPatch.
ampEnv - Amplitude envelope. Default is an envelope that is always a constant 1.0.
amp - Amplitude. In the range 0.0:1.0. amp1 is a synonym for amp. Default is 0.1.
amp0 - Amplitude when the envelope is at 0.0. amp is amplitude when the envelope is at 1.0. amp1 is a synonym for amp. Default is 0.0.
ampAtt - Time of attack portion of envelope in seconds. If this parameter is not present, the times in the envelope are used verbatim.
ampRel - Time of release portion of envelope in seconds. If this parameter is not present, the times in the envelope are used verbatim.
bearing - Left/right panning of signal. In range -45.0:45.0. -45.0 is far left. Default is 0.0.
controlChange - This parameter is the MIDI controller number to be affected. It is used in conjunction with the parameter controlVal, which provides the value the controller is set to. This SynthPatch uses MIDI volume (controller 7) to adjust output volume as an attenuation of the final output signal. The default for MIDI volume is 127.
controlVal - See controlChange.
freq - Frequency in Hz. freq1 is a synonym for freq. Default is A440.
freqEnv - Frequency envelope. Default is an envelope that is always a constant 1.0.
freq0 - Fundamental frequency when the envelope is at 0. freq is frequency when the envelope is at 1. freq1 is a synonym for freq. Default is 0.0.
freqAtt - Time of attack portion of envelope in seconds. If this parameter is not present, the times in the envelope are used verbatim.
freqRel - Time of release portion of envelope in seconds. If this parameter is not present, the times in the envelope are used verbatim.
keyNum - The MIDI key number, an alternative to freq. If both freq and keyNum are present, freq, takes precedence. In the range 0:127.
pitchBend - Modifies frequency (or keyNum) as a 14 bit integer. A value of MIDI_ZEROBEND (defined as 0x2000 in <mididriver/midi_spec.h>) gives no bend. 0 is maximum negative bend. 0x3fff is maximum positive bend. See TuningSystem class for details. May give unexpected results when combined with frequency envelopes. Default is MIDI_ZEROBEND.
pitchBendSensitivity - A value of 0.0 means pitchBend has no effect. A value of 1.0 means pitch bend corresponds to plus or minus a semitone. Larger values give larger pitch deviation. Default is 3.0.
portamento - Portamento time. In a phrase, the transition time to a note from the immediately preceding note. Overrides the time values of the first segment of the envelopes. Note that portamento is applied after the attack-time parameters.
waveform - WaveTable used for the oscillator (only the carrier, in the case of FM). Defaults to sine. Note that the WaveTable you supply is normalized so that its peak amplitude is 1.0.
waveLen - Length of wavetable. Defaults to an optimal value. May only be set at the start of a phrase or with a noteUpdate that has no noteTag.
phase - Initial phase of wavetable in degrees. Rarely needed. Default is 0.0.
velocity - A MIDI parameter. In range 0:127. The default is 64. Velocity scales amplitude by an amount deteremined by velocitySensitivity. Some SynthPatches also scale brightness or FM index based on velocity.
velocitySensitivity - In range 0.0:1.0. Default is 0.5. When velocitySensitivity is 0, velocity has no effect.
+ (id) patchTemplateFor: | (MKNote *) | aNote |
Returns a template using the non-interpolating osc.
aNote | is a (id) |
Reimplemented from Wave1i.