[sdiy] super cheap synthisizers

mikko.a.helin at nokia.com mikko.a.helin at nokia.com
Mon Jun 10 12:47:41 CEST 2002


You don't have to use timers, you can also count the instruction cycles and do the reset when the counter reaches zero. I think it's  best to use one uC for MIDI and a dual-port SRAMs for passing the frequency and other parameters to the 1-voice uC:s, so the other uC's don't have to use any interrupts which mix up the instruction cycle count. Anyway you need pretty fast CPU (like 8 MHZ AVR) and tight code (hand assembled) to be able to minimize the time and count of instruction cycles for one while loop to get better resolution. It may though be just possible. If the cpu freq is 8 MHz and your code takes something like 100 cycles the minimum resolution will be 1/80000 s.

main():

init_variables_and_reset_DCO_s();

while (1)
{
  read_dual_port_SRAM;

  update_dac_vco_1();
  dec(voice_1_counter);
  if (voice_1_counter == 0)
  {
	reset_dco(1);	
      voice_1_counter = cycles(frequency[VOICE_1]);
  }

  update_dac_vco_2();
  dec(voice_2_counter);
  if (voice_2_counter == 0)
  {
	reset_dco(2);
	voice_2_counter = cycles(frequency[VOICE_2]);
  }

  update_dac_vco_3();
  dec(voice_3_counter);
  if (voice_3_counter == 0)
  {
	reset_dco(3);
	voice_3_counter = cycles(frequency[VOICE_3]);
  }

  // update (multiplexed) dac for other parameter
  update_dac_vcf_cutoff(); // send vcf freq + vcf eg to dac
  update_dac_vcf_resonance(); // send resonance to dac
  update_dac_vca_amplitude(); // send vca eg + vca amplitude to dac

  // update eg and lfo state machines ...
  
} // while

-Mikko

> -----Original Message-----
> From: ext Theo [mailto:t.hogers at home.nl]
> Sent: 10. June 2002 10:28
> To: Dominic Tarr; synth-diy at dropmix.xs4all.nl
> Subject: Re: [sdiy] super cheap synthisizers
> 
> 
> I've been thinking the same thing for a while now.
> My idea was to have identical "one uC" mono synths,
> programmed to be the 1st, 2nd and so on, voice of a poly synth.
> No global note assignment, but each synth running the same assignment
> algorithm and then responding to the correct note.
> 
> Big problem I ran into is to find a _cheap_ uC with enough timers.
> For 2 "juno style" DCOs you already need two 16 bit timers.
> With "juno stile" DCO I mean:
> Put out the note number to a 4 to 6 bit R2R DAC loading a capacitor
> and use the times to reset.
> The error will be in the amplitude, frequency is rock solid.
> 
> Then you need some more 8 bit timers to generate PWM signals 
> for the cutoff,
> resonance and VCA.
> 
> Problem is that cheap uC generally don't come with 3 or more hardware
> timers and a hardware async serial  interface for the midi..
> The PWM signals for VCF and VCA should preferably run above 40khz and
> on top of that you want enough uC speed left for decent LFO and ENV.
> So away goes the software timer solution, although software timers are
> probably the only way out.
> One option might be to share one timer for VCF and VCA.
> 
> IMHO AVR are a assembly programmers dream, but none of the AVR fit the
> specs.
> 
> Duno, maybe there is a PIC that fits the bill.
> But PIC ain't my first choice, bit slow, ugly structure etc.
> Then again there _are_ pp who actually seem to like the PICs,
> then again again, some pp are into kinky stuff...
> 
> SX maybe a better alternative, fast and have "soft" hardware 
> periphery that
> you may configure the way you  need.
> However they look a bit like the PIC on the programming side :(
> And with the "soft" periphery eating some of your cycles it can become
> troublesome to keep track of your cycle count for time critical work.
> Still SX is probably the best candidate.
> 
> There are new fast 8052 look-a-likes from Dallas and Texas.
> Some of these are both fast and offer two 16 bit and one 8 bit timer,
> but don't think they fit the "cheap" part of the description.
> 
> My 2 cnts,
> Theo
> 
> 
> 
> 
> 
> From: Dominic Tarr <dmt10 at waikato.ac.nz>
> 
> >
> > I'm contemplating building a monophonic synth from a PIC 
> chip (as the
> oscilator) and a vca and vcf and decay eg.
> >
> > either controling the vcf through a heavily low pass a pulse width
> modulated signal to produce a rough control voltage, or a frequency to
> voltage converter.
> >
> > I havn't actually done much electronics, so what are your 
> thoughts on the
> feasibility of all this?
> >
> > cheers - Dom
> >
> 
> 



More information about the Synth-diy mailing list