mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
Version 4.1
This commit is contained in:
committed by
Stephen Sinclair
parent
81475b04c5
commit
2f09fcd019
@@ -1,53 +1,53 @@
|
||||
/***************************************************/
|
||||
/*! \class Instrmnt
|
||||
\brief STK instrument abstract base class.
|
||||
|
||||
This class provides a common interface for
|
||||
all STK instruments.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#if !defined(__INSTRMNT_H)
|
||||
#define __INSTRMNT_H
|
||||
|
||||
#include "Stk.h"
|
||||
#include <iostream.h>
|
||||
|
||||
class Instrmnt : public Stk
|
||||
{
|
||||
public:
|
||||
//! Default constructor.
|
||||
Instrmnt();
|
||||
|
||||
//! Class destructor.
|
||||
virtual ~Instrmnt();
|
||||
|
||||
//! Start a note with the given frequency and amplitude.
|
||||
virtual void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude) = 0;
|
||||
|
||||
//! Stop a note with the given amplitude (speed of decay).
|
||||
virtual void noteOff(MY_FLOAT amplitude) = 0;
|
||||
|
||||
//! Set instrument parameters for a particular frequency.
|
||||
virtual void setFrequency(MY_FLOAT frequency);
|
||||
|
||||
//! Return the last output value.
|
||||
MY_FLOAT lastOut() const;
|
||||
|
||||
//! Compute one output sample.
|
||||
virtual MY_FLOAT tick() = 0;
|
||||
|
||||
//! Computer \e vectorSize outputs and return them in \e vector.
|
||||
virtual MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize);
|
||||
|
||||
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
|
||||
virtual void controlChange(int number, MY_FLOAT value);
|
||||
|
||||
protected:
|
||||
MY_FLOAT lastOutput;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
/***************************************************/
|
||||
/*! \class Instrmnt
|
||||
\brief STK instrument abstract base class.
|
||||
|
||||
This class provides a common interface for
|
||||
all STK instruments.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#if !defined(__INSTRMNT_H)
|
||||
#define __INSTRMNT_H
|
||||
|
||||
#include "Stk.h"
|
||||
#include <iostream.h>
|
||||
|
||||
class Instrmnt : public Stk
|
||||
{
|
||||
public:
|
||||
//! Default constructor.
|
||||
Instrmnt();
|
||||
|
||||
//! Class destructor.
|
||||
virtual ~Instrmnt();
|
||||
|
||||
//! Start a note with the given frequency and amplitude.
|
||||
virtual void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude) = 0;
|
||||
|
||||
//! Stop a note with the given amplitude (speed of decay).
|
||||
virtual void noteOff(MY_FLOAT amplitude) = 0;
|
||||
|
||||
//! Set instrument parameters for a particular frequency.
|
||||
virtual void setFrequency(MY_FLOAT frequency);
|
||||
|
||||
//! Return the last output value.
|
||||
MY_FLOAT lastOut() const;
|
||||
|
||||
//! Compute one output sample.
|
||||
virtual MY_FLOAT tick() = 0;
|
||||
|
||||
//! Computer \e vectorSize outputs and return them in \e vector.
|
||||
virtual MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize);
|
||||
|
||||
//! Perform the control change specified by \e number and \e value (0.0 - 128.0).
|
||||
virtual void controlChange(int number, MY_FLOAT value);
|
||||
|
||||
protected:
|
||||
MY_FLOAT lastOutput;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user