33 float64 raw_duration = as1.getDuration();
40 temp >>
"mynameis-pan.wav";
45 stretch.showProgress(
true);
48 temp = stretch.pitchShift(as1, 1.3);
50 temp >>
"mynameis-high-pitch.wav";
53 temp = stretch.pitchShift(as1, 0.7);
55 temp >>
"mynameis-low-pitch.wav";
58 temp = stretch.timeShift(as1, 0.7);
60 temp >>
"mynameis-faster.wav";
63 temp = stretch.timeShift(as1, 1.3);
65 temp >>
"mynameis-slower.wav";
68 Buffer wobble = 1.0 + 0.25 * sine.generate(1.0,5.0);
70 temp = stretch.pitchShift(as1, wobble);
72 temp >>
"mynameis-wobble.wav";
75 Buffer ramp = sine.drawLine(as1.getDuration(), 0.7, 1.3);
77 temp = stretch.pitchShift(as1, ramp);
79 temp >>
"mynameis-ramp.wav";
82 Buffer low_freqs = sine.drawLine(1.0, 1000, 1000)
83 << sine.drawLine(raw_duration - 1.0, 1000, 20);
85 Buffer high_freqs = sine.drawLine(1.0, 2000, 2000)
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);
102 filtered.normalize();
105 filtered >>
"mynameis-filtered.wav";
A class for filtering audio in the frequecy domain.
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.
A Buffer for storing audio samples.