 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   42   Mandolin( StkFloat lowestFrequency );
 
   63   void pluck( StkFloat amplitude );
 
   66   void pluck( StkFloat amplitude,StkFloat position );
 
   69   void noteOn( StkFloat frequency, StkFloat amplitude );
 
   72   void noteOff( StkFloat amplitude );
 
   78   StkFloat 
tick( 
unsigned int channel = 0 );
 
   98   StkFloat pluckAmplitude_;
 
  104   if ( !soundfile_[mic_].isFinished() )
 
  105     temp = soundfile_[mic_].
tick() * pluckAmplitude_;
 
  107   lastFrame_[0] = strings_[0].
tick( temp );
 
  108   lastFrame_[0] += strings_[1].
tick( temp );
 
  109   lastFrame_[0] *= 0.2;
 
  111   return lastFrame_[0];
 
  116   unsigned int nChannels = lastFrame_.
channels();
 
  117 #if defined(_STK_DEBUG_) 
  118   if ( channel > frames.
channels() - nChannels ) {
 
  119     oStream_ << 
"Mandolin::tick(): channel and StkFrames arguments are incompatible!";
 
  124   StkFloat *samples = &frames[channel];
 
  125   unsigned int j, hop = frames.
channels() - nChannels;
 
  126   if ( nChannels == 1 ) {
 
  127     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  131     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
 
  133       for ( j=1; j<nChannels; j++ )
 
  134         *samples++ = lastFrame_[j];
 
  
void setFrequency(StkFloat frequency)
Set instrument parameters for a particular frequency.
STK audio file input class.
Definition: FileWvIn.h:52
void setPluckPosition(StkFloat position)
Set the pluck or "excitation" position along the string (0.0 - 1.0).
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)
Start a note with the given frequency and amplitude (0.0 - 1.0).
STK enhanced plucked string class.
Definition: Twang.h:34
STK mandolin instrument model class.
Definition: Mandolin.h:38
void setBodySize(StkFloat size)
Set the body size (a value of 1.0 produces the "default" size).
void clear(void)
Reset and clear all internal state.
Mandolin(StkFloat lowestFrequency)
Class constructor, taking the lowest desired playing frequency.
An STK class to handle vectorized audio data.
Definition: Stk.h:275
void noteOff(StkFloat amplitude)
Stop a note with the given amplitude (speed of decay).
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.
~Mandolin(void)
Class destructor.
StkFloat tick(StkFloat input)
Compute and return one output sample.
Definition: Twang.h:113
void controlChange(int number, StkFloat value)
Perform the control change specified by number and value (0.0 - 128.0).
The STK namespace.
Definition: ADSR.h:6
STK instrument abstract base class.
Definition: Instrmnt.h:19
void setDetune(StkFloat detune)
Detune the two strings by the given factor. A value of 1.0 produces unison strings.
StkFloat tick(unsigned int channel=0)
Compute and return one output sample.
Definition: Mandolin.h:101
virtual StkFloat tick(unsigned int channel=0)
Compute a sample frame and return the specified channel value.
void pluck(StkFloat amplitude)
Pluck the strings with the given amplitude (0.0 - 1.0) using the current frequency.