47 Pluck pluck(44100, 1024);
52 <<
"pluck.generate() ..." << flush;
56 Buffer temp = pluck.generate(2.0, 246.94);
58 cout <<
" " <<
Toc() <<
" seconds" << endl << flush;
61 output << temp.
getReverse() << pluck.silence(1.0);
64 <<
"pluck.generate(): plucking 6 strings: guitar chord E ..."
69 Buffer string6 = pluck.generate(2.0, 82.41);
70 Buffer string5 = pluck.generate(2.0, 123.47);
71 Buffer string4 = pluck.generate(2.0, 164.81);
72 Buffer string3 = pluck.generate(2.0, 207.65);
73 Buffer string2 = pluck.generate(2.0, 246.94);
74 Buffer string1 = pluck.generate(2.0, 329.63);
82 final.
add(string5, offset );
83 final.add(string4, offset * 2);
84 final.add(string3, offset * 3);
85 final.add(string2, offset * 4);
86 final.add(string1, offset * 5);
90 cout <<
" " <<
Toc() <<
" seconds" << endl << flush;
93 output <<
final.getReverse()
94 << pluck.silence(0.5);
96 output >>
"test_pluck.wav";
Implements a simple Karplus-Strong String Synthesis algorithim.
A Buffer for storing audio samples.
void add(const Buffer &buffer, uint32 offset=0, uint32 n_samples=0)
This method adds buffer to *this.
Buffer getReverse() const
Reverses the samples in a copy of this Buffer.