mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
Version 4.4.2
This commit is contained in:
committed by
Stephen Sinclair
parent
b6a2202011
commit
baca57040b
@@ -14,7 +14,7 @@ namespace stk {
|
||||
messages, keeping track of its state. The \e state = ADSR::DONE
|
||||
after the envelope value reaches 0.0 in the ADSR::RELEASE state.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace stk {
|
||||
to \e keyOn and \e keyOff messages by ramping to
|
||||
1.0 on keyOn and to 0.0 on keyOff.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
Methods are provided for creating a resonance or notch in the
|
||||
frequency response while maintaining a constant filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Volume = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace stk {
|
||||
- Register State = 1
|
||||
- Breath Pressure = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
This class implements a simple bowed string
|
||||
non-linear function, as described by Smith (1986).
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Volume = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Volume = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace stk {
|
||||
This class implements a chorus effect. It takes a monophonic
|
||||
input signal and produces a stereo output signal.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Breath Pressure = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace stk {
|
||||
A non-interpolating delay line is typically used in fixed
|
||||
delay-length applications, such as for reverberation.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
@@ -63,6 +63,14 @@ public:
|
||||
*/
|
||||
StkFloat contentsAt( unsigned long tapDelay );
|
||||
|
||||
//! Sum the provided value into the delay line at \e tapDelay samples from the input.
|
||||
/*!
|
||||
The new value is returned. The tap point is determined modulo
|
||||
the delay-line length and is relative to the last input value
|
||||
(i.e., a tapDelay of zero sums into the last input value).
|
||||
*/
|
||||
StkFloat addTo( unsigned long tapDelay, StkFloat value );
|
||||
|
||||
//! Return the last computed output value.
|
||||
StkFloat lastOut( void ) const { return lastFrame_[0]; };
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace stk {
|
||||
minimum delay possible in this implementation is limited to a
|
||||
value of 0.5.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace stk {
|
||||
delay setting. The use of higher order Lagrange interpolators can
|
||||
typically improve (minimize) this attenuation characteristic.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace stk {
|
||||
of simultaneous voices) via a #define in the
|
||||
Drummer.h.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace stk {
|
||||
|
||||
This class implements an echo effect.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace stk {
|
||||
subclasses. It is general enough to support both monophonic and
|
||||
polyphonic input/output classes.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace stk {
|
||||
specified \e rate. It also responds to simple \e keyOn and \e
|
||||
keyOff messages, ramping to 1.0 on keyOn and to 0.0 on keyOff.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace stk {
|
||||
the overloaded one that takes an StkFrames object for
|
||||
multi-channel and/or multi-frame data.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace stk {
|
||||
filling a matrix row. The sample rate for
|
||||
MAT-files is assumed to be 44100 Hz.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace stk {
|
||||
type, the data type will automatically be modified. Compressed
|
||||
data types are not supported.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace stk {
|
||||
See the FileRead class for a description of the supported audio
|
||||
file formats.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace stk {
|
||||
Currently, FileWvOut is non-interpolating and the output rate is
|
||||
always Stk::sampleRate().
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace stk {
|
||||
filter subclasses. It is general enough to support both
|
||||
monophonic and polyphonic input/output classes.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace stk {
|
||||
This structure results in one extra multiply per computed sample,
|
||||
but allows easy control of the overall filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Breath Pressure = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
over time from one frequency setting to another. It provides
|
||||
methods for controlling the sweep rate and target frequency.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
implement tables or other types of input to output function
|
||||
mappings.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
generator sample-source subclasses. It is general enough to
|
||||
support both monophonic and polyphonic output classes.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace stk {
|
||||
Chris Rolfe and Damian Keller, though there are likely to be a
|
||||
number of differences in the actual implementation.
|
||||
|
||||
by Gary Scavone, 2005 - 2009.
|
||||
by Gary Scavone, 2005 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
@@ -139,7 +139,8 @@ class Granulate: public Generator
|
||||
unsigned long decayCount;
|
||||
unsigned long delayCount;
|
||||
unsigned long counter;
|
||||
unsigned long pointer;
|
||||
//unsigned long pointer;
|
||||
StkFloat pointer;
|
||||
unsigned long startPointer;
|
||||
unsigned int repeats;
|
||||
GrainState state;
|
||||
@@ -155,7 +156,8 @@ class Granulate: public Generator
|
||||
StkFrames data_;
|
||||
std::vector<Grain> grains_;
|
||||
Noise noise;
|
||||
long gPointer_;
|
||||
//long gPointer_;
|
||||
StkFloat gPointer_;
|
||||
|
||||
// Global grain parameters.
|
||||
unsigned int gDuration_;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace stk {
|
||||
This structure results in one extra multiply per computed sample,
|
||||
but allows easy control of the overall filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
data type for the incoming stream is signed 16-bit integers,
|
||||
though any of the defined StkFormats are permissible.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace stk {
|
||||
data type is signed 16-bit integers but any of the defined
|
||||
StkFormats are permissible.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace stk {
|
||||
This class provides a common interface for
|
||||
all STK instruments.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace stk {
|
||||
followed by four parallel comb filters, and two decorrelation
|
||||
delay lines in parallel at the output.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace stk {
|
||||
Consult Fletcher and Rossing, Karjalainen,
|
||||
Cook, and others for more information.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
267
include/LentPitShift.h
Normal file
267
include/LentPitShift.h
Normal file
@@ -0,0 +1,267 @@
|
||||
#ifndef STK_LENLentPitShift_H
|
||||
#define STK_LENLentPitShift_H
|
||||
|
||||
#include "Effect.h"
|
||||
#include "Delay.h"
|
||||
|
||||
namespace stk {
|
||||
|
||||
/***************************************************/
|
||||
/*! \class LentPitShift
|
||||
\brief Pitch shifter effect class based on the Lent algorithm.
|
||||
|
||||
This class implements a pitch shifter using pitch
|
||||
tracking and sample windowing and shifting.
|
||||
|
||||
by Francois Germain, 2009.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
class LentPitShift : public Effect
|
||||
{
|
||||
public:
|
||||
//! Class constructor.
|
||||
LentPitShift( StkFloat periodRatio = 1.0, int tMax = RT_BUFFER_SIZE );
|
||||
|
||||
~LentPitShift( void ) {
|
||||
delete window;
|
||||
window = NULL;
|
||||
delete dt;
|
||||
dt = NULL;
|
||||
delete dpt;
|
||||
dpt = NULL;
|
||||
delete cumDt;
|
||||
cumDt = NULL;
|
||||
}
|
||||
|
||||
//! Reset and clear all internal state.
|
||||
void clear( void );
|
||||
|
||||
//! Set the pitch shift factor (1.0 produces no shift).
|
||||
void setShift( StkFloat shift );
|
||||
|
||||
//! Input one sample to the filter and return one output.
|
||||
StkFloat tick( StkFloat input );
|
||||
|
||||
//! Take a channel of the StkFrames object as inputs to the filter and replace with corresponding outputs.
|
||||
/*!
|
||||
The StkFrames argument reference is returned. The \c channel
|
||||
argument must be less than the number of channels in the
|
||||
StkFrames argument (the first channel is specified by 0).
|
||||
However, range checking is only performed if _STK_DEBUG_ is
|
||||
defined during compilation, in which case an out-of-range value
|
||||
will trigger an StkError exception.
|
||||
*/
|
||||
StkFrames& tick( StkFrames& frames, unsigned int channel = 0 );
|
||||
|
||||
//! Take a channel of the \c iFrames object as inputs to the filter and write outputs to the \c oFrames object.
|
||||
/*!
|
||||
The \c iFrames object reference is returned. Each channel
|
||||
argument must be less than the number of channels in the
|
||||
corresponding StkFrames argument (the first channel is specified
|
||||
by 0). However, range checking is only performed if _STK_DEBUG_
|
||||
is defined during compilation, in which case an out-of-range value
|
||||
will trigger an StkError exception.
|
||||
*/
|
||||
StkFrames& tick( StkFrames& iFrames, StkFrames &oFrames, unsigned int iChannel = 0, unsigned int oChannel = 0 );
|
||||
|
||||
protected:
|
||||
|
||||
//! Apply the effect on the input samples and store it.
|
||||
/*!
|
||||
The samples stored in the input frame vector are processed
|
||||
and the delayed result are stored in the output frame vector
|
||||
*/
|
||||
void process( );
|
||||
|
||||
// Frame storage vectors for process function
|
||||
StkFrames inputFrames;
|
||||
StkFrames outputFrames;
|
||||
int ptrFrames; // writing pointer
|
||||
|
||||
// Input delay line
|
||||
Delay inputLine_;
|
||||
int inputPtr;
|
||||
|
||||
// Output delay line
|
||||
Delay outputLine_;
|
||||
double outputPtr;
|
||||
|
||||
// Pitch tracker variables
|
||||
unsigned long tMax_; // Maximal period measurable by the pitch tracker.
|
||||
// It is also the size of the window used by the pitch tracker and
|
||||
// the size of the frames that can be computed by the tick function
|
||||
|
||||
StkFloat threshold_; // Threshold of detection for the pitch tracker
|
||||
unsigned long lastPeriod_; // Result of the last pitch tracking loop
|
||||
StkFloat* dt; // Array containing the euclidian distance coefficients
|
||||
StkFloat* cumDt; // Array containing the cumulative sum of the coefficients in dt
|
||||
StkFloat* dpt; // Array containing the pitch tracking function coefficients
|
||||
|
||||
// Pitch shifter variables
|
||||
StkFloat env[2]; // Coefficients for the linear interpolation when modifying the output samples
|
||||
StkFloat* window; // Hamming window used for the input portion extraction
|
||||
double periodRatio_; // Ratio of modification of the signal period
|
||||
StkFrames zeroFrame; // Frame of tMax_ zero samples
|
||||
|
||||
|
||||
// Coefficient delay line that could be used for a dynamic calculation of the pitch
|
||||
//Delay* coeffLine_;
|
||||
|
||||
};
|
||||
|
||||
inline void LentPitShift::process()
|
||||
{
|
||||
StkFloat x_t; // input coefficient
|
||||
StkFloat x_t_T; // previous input coefficient at T samples
|
||||
StkFloat coeff; // new coefficient for the difference function
|
||||
|
||||
int alternativePitch = tMax_; // Global minimum storage
|
||||
lastPeriod_ = tMax_+1; // Storage of the lowest local minimum under the threshold
|
||||
|
||||
// Loop variables
|
||||
unsigned long delay_;
|
||||
unsigned int n;
|
||||
|
||||
// Initialization of the dt coefficients. Since the
|
||||
// frames are of tMax_ length, there is no overlapping
|
||||
// between the successive windows where pitch tracking
|
||||
// is performed.
|
||||
for ( delay_=1; delay_<=tMax_; delay_++ )
|
||||
dt[delay_] = 0.;
|
||||
|
||||
// Calculation of the dt coefficients and update of the input delay line.
|
||||
for ( n=0; n<inputFrames.size(); n++ ) {
|
||||
x_t = inputLine_.tick( inputFrames[ n ] );
|
||||
for ( delay_=1; delay_<= tMax_; delay_++ ) {
|
||||
x_t_T = inputLine_.contentsAt( delay_ );
|
||||
coeff = x_t - x_t_T;
|
||||
dt[delay_] += coeff * coeff;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculation of the pitch tracking function and test for the minima.
|
||||
for ( delay_=1; delay_<=tMax_; delay_++ ) {
|
||||
cumDt[delay_] = dt[delay_] + cumDt[delay_-1];
|
||||
dpt[delay_] = dt[delay_] * delay_ / cumDt[delay_];
|
||||
|
||||
// Look for a minimum
|
||||
if ( dpt[delay_-1]-dpt[delay_-2] < 0 && dpt[delay_]-dpt[delay_-1] > 0 ) {
|
||||
// Check if the minimum is under the threshold
|
||||
if ( dpt[delay_-1] < threshold_ ){
|
||||
lastPeriod_ = delay_-1;
|
||||
// If a minimum is found, we can stop the loop
|
||||
break;
|
||||
}
|
||||
else if ( dpt[alternativePitch] > dpt[delay_-1] )
|
||||
// Otherwise we store it if it is the current global minimum
|
||||
alternativePitch = delay_-1;
|
||||
}
|
||||
}
|
||||
|
||||
// Test for the last period length.
|
||||
if ( dpt[delay_]-dpt[delay_-1] < 0 ) {
|
||||
if ( dpt[delay_] < threshold_ )
|
||||
lastPeriod_ = delay_;
|
||||
else if ( dpt[alternativePitch] > dpt[delay_] )
|
||||
alternativePitch = delay_;
|
||||
}
|
||||
|
||||
if ( lastPeriod_ == tMax_+1 )
|
||||
// No period has been under the threshold so we used the global minimum
|
||||
lastPeriod_ = alternativePitch;
|
||||
|
||||
// We put the new zero output coefficients in the output delay line and
|
||||
// we get the previous calculated coefficients
|
||||
outputLine_.tick( zeroFrame, outputFrames );
|
||||
|
||||
// Initialization of the Hamming window used in the algorithm
|
||||
for ( int n=-(int)lastPeriod_; n<(int)lastPeriod_; n++ )
|
||||
window[n+lastPeriod_] = (1 + cos(PI*n/lastPeriod_)) / 2 ;
|
||||
|
||||
int M; // Index of reading in the input delay line
|
||||
int N; // Index of writing in the output delay line
|
||||
double sample; // Temporary storage for the new coefficient
|
||||
|
||||
// We loop for all the frames of length lastPeriod_ presents between inputPtr and tMax_
|
||||
for ( ; inputPtr<(int)(tMax_-lastPeriod_); inputPtr+=lastPeriod_ ) {
|
||||
// Test for the decision of compression/expansion
|
||||
while ( outputPtr < inputPtr ) {
|
||||
// Coefficients for the linear interpolation
|
||||
env[1] = fmod( outputPtr + tMax_, 1.0 );
|
||||
env[0] = 1.0 - env[1];
|
||||
M = tMax_ - inputPtr + lastPeriod_ - 1; // New reading pointer
|
||||
N = 2*tMax_ - (unsigned long)floor(outputPtr + tMax_) + lastPeriod_ - 1; // New writing pointer
|
||||
for ( unsigned int j=0; j<2*lastPeriod_; j++,M--,N-- ) {
|
||||
sample = inputLine_.contentsAt(M) * window[j] / 2.;
|
||||
// Linear interpolation
|
||||
outputLine_.addTo(N, env[0] * sample);
|
||||
outputLine_.addTo(N-1, env[1] * sample);
|
||||
}
|
||||
outputPtr = outputPtr + lastPeriod_ * periodRatio_; // new output pointer
|
||||
}
|
||||
}
|
||||
// Shifting of the pointers waiting for the new frame of length tMax_.
|
||||
outputPtr -= tMax_;
|
||||
inputPtr -= tMax_;
|
||||
}
|
||||
|
||||
|
||||
inline StkFloat LentPitShift :: tick( StkFloat input )
|
||||
{
|
||||
StkFloat sample;
|
||||
|
||||
inputFrames[ptrFrames] = input;
|
||||
|
||||
sample = outputFrames[ptrFrames++];
|
||||
|
||||
// Check for end condition
|
||||
if ( ptrFrames == (int) inputFrames.size() ){
|
||||
ptrFrames = 0;
|
||||
process( );
|
||||
}
|
||||
|
||||
return sample;
|
||||
}
|
||||
|
||||
inline StkFrames& LentPitShift :: tick( StkFrames& frames, unsigned int channel )
|
||||
{
|
||||
#if defined(_STK_DEBUG_)
|
||||
if ( channel >= frames.channels() ) {
|
||||
errorString_ << "LentPitShift::tick(): channel and StkFrames arguments are incompatible!";
|
||||
handleError( StkError::FUNCTION_ARGUMENT );
|
||||
}
|
||||
#endif
|
||||
|
||||
StkFloat *samples = &frames[channel];
|
||||
unsigned int hop = frames.channels();
|
||||
for ( unsigned int i=0; i<frames.frames(); i++, samples += hop ) {
|
||||
*samples = tick( *samples );
|
||||
}
|
||||
|
||||
return frames;
|
||||
}
|
||||
|
||||
inline StkFrames& LentPitShift :: tick( StkFrames& iFrames, StkFrames& oFrames, unsigned int iChannel, unsigned int oChannel )
|
||||
{
|
||||
#if defined(_STK_DEBUG_)
|
||||
if ( iChannel >= iFrames.channels() || oChannel >= oFrames.channels() ) {
|
||||
errorString_ << "LentPitShift::tick(): channel and StkFrames arguments are incompatible!";
|
||||
handleError( StkError::FUNCTION_ARGUMENT );
|
||||
}
|
||||
#endif
|
||||
|
||||
StkFloat *iSamples = &iFrames[iChannel];
|
||||
StkFloat *oSamples = &oFrames[oChannel];
|
||||
unsigned int iHop = iFrames.channels(), oHop = oFrames.channels();
|
||||
for ( unsigned int i=0; i<iFrames.frames(); i++, iSamples += iHop, oSamples += oHop ) {
|
||||
*oSamples = tick( *iSamples );
|
||||
}
|
||||
|
||||
return iFrames;
|
||||
}
|
||||
|
||||
} // stk namespace
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
- String Detuning = 1
|
||||
- Microphone Position = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace stk {
|
||||
This class is primarily for use in STK example programs but it is
|
||||
generic enough to work in many other contexts.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace stk {
|
||||
Tempo changes are internally tracked by the class and reflected in
|
||||
the values returned by the function getTickSeconds().
|
||||
|
||||
by Gary P. Scavone, 2003 - 2009.
|
||||
by Gary P. Scavone, 2003 - 2010.
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace stk {
|
||||
(non-sweeping BiQuad filters), where N is set
|
||||
during instantiation.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
- Two Fixed = 7
|
||||
- Clump = 8
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace stk {
|
||||
modulations to give a nice, natural human
|
||||
modulation function.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Gain = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace stk {
|
||||
systems, the pthread library is used. Under
|
||||
Windows, critical sections are used.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace stk {
|
||||
another allpass in series, followed by two allpass filters in
|
||||
parallel with corresponding right and left outputs.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
C rand() function. The quality of the rand()
|
||||
function varies from one OS to another.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
provided for setting the pole position along the real axis of the
|
||||
z-plane while maintaining a constant peak filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
provided for setting the zero position along the real axis of the
|
||||
z-plane while maintaining a constant filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace stk {
|
||||
allpass and comb delay filters. This class implements two series
|
||||
allpass units and two parallel comb filters.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
set of 32 static phoneme formant parameters
|
||||
and provide access to those values.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
This class implements a simple pitch shifter
|
||||
using delay lines.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace stk {
|
||||
use possibly subject to patents held by
|
||||
Stanford University, Yamaha, and others.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace stk {
|
||||
Stanford, bearing the names of Karplus and/or
|
||||
Strong.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace stk {
|
||||
coefficient. Another method is provided to create a DC blocking
|
||||
filter.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace stk {
|
||||
Smith (1986), Hirschman, Cook, Scavone, and
|
||||
others for more information.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace stk {
|
||||
- Zero Radii = 1
|
||||
- Envelope Gain = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/
|
||||
|
||||
RtAudio: realtime audio i/o C++ classes
|
||||
Copyright (c) 2001-2009 Gary P. Scavone
|
||||
Copyright (c) 2001-2010 Gary P. Scavone
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
@@ -42,7 +42,7 @@
|
||||
\file RtAudio.h
|
||||
*/
|
||||
|
||||
// RtAudio: Version 4.0.6
|
||||
// RtAudio: Version 4.0.7
|
||||
|
||||
#ifndef __RTAUDIO_H
|
||||
#define __RTAUDIO_H
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
RtMidi WWW site: http://music.mcgill.ca/~gary/rtmidi/
|
||||
|
||||
RtMidi: realtime MIDI i/o C++ classes
|
||||
Copyright (c) 2003-2009 Gary P. Scavone
|
||||
Copyright (c) 2003-2010 Gary P. Scavone
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
// RtMidi: Version 1.0.10
|
||||
// RtMidi: Version 1.0.11
|
||||
|
||||
#ifndef RTMIDI_H
|
||||
#define RTMIDI_H
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace stk {
|
||||
that takes an StkFrames object for multi-channel and/or
|
||||
multi-frame data.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace stk {
|
||||
that takes a reference to an StkFrames object for multi-channel
|
||||
and/or multi-frame data.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
where <name> is the string used in the SKINI stream.
|
||||
|
||||
by Perry R. Cook, 1995 - 2009.
|
||||
by Perry R. Cook, 1995 - 2010.
|
||||
*/
|
||||
/*********************************************************/
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace stk {
|
||||
This instrument provides an ADSR envelope, a one-pole filter, and
|
||||
structures for an arbitrary number of attack and looped files.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Breath Pressure = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace stk {
|
||||
- Little Rocks = 21
|
||||
- Tuned Bamboo Chimes = 22
|
||||
|
||||
by Perry R. Cook, 1996 - 2009.
|
||||
by Perry R. Cook, 1996 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace stk {
|
||||
- Envelope Rate = 11
|
||||
- Gain = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace stk {
|
||||
Within STK, it is used as an excitation source for other
|
||||
instruments.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace stk {
|
||||
Stanford, bearing the names of Karplus and/or
|
||||
Strong.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
|
||||
\sa \ref skini
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace stk {
|
||||
number of static functions for use with external socket
|
||||
descriptors.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
This class implements a spherical ball with
|
||||
radius, mass, position, and velocity parameters.
|
||||
|
||||
by Perry R. Cook, 1995 - 2009.
|
||||
by Perry R. Cook, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace stk {
|
||||
- String Sustain = 11
|
||||
- String Stretch = 1
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
/*! \namespace stk
|
||||
\brief The STK namespace.
|
||||
@@ -39,7 +39,7 @@ namespace stk {
|
||||
STK WWW site: http://ccrma.stanford.edu/software/stk/
|
||||
|
||||
The Synthesis ToolKit in C++ (STK)
|
||||
Copyright (c) 1995-2009 Perry R. Cook and Gary P. Scavone
|
||||
Copyright (c) 1995-2010 Perry R. Cook and Gary P. Scavone
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
@@ -254,7 +254,7 @@ protected:
|
||||
Possible future improvements in this class could include functions
|
||||
to convert to and return other data types.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace stk {
|
||||
A non-interpolating delay line is typically used in fixed
|
||||
delay-length applications, such as for reverberation.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace stk {
|
||||
less than or equal to zero indicate a closed
|
||||
or lost connection or the occurence of an error.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace stk {
|
||||
less than or equal to zero indicate a closed
|
||||
or lost connection or the occurence of an error.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace stk {
|
||||
|
||||
THREAD_RETURN THREAD_TYPE thread_function(void *ptr)
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
provided for creating a resonance in the frequency response while
|
||||
maintaining a nearly constant filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace stk {
|
||||
provided for creating a "notch" in the frequency response while
|
||||
maintaining a constant filter gain.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace stk {
|
||||
read/write methods. Values less than or equal to zero indicate
|
||||
the occurence of an error.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace stk {
|
||||
|
||||
This class implements a three-dimensional vector.
|
||||
|
||||
by Perry R. Cook, 1995 - 2009.
|
||||
by Perry R. Cook, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace stk {
|
||||
- Vibrato Gain = 1
|
||||
- Loudness (Spectral Tilt) = 128
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace stk {
|
||||
Alternately, control changes can be sent to all voices in a given
|
||||
group.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
@@ -184,11 +184,10 @@ inline StkFloat Voicer :: tick( unsigned int channel )
|
||||
voices_[i].instrument->tick();
|
||||
for ( j=0; j<voices_[i].instrument->channelsOut(); j++ ) lastFrame_[j] += voices_[i].instrument->lastOut( j );
|
||||
}
|
||||
if ( voices_[i].sounding < 0 ) {
|
||||
if ( voices_[i].sounding < 0 )
|
||||
voices_[i].sounding++;
|
||||
if ( voices_[i].sounding == 0 )
|
||||
voices_[i].noteNumber = -1;
|
||||
}
|
||||
if ( voices_[i].sounding == 0 )
|
||||
voices_[i].noteNumber = -1;
|
||||
}
|
||||
|
||||
return lastFrame_[channel];
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace stk {
|
||||
- Blowing Frequency Modulation = 2
|
||||
- Volume = 128
|
||||
|
||||
by Perry R. Cook 1996 - 2009.
|
||||
by Perry R. Cook 1996 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace stk {
|
||||
type who should worry about this (making
|
||||
money) worry away.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace stk {
|
||||
This class provides common functionality for a variety of audio
|
||||
data input subclasses.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace stk {
|
||||
Currently, WvOut is non-interpolating and the output rate is
|
||||
always Stk::sampleRate().
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2009.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2010.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user