 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   35 const unsigned short NXMAX = 12;
 
   36 const unsigned short NYMAX = 12;
 
   42   Mesh2D( 
unsigned short nX, 
unsigned short nY );
 
   51   void setNX( 
unsigned short lenX );
 
   54   void setNY( 
unsigned short lenY );
 
   63   void noteOn( StkFloat frequency, StkFloat amplitude );
 
   78   StkFloat 
tick( 
unsigned int channel = 0 );
 
   96   unsigned short NX_, NY_;
 
   97   unsigned short xInput_, yInput_;
 
  100   StkFloat v_[NXMAX-1][NYMAX-1]; 
 
  101   StkFloat vxp_[NXMAX][NYMAX];   
 
  102   StkFloat vxm_[NXMAX][NYMAX];   
 
  103   StkFloat vyp_[NXMAX][NYMAX];   
 
  104   StkFloat vym_[NXMAX][NYMAX];   
 
  107   StkFloat vxp1_[NXMAX][NYMAX];  
 
  108   StkFloat vxm1_[NXMAX][NYMAX];  
 
  109   StkFloat vyp1_[NXMAX][NYMAX];  
 
  110   StkFloat vym1_[NXMAX][NYMAX];  
 
  117   unsigned int nChannels = lastFrame_.
channels();
 
  118 #if defined(_STK_DEBUG_) 
  119   if ( channel > frames.
channels() - nChannels ) {
 
  120     oStream_ << 
"Mesh2D::tick(): channel and StkFrames arguments are incompatible!";
 
  125   StkFloat *samples = &frames[channel];
 
  126   unsigned int j, hop = frames.
channels() - nChannels;
 
  127   if ( nChannels == 1 ) {
 
  128     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  132     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
 
  134       for ( j=1; j<nChannels; j++ )
 
  135         *samples++ = lastFrame_[j];
 
  
STK one-pole filter class.
Definition: OnePole.h:21
Mesh2D(unsigned short nX, unsigned short nY)
Class constructor, taking the x and y dimensions in samples.
~Mesh2D(void)
Class destructor.
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
void noteOn(StkFloat frequency, StkFloat amplitude)
Impulse the mesh with the given amplitude (frequency ignored).
Two-dimensional rectilinear waveguide mesh class.
Definition: Mesh2D.h:39
An STK class to handle vectorized audio data.
Definition: Stk.h:276
StkFloat inputTick(StkFloat input)
Input a sample to the mesh and compute one output sample.
void setNY(unsigned short lenY)
Set the y dimension size in samples.
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
void controlChange(int number, StkFloat value)
Perform the control change specified by number and value (0.0 - 128.0).
void setNX(unsigned short lenX)
Set the x dimension size in samples.
void noteOff(StkFloat amplitude)
Stop a note with the given amplitude (speed of decay) ... currently ignored.
The STK namespace.
Definition: ADSR.h:6
void setInputPosition(StkFloat xFactor, StkFloat yFactor)
Set the x, y input position on a 0.0 - 1.0 scale.
void clear(void)
Reset and clear all internal state.
void setDecay(StkFloat decayFactor)
Set the loss filters gains (0.0 - 1.0).
STK instrument abstract base class.
Definition: Instrmnt.h:20
StkFloat energy(void)
Calculate and return the signal energy stored in the mesh.
StkFloat tick(unsigned int channel=0)
Compute and return one output sample.