early version yet but it takes 2 of several wavetables (some created from manual input, previous code, and a 3d studio max maxscript(!) that adds or subtracts various harmonics and generates the correct formatted values.
the mega can hold a lot more than the 9 wavetables i am using now but i will add more last because the more i add the longer it takes to update the arduino.
I have ordered some encoders and an LCD so i can have pages and not have to keep adding potentiometers for each modulator and so on, the modulation options will be much better (and i only have 4 more analog ins anyways )
since that video i have also added
modulate wave mix by velocity
modulate wavemix by envelope
fixed the LFO
random wavetables between the 2 selections
random mix per note
it sounds very dynamic and like a real synth oscillator
at higher frequencies it is not great,above C4 or so with some of the wavetables you start to hear some aliasing the sampling frequency is only 16k or so but this will be a bass synth with a SSM2044 filter chip. (also controlled by arduino) for a polyphonic synth i will do one without all the modulation and etc, just play up to 4-6 notes with supersaw or PWM with a envelope gate for each of the notes (external circuitry)
lots of analog inpuits with human changing the values. analogread is slow so i only do one per cycle of the main loop, even with serious knob twiddling i dont hear any lag.
ARC ++;
if (ARC > 11) {ARC = 0;} //number of analog controllers
switch(ARC){
case 0:
detval = analogRead(detPin);
//detval = map(detval, 0 ,1023, 0, 1023);
break;
case 1:
attack = analogRead(attackPin);
attack = map(attack, 0 ,1023, 1023, 5);
break;
case 2:
decay = analogRead (decayPin);
decay = map(decay, 0 ,1023, 64, 0);
break;
case 3:
wavval = analogRead(wavPin);
wavval = map(wavval, 0, 1023, 0, tcount);
MOD_wavval = wavval;
break;
case 4:
wav2val = analogRead(wav2Pin);
wav2val = map(wav2val, 0, 1023, 0, tcount);
MOD_wav2val = wav2val;
break;
case 5:
LFOval = analogRead(LFOPin);
LFOval = map(LFOval, 0, 1023, 0, 2);
break;
case 6:
LFOspeed = analogRead(LFOspeedPin);
LFOspeed = map(LFOspeed, 0, 1023, 0, 20000);
break;
case 7:
release = analogRead(releasePin);
release = map(release, 0, 1023, 55, 0.1);
break;
case 8:
sustain = analogRead(sustainPin);
sustain = map(sustain, 0, 1023, 0, 1023);
break;
case 9:
if (modeval == 0){
mixval = analogRead(mixPin);
mixval = map(mixval, 0, 1023, 0, 63);
mixinv = 63 - mixval;
}
break;
case 10:
modeval = analogRead(modePin);
modeval = map(modeval, 0, 1023, 0, 4);
break;
case 11:
semival = analogRead(semiPin);
semival = map(semival, 0, 1023, -25, 24);
break;
}