17 using namespace Nsound;
42 << sin.
drawLine(attack_time, high_frequency, low_frequency)
43 << sin.
drawLine((duration - attack_time), low_frequency, low_frequency);
47 Buffer rezzy = hz_20 * frequency_sweep;
53 Buffer temp1 = rezzy * tension;
55 frequency_sweep -= temp1;
59 audio *= sin.
drawParabola(duration, 1.0, 0.5 * duration, 0.3, 0.0);
80 <<
drum(0.5f, 0.012f, 160, 51, 0.9f, 54)
81 <<
drum(0.5f, 0.012f, 160, 51, 0.9f, 54)
82 <<
drum(0.5f, 0.012f, 160, 51, 0.9f, 54)
83 <<
drum(0.5f, 0.012f, 160, 51, 0.9f, 54)
92 out >>
"example3.wav";
99 out2 >>
"example3_reverb.wav";
108 catch(std::exception & e)
110 cerr <<
"Warning: Could not play audio: " << e.what() << endl;
123 catch(std::exception & e)
125 cerr <<
"Exception: " << e.what() << endl;
AudioStream play()
Plays a demo for this instrument.
AudioStream play()
Plays a demo for this instrument.
AudioStream play()
Plays a demo for this instrument.
Buffer drawParabola(const float64 &duration, const float64 &y1, const float64 &x2, const float64 &y2, const float64 &y3) const
This method draws a parabola between three points, intersecting the middle point. ...
AudioStream filter(const AudioStream &x)
Buffer silence(const float64 &duration) const
This method generates silence.
Buffer drum(float32 duration, float32 attack_time, float32 high_frequency, float32 low_frequency, float32 tension, float32 resident_frequency)
virtual float64 generate(const float64 &frequency)
This is a real-time method for the wavetable oscillator.
unsigned long long uint64
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.