#include <Nsound/NsoundAll.h>
#include <iostream>
Go to the source code of this file.
Definition at line 20 of file stretcher.cc.
References Nsound::Generator::drawFatGaussian(), Nsound::AudioStream::getDuration(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), Nsound::Stretcher::pitchShift(), Nsound::Stretcher::showProgress(), sr, and Nsound::Stretcher::timeShift().
32 float64 duration = a.getDuration();
37 Buffer bend = sin.drawFatGaussian(duration, 0.15) + 1.0;
43 stretch.showProgress(
true);
45 cout <<
"Pitch Shifting Up" << endl;
50 out << stretch.pitchShift(a, bend);
51 out >>
"Temperature_Pitch_Shifted_Up.wav";
54 cout <<
"Time Shifting Faster" << endl;
59 out << stretch.timeShift(a, 1.0 / bend);
60 out >>
"Temperature_Time_Shifted_Faster.wav";
63 bend = 1.0 - 0.25 * sin.drawFatGaussian(duration, 0.15);
65 cout <<
"Pitch Shifting Down" << endl;
68 out << stretch.pitchShift(a, bend);
69 out >>
"Temperature_Pitch_Shifted_Down.wav";
72 cout <<
"Time Shifting Slower" << endl;
74 bend = 1.0 + 0.75 * sin.drawFatGaussian(duration, 0.15);
77 out << stretch.timeShift(a, bend);
78 out >>
"Temperature_Time_Shifted_Slower.wav";
A Buffer for storing audio samples.