Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

syn::WaveTableOscModule Class Reference

implements a Source Module concept for AudioIStreams this is basically an IStream -> Module adapter ports available in this module: amplitude (input) mono output (output). More...

#include <WaveTableOscModule.h>

Inheritance diagram for syn::WaveTableOscModule:

Inheritance graph
[legend]
Collaboration diagram for syn::WaveTableOscModule:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Interp { NONE, LINEAR }

Public Methods

 WaveTableOscModule ()
 default constructor. More...

virtual ~WaveTableOscModule ()
 destructor. More...

virtual void update ()
 defines this module's task (or frame) function. More...

virtual bool open ()
 modules need to be opened before they are used. More...

virtual bool isOpen ()
 check to see if the module is open. More...

virtual void close ()
 close the module when done with it. More...

virtual Moduleclone () const
 get an exact copy of me. More...

void loadStream (AudioIStreamPtr stream, int numsamps)
void loadFile (const std::string &name)
void setWaveTable (const SampleBuffer1f &wt)
virtual void setFreq (float freq)
 set frequency of emitted waveform in HZ. More...

void setFreqControl (float param)
 Set the sampling rate of the wave table (alters frequency, aka. More...

void setFreqControlSensitivity (float octaves=1.0f)
 Set how sensative setFreq() is. More...

void setInterp (Interp in)
void setLoop (bool state)
void setRetriggerable (bool state)
void trigger ()
void release ()
 has no effect when loop is set to true. More...

float freq () const
float freqControl () const
float freqControlSensitivity () const
Interp interp () const
bool loop () const
bool retriggerable () const
parameter access
virtual void getParam (const std::string &key, MultivariateType &value)
 a way to get module params without knowing the real funcs. More...

virtual void setParam (const std::string &key, const MultivariateType &value)
 a way to set module params without knowing the real funcs. More...


Detailed Description

implements a Source Module concept for AudioIStreams this is basically an IStream -> Module adapter ports available in this module: amplitude (input) mono output (output).

Definition at line 52 of file WaveTableOscModule.h.


Member Enumeration Documentation

enum syn::WaveTableOscModule::Interp
 

Enumeration values:
NONE  
LINEAR  

Definition at line 168 of file WaveTableOscModule.h.


Constructor & Destructor Documentation

syn::WaveTableOscModule::WaveTableOscModule ( )
 

default constructor.

Definition at line 38 of file WaveTableOscModule.cpp.

syn::WaveTableOscModule::~WaveTableOscModule ( ) [virtual]
 

destructor.

Definition at line 50 of file WaveTableOscModule.cpp.


Member Function Documentation

void syn::WaveTableOscModule::update ( ) [virtual]
 

defines this module's task (or frame) function.

Todo:
this func is LONG!!!! fixme

Reimplemented from syn::Module.

Definition at line 81 of file WaveTableOscModule.cpp.

bool syn::WaveTableOscModule::open ( ) [virtual]
 

modules need to be opened before they are used.

Reimplemented from syn::Module.

Definition at line 56 of file WaveTableOscModule.cpp.

bool syn::WaveTableOscModule::isOpen ( ) [virtual]
 

check to see if the module is open.

Definition at line 54 of file WaveTableOscModule.cpp.

void syn::WaveTableOscModule::close ( ) [virtual]
 

close the module when done with it.

Reimplemented from syn::Module.

Definition at line 76 of file WaveTableOscModule.cpp.

Module * syn::WaveTableOscModule::clone ( ) const [inline, virtual]
 

get an exact copy of me.

Reimplemented from syn::Module.

Definition at line 74 of file WaveTableOscModule.h.

void syn::WaveTableOscModule::loadStream ( AudioIStreamPtr stream,
int numsamps ) [inline]
 

Definition at line 87 of file WaveTableOscModule.h.

Referenced by loadFile().

void syn::WaveTableOscModule::loadFile ( const std::string & name ) [inline]
 

Definition at line 95 of file WaveTableOscModule.h.

Referenced by setParam().

void syn::WaveTableOscModule::setWaveTable ( const SampleBuffer1f & wt ) [inline]
 

Definition at line 107 of file WaveTableOscModule.h.

void syn::WaveTableOscModule::setFreq ( float freq ) [inline, virtual]
 

set frequency of emitted waveform in HZ.

Parameters:
freq   is a value between 20 and 22050 (typically) in the context of wavetable synthesis, this value affects the number of times per second that the length of the wavetable is traversed. For example, if the wave table has one period of a sine wave (0 to PI), setFreq() will control the actual sine pitch you will hear. This can be more interesting when using complex or sampled waveforms from nature.

Definition at line 122 of file WaveTableOscModule.h.

Referenced by setParam().

void syn::WaveTableOscModule::setFreqControl ( float param ) [inline]
 

Set the sampling rate of the wave table (alters frequency, aka.

pitch bend)

Parameters:
param   ranges from -1 to 1. param == 0 plays wavetable as is. param < 0 samples wavetable slower (lower pitch) param > 0 samples wavetable faster (raises pitch) The equation used for sample rate is == 2 ^ (freqSensitivity() * param). Musically, setFreq() changes the pitch by freqSensitivity() octaves.
  • For example, when freqSensitivity() == 1 and when param == 1, the pitch is raised by one octave.
  • For example, when freqSensitivity() == 1 and when param == -1, the pitch is lowered by one octave. Use setfreqSensitivity() to adjust the pitch bend sensitivity.
See also:
setfreqSensitivity

Definition at line 153 of file WaveTableOscModule.h.

Referenced by WaveTableOscModule(), and setParam().

void syn::WaveTableOscModule::setFreqControlSensitivity ( float octaves = 1.0f ) [inline]
 

Set how sensative setFreq() is.

Musically, this affects by how many octaves setFreq() will affect the sound.

Definition at line 162 of file WaveTableOscModule.h.

void syn::WaveTableOscModule::setInterp ( Interp in ) [inline]
 

Definition at line 173 of file WaveTableOscModule.h.

Referenced by setParam().

void syn::WaveTableOscModule::setLoop ( bool state ) [inline]
 

Definition at line 178 of file WaveTableOscModule.h.

Referenced by setParam().

void syn::WaveTableOscModule::setRetriggerable ( bool state ) [inline]
 

Definition at line 183 of file WaveTableOscModule.h.

void syn::WaveTableOscModule::trigger ( ) [inline]
 

Definition at line 188 of file WaveTableOscModule.h.

Referenced by setParam().

void syn::WaveTableOscModule::release ( ) [inline]
 

has no effect when loop is set to true.

Definition at line 196 of file WaveTableOscModule.h.

Referenced by setParam().

float syn::WaveTableOscModule::freq ( ) const [inline]
 

Definition at line 202 of file WaveTableOscModule.h.

float syn::WaveTableOscModule::freqControl ( ) const [inline]
 

Definition at line 203 of file WaveTableOscModule.h.

float syn::WaveTableOscModule::freqControlSensitivity ( ) const [inline]
 

Definition at line 204 of file WaveTableOscModule.h.

Interp syn::WaveTableOscModule::interp ( ) const [inline]
 

Definition at line 205 of file WaveTableOscModule.h.

bool syn::WaveTableOscModule::loop ( ) const [inline]
 

Definition at line 206 of file WaveTableOscModule.h.

bool syn::WaveTableOscModule::retriggerable ( ) const [inline]
 

Definition at line 207 of file WaveTableOscModule.h.

void syn::WaveTableOscModule::getParam ( const std::string & key,
MultivariateType & value ) [inline, virtual]
 

a way to get module params without knowing the real funcs.

Reimplemented from syn::Module.

Definition at line 213 of file WaveTableOscModule.h.

void syn::WaveTableOscModule::setParam ( const std::string & key,
const MultivariateType & value ) [inline, virtual]
 

a way to set module params without knowing the real funcs.

Reimplemented from syn::Module.

Definition at line 230 of file WaveTableOscModule.h.


The documentation for this class was generated from the following files:
Generated at Mon Apr 15 09:28:11 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001