10 using namespace Nsound;
40 temp >>
"mynameis-pan.wav";
50 temp >>
"mynameis-high-pitch.wav";
55 temp >>
"mynameis-low-pitch.wav";
60 temp >>
"mynameis-faster.wav";
65 temp >>
"mynameis-slower.wav";
72 temp >>
"mynameis-wobble.wav";
79 temp >>
"mynameis-ramp.wav";
83 << sine.
drawLine(raw_duration - 1.0, 1000, 20);
86 << sine.
drawLine(raw_duration - 1.0, 2000, 16000);
92 filtered << raw << sine.
silence(0.25);
94 filtered = bpf.
filter(filtered, low_freqs, high_freqs);
100 filtered = filtered.
substream(0.0f, 3.7f);
105 filtered >>
"mynameis-filtered.wav";
float64 getDuration() const
Returns the number of seconds of audio data in the stream.
float64 getSampleRate() const
Returns the sample rate of the stream.
AudioStream pitchShift(const AudioStream &x, const float64 &factor)
AudioStream substream(uint32 start_index, uint32 n_samples=0) const
A class for filtering audio in the frequecy domain.
Buffer silence(const float64 &duration) const
This method generates silence.
void normalize()
Multiplies the AudioStream by a constant gain so the peak sample has magnitude 1.0.
virtual float64 generate(const float64 &frequency)
This is a real-time method for the wavetable oscillator.
AudioStream getPan(float64 pan) const
Sets the amplitude level left vs right.
void normalize()
Multiplies the Buffer by a constant gain so the peak sample has magnitude 1.0.
void showProgress(boolean flag)
AudioStream timeShift(const AudioStream &x, const float64 &factor)
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.