mirror of
https://github.com/thestk/stk
synced 2026-01-19 15:41:52 +00:00
Version 4.1
This commit is contained in:
committed by
Stephen Sinclair
parent
81475b04c5
commit
2f09fcd019
@@ -1,43 +1,43 @@
|
||||
/***************************************************/
|
||||
/*! \class Noise
|
||||
\brief STK noise generator.
|
||||
|
||||
Generic random number generation using the
|
||||
C rand() function. The quality of the rand()
|
||||
function varies from one OS to another.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#if !defined(__NOISE_H)
|
||||
#define __NOISE_H
|
||||
|
||||
#include "Stk.h"
|
||||
|
||||
class Noise : public Stk
|
||||
{
|
||||
public:
|
||||
|
||||
//! Default constructor.
|
||||
Noise();
|
||||
|
||||
//! Class destructor.
|
||||
virtual ~Noise();
|
||||
|
||||
//! Return a random number between -1.0 and 1.0 using rand().
|
||||
virtual MY_FLOAT tick();
|
||||
|
||||
//! Return \e vectorSize random numbers between -1.0 and 1.0 in \e vector.
|
||||
virtual MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize);
|
||||
|
||||
//! Return the last computed value.
|
||||
MY_FLOAT lastOut() const;
|
||||
|
||||
protected:
|
||||
|
||||
MY_FLOAT lastOutput;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
/***************************************************/
|
||||
/*! \class Noise
|
||||
\brief STK noise generator.
|
||||
|
||||
Generic random number generation using the
|
||||
C rand() function. The quality of the rand()
|
||||
function varies from one OS to another.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#if !defined(__NOISE_H)
|
||||
#define __NOISE_H
|
||||
|
||||
#include "Stk.h"
|
||||
|
||||
class Noise : public Stk
|
||||
{
|
||||
public:
|
||||
|
||||
//! Default constructor.
|
||||
Noise();
|
||||
|
||||
//! Class destructor.
|
||||
virtual ~Noise();
|
||||
|
||||
//! Return a random number between -1.0 and 1.0 using rand().
|
||||
virtual MY_FLOAT tick();
|
||||
|
||||
//! Return \e vectorSize random numbers between -1.0 and 1.0 in \e vector.
|
||||
virtual MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize);
|
||||
|
||||
//! Return the last computed value.
|
||||
MY_FLOAT lastOut() const;
|
||||
|
||||
protected:
|
||||
|
||||
MY_FLOAT lastOutput;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user