Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Mesh2D Class Reference

#include <Mesh2D.h>

Inheritance diagram for Mesh2D:

Instrmnt Stk List of all members.

Detailed Description

Two-dimensional rectilinear waveguide mesh class.

This class implements a rectilinear, two-dimensional digital waveguide mesh structure. For details, see Van Duyne and Smith, "Physical Modeling with the 2-D Digital Waveguide Mesh", Proceedings of the 1993 International Computer Music Conference.

This is a digital waveguide model, making its use possibly subject to patents held by Stanford University, Yamaha, and others.

Control Change Numbers:

by Julius Smith, 2000 - 2002. Revised by Gary Scavone for STK, 2002.

Definition at line 36 of file Mesh2D.h.

Public Member Functions

 Mesh2D (short nX, short nY)
 Class constructor, taking the x and y dimensions in samples.

 ~Mesh2D ()
 Class destructor.

void clear ()
 Reset and clear all internal state.

void setNX (short lenX)
 Set the x dimension size in samples.

void setNY (short lenY)
 Set the y dimension size in samples.

void setInputPosition (StkFloat xFactor, StkFloat yFactor)
 Set the x, y input position on a 0.0 - 1.0 scale.

void setDecay (StkFloat decayFactor)
 Set the loss filters gains (0.0 - 1.0).

void noteOn (StkFloat frequency, StkFloat amplitude)
 Impulse the mesh with the given amplitude (frequency ignored).

void noteOff (StkFloat amplitude)
 Stop a note with the given amplitude (speed of decay) ... currently ignored.

StkFloat energy ()
 Calculate and return the signal energy stored in the mesh.

StkFloat tick ()
 Compute one output sample, without adding energy to the mesh.

StkFloat tick (StkFloat input)
 Input a sample to the mesh and compute one output sample.

StkFloat * tick (StkFloat *vector, unsigned int vectorSize)
 Computer vectorSize outputs and return them in vector.

StkFramestick (StkFrames &frames, unsigned int channel=1)
 Fill a channel of the StkFrames object with computed outputs.

void controlChange (int number, StkFloat value)
 Perform the control change specified by number and value (0.0 - 128.0).


Member Function Documentation

StkFrames& Mesh2D::tick StkFrames frames,
unsigned int  channel = 1
[virtual]
 

Fill a channel of the StkFrames object with computed outputs.

The channel argument should be one or greater (the first channel is specified by 1). An StkError will be thrown if the channel argument is zero or it is greater than the number of channels in the StkFrames object.

Reimplemented from Instrmnt.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.