void render(float[][] dest, int nsamples) {
		assert (nsamples <= V2Instance.MAX_FRAME_SIZE);

		float voice[] = inst.vcebuf;
		float voice2[] = inst.vcebuf2;
		//memset(voice, 0, nsamples * sizeof(*voice));

		// clear voice buffer
		for (int i = 0; i < nsamples; i++) {
			voice[i] = 0.0f;
			voice2[i] = 0.0f;
		}

		// oscillators -> voice buffer
		for (int i = 0; i < syVV2.NOSC; i++)
			osc[i].render(voice, nsamples);

		/*try {
			FileOutputStream fos = new FileOutputStream("test.raw", true);
			DataOutputStream dos = new DataOutputStream(fos);

			for (int j = 0; j < nsamples; j++) {
				dos.writeFloat(voice[j]);
			}
			dos.close();

		} catch (IOException e) {

		}*/

		// voice buffer -> filters -> voice buffer
		switch (fmode) {
			case FLTR_SINGLE:
				//COVER("VOICE filter single");
				vcf[0].render(voice, voice, nsamples);
				break;

			case FLTR_SERIAL:
			default:
				//COVER("VOICE filter serial");
				vcf[0].render(voice, voice, nsamples);
				vcf[1].render(voice, voice, nsamples);
				break;

			case FLTR_PARALLEL:
				//COVER("VOICE filter parallel");
				vcf[1].render(voice2, voice, nsamples);
				vcf[0].render(voice, voice, nsamples);
				for (int i = 0; i < nsamples; i++)
					voice[i] = voice[i] * f1gain + voice2[i] * f2gain;
				break;
		}

		// voice buffer . distortion . voice buffer
		dist.renderMono(voice, voice, nsamples);

		// voice buffer . dc filter . voice buffer
		dcf.renderMono(voice, voice, nsamples);

		//DEBUG_PLOT(this, voice, nsamples);

		// voice buffer (mono) . +=output buffer (stereo)
		// original ASM code has chan buffer hardwired as output here
		float cv = curvol;
		for (int i = 0; i < nsamples; i++) {
			float out = voice[i] * cv;
			cv += volramp;

			dest[i][0] += lvol * out + fcdcoffset;
			dest[i][1] += rvol * out + fcdcoffset;
		}

		/*try {
			FileOutputStream fos = new FileOutputStream("test.raw", true);
			DataOutputStream dos = new DataOutputStream(fos);

			for (int i = 0; i < nsamples; i++) {
				dos.writeFloat(dest[i][1]);
			}
			dos.close();

		} catch (IOException e) {

		}*/

		curvol = cv;
	}