middleAudioBuffer.assign(input, input + audioBuffersize * nChannels);
just means:
for(int i = 0; i < audioBuffersize * nChannels; i++) {
middleAudioBuffer[i] = input[i];
}
you'll want something more like:
vector<float> inputLeft, inputRight;
inputLeft.resize(audioBuffersize);
inputRight.resize(audioBuffersize);
// nChannels = 4
for(int i = 0; i < audioBuffersize * nChannels; i += nChannels) {
inputLeft[i + 0] = input[i + 0];
inputLeft[i + 1] = input[i + 1];
inputRight[i + 0] = input[i + 2];
inputRight[i + 1] = input[i + 3];
}
xwaxLeft.update(&inputLeft[0]);
xwaxRight.update(&inputRight[0]);
hope that makes some sense.
On Friday, February 24, 2012 at 11:50 AM, leeM wrote:
> new mov
> I had tried to raise up the volume of the signal and it wasn't doing
> anything to improve the response. So a little more work there. I did
> do a nofill before the draw this time :)
> I really need to put my face playback on I keep slamming my fingers on
> my right side into the screw...
>
> https://vimeo.com/37353636
>
> My turntable game is close to a release but I would like to do a
> version where this is incorporated. It had been a plan all along to
> be able to send each other XML / !SML! files to scratching / teaching
> against… In the digital dojo.
>
> lee
>
> On Feb 18, 9:42 pm, leeM <tesujicam...@gmail.com (http://gmail.com)> wrote:
> > So I've been able to apply Kyle's suggestions. One had been in a
> > separate e-mail which had been to substitute the previous code to the
> > for loop below.
> >
> > for(int i = 0; i < args.bufferSize; i++) {
> > int j = i * nChannels; // nChannels = 4
> > int k = i * 2; // 2 for stereo
> > inputLeft[k + 0] = args.buffer[j + 0];
> > inputLeft[k + 1] = args.buffer[j + 1];
> > inputRight[k + 0] = args.buffer[j + 2];
> > inputRight[k + 1] = args.buffer[j + 3];
> >
> > }
> >
> > Here is a linkhttps://vimeo.com/37037336 (http://vimeo.com/37037336)