Simp Class Reference
[WaveTable Synthesis]

Single-oscillator wavetable producing periodic waveforms using a non-interpolating oscillator. More...

#import <Simp.h>

Inheritance diagram for Simp:

MKSynthPatch MKPatch

List of all members.

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 default template.


Detailed Description

Single-oscillator wavetable producing periodic waveforms using a non-interpolating oscillator.

Simp is a single-oscillator wavetable MKSynthPatch, capable of producing any periodic waveform. It is the simplest of the Music Kit MKSynthPatches. It uses a non-interpolating oscillator, which means it is not particularly high quality.

For most musical applications, it is preferable to use Wave1 or Wave1i, both of which feature amplitude and frequency envelopes.

When using this MKSynthPatch in an interactive real-time context, such as playing from a MIDI keyboard, call MKUseRealTimeEnvelopes() before allocating the MKSynthPatch.

Parameter Interpretation

amp - Amplitude. In the range 0.0:1.0. amp1 is a synonym for amp. Default is 0.1.

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 MKSynthPatch 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.

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. 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.

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.

velocitySensitivity - In range 0.0:1.0. Default is 0.5. When velocitySensitivity is 0, velocity has no effect.


Member Function Documentation

+ (id) patchTemplateFor: (MKNote *)  aNote  

Returns a default template.

Parameters:
aNote is an id.
Returns:
Returns an id. aNote is ignored.

Reimplemented from MKSynthPatch.

- (id) noteOnSelf: (MKNote *)  aNote  

aNote is assumed to be a noteOn or noteDur.

Parameters:
aNote is an id.
Returns:
Returns an id. If this is a new phrase, all instance variables are set to default values, then the values are read from the MKNote.

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.

Parameters:
aNote is an id.
Returns:
Returns an id. Sets parameters as specified in aNote.

Reimplemented from MKSynthPatch.

- (double) noteOffSelf: (MKNote *)  aNote  

aNote is assumed to be a noteOff.

Parameters:
aNote is an id.
Returns:
Returns a double. Finishes the note immediately.

Reimplemented from MKSynthPatch.

- (id) noteEndSelf  

Resest instance variables to default values.

Returns:
Returns an id.

Reimplemented from MKSynthPatch.


The documentation for this class was generated from the following file:

Generated on Sat Dec 5 17:01:16 2009 for MusicKit by  doxygen 1.5.6