36 using namespace Nsound;
59 y <<
play(0.600, 261.616)
60 <<
play(0.600, 293.656)
61 <<
play(0.600, 329.609)
62 <<
play(0.600, 349.218)
63 <<
play(0.600, 391.973)
64 <<
play(0.600, 445.000);
73 return play(duration, frequency, 1.0, 0.05);
86 float64 n_delay_seconds = 1.0 / frequency;
95 << sine.
drawLine(duration - 0.2, pressure, pressure)
96 << sine.
drawLine(0.1, pressure, 0.0);
99 << sine.
drawLine(duration - 0.02, 1.0, 1.0)
100 << sine.
drawLine(0.01, 1.0, 0.0) << 0.0;
104 Buffer input = breath * flow + env1;
112 for(
uint32 n = 0; n < n_samples; ++n)
114 float64 x = input[n] + flute * 0.35;
130 flute = delay2.
read();
133 y *= env2 * duration;
uint32 getLength() const
Returns the number of samples in the Buffer.
void normalize()
Multiplies the AudioStream by a constant gain so the peak sample has magnitude 1.0.
The Nsound Instrument baseclass. All Nsound instruments extend this class.
A Buffer for storing audio samples.
Buffer whiteNoise(const float64 &duration) const
This method generates noise from a uniform distribution.
AudioStream filter(const AudioStream &x)
Buffer drawLine(const float64 &duration, const float64 &litude_start, const float64 &litude_finish) const
This method draws a linear line beteween 2 points.
AudioStream play()
Plays a demo for this instrument.
FluteSlide(const float64 &sample_rate)
Creates a Bass Kick Drum.