38 using namespace Nsound;
61 y <<
play(0.450, 61.734)
62 << 0.90 *
play(0.300, 123.467)
63 << 0.95 *
play(0.150, 92.491)
64 << 0.80 *
play(0.450, 61.734)
65 << 0.80 *
play(0.450, 46.245)
66 << 0.80 *
play(0.450, 55.000)
67 << 0.80 *
play(0.450, 61.734)
68 <<
play(0.450, 73.414)
69 <<
play(0.650, 61.734);
81 << tri.
drawLine(duration - 0.11, 1.0, 1.0)
85 float64 triangle_duration = 1.0 / (2.0 * frequency);
86 Buffer triangle = -1.0 * tri.
generate(triangle_duration, 2.0 * frequency)
87 << tri.
drawLine(duration - triangle_duration, 0.0,0.0);
91 << tri.
drawLine(duration - 0.1, 1.0, 1.0);
105 filter_out = tone.
filter(0);
106 for(
uint32 n = 0; n < n_samples; ++n, ++tri_iter)
108 delay.
write(filter_out + *tri_iter);
118 y += 0.0001 * body1.
filter(y)
119 + 0.00004 * body2.
filter(y);
A circulator iterator for class Buffer.
GuitarBass(const float64 &sample_rate)
Creates a Bass Kick Drum.
circular_iterator cbegin()
Retruns the itreator at the start of the Buffer.
virtual float64 generate(const float64 &frequency)
This is a real-time method for the wavetable oscillator.
AudioStream play()
Plays a demo for this instrument.
The Nsound Instrument baseclass. All Nsound instruments extend this class.
A Buffer for storing audio samples.
AudioStream filter(const AudioStream &x)
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.