I don't think that reading a single input sample and multiplying by a bunch of different sine wave samples will get what you want. Don't you have to read one input sample for each output sample?
Here is the existing sketch if anyone else wants to help:
//Brandon Bell
//Ardcore Ring Modulator
//8/10/12
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef M_PI
#define M_PI (3.141592654)
#endif
const int digPin[2] = {3, 4};
const int pinOffset = 5;
int digState[2] = {HIGH, LOW};
int input;
//int samp;
int zoutput;
void setup()
{
// Serial.begin(9600);
// pinMode(clkIn, INPUT);
for (int i=0; i<2; i++) {
pinMode(digPin[i], OUTPUT);
digitalWrite(digPin[i], digState[i]);
}
for (int i=0; i<8; i++) {
pinMode(pinOffset+i, OUTPUT);
digitalWrite(pinOffset+i, LOW);
}
// attachInterrupt(0, isr, RISING);
}
void loop () {
int i,nsamps;
double samp;
double samp2;
double twopi = 2.0 * M_PI;
double angleincr;
int input = analogRead(2);
nsamps = analogRead(3)*4;
angleincr = twopi / nsamps;
for(i=0;i < nsamps; i++){
samp = sin(angleincr *i);
samp2 = ((unsigned char)((samp*127.5)+127.5));
zoutput = (input * samp2);
dacOutput(zoutput);
}
}
void dacOutput(int v)
{
int tmpVal = v;
for (int i=0; i<8; i++) {
digitalWrite(pinOffset + i, tmpVal & 1);
tmpVal = tmpVal >> 1;
}
}
/*
void dacOutput(byte v)
{
PORTB = (PORTB & B11100000) | (v >> 3);
PORTD = (PORTD & B00011111) | ((v & B00000111) << 5);
}
*/