37 using namespace Nsound;
43 const float64 & percent_lambda_1,
45 const float64 & percent_lambda_2,
46 const float64 & percent_lambda_3,
48 const float64 & percent_lambda_4)
68 waveform << line.
drawLine(percent_lambda_1,
72 waveform << line.
drawLine(percent_lambda_2 - percent_lambda_1,
76 waveform << line.
drawLine(percent_lambda_3 - percent_lambda_2,
80 waveform << line.
drawLine(percent_lambda_4 - percent_lambda_3,
84 waveform << line.
drawLine(1.0 - percent_lambda_4,
99 ctor(sample_rate, waveform);
106 const int32 n_harmonics)
114 if(Nf < 1.0) Nf = 1.0;
118 for(
float64 k = 1.0; k <= Nf; k += 1.0)
125 waveform *= 4.0 /
M_PI;
127 ctor(sample_rate, waveform);
135 const float64 & percent_lambda_1,
137 const float64 & percent_lambda_2,
138 const float64 & percent_lambda_3,
float64 sample_rate_
Used to determine when to create a sync sample.
Square(const float64 &sample_rate)
virtual void ctor(const float64 &sample_rate)
DOXME.
static Buffer zeros(const uint32 n_samples)
Returns a Buffer full of zeros of length n_samples.
Buffer drawSquare(const float64 &sample_rate, const float64 &percent_lambda_1, const float64 &litude_1, const float64 &percent_lambda_2, const float64 &percent_lambda_3, const float64 &litude_3, const float64 &percent_lambda_4)
Buffer drawSine(const float64 &duration, const float64 &frequency)
This method draws a static sine wave.
A Buffer for storing audio samples.
Buffer drawLine(const float64 &duration, const float64 &litude_start, const float64 &litude_finish) const
This method draws a linear line beteween 2 points.
A class the provides draw utilities and a wavetable oscillator.