[sdiy] super cheap synthisizers

phillip m gallo philgallo at attglobal.net
Mon Jun 10 18:26:21 CEST 2002


I have done many implementations of a single DCO using microprocessors.  My
first was an 8085, followed by 8048, 8051 and it's variants.

If you intend to implement portamento, FM (at least to allow vibrato from a
software LFO), and key scaling you might consider using the standard 24 bit
phase accumulator approach.  The phase accumulator approach allows you to
deal with issues such as Jitter and frequency resolution. This is also the
technique typical of numerically controlled oscillators.

I have always used the 24 bit result as an index into a sample store and
then output to DACs but you could use the output of the raw 24 bit index to
produce saw and tri waves and the most sig bit to generate square.

regards,
p


-----Original Message-----
From: owner-synth-diy at dropmix.xs4all.nl
[mailto:owner-synth-diy at dropmix.xs4all.nl]On Behalf Of Theo
Sent: Monday, June 10, 2002 5:02 AM
To: mikko.a.helin at nokia.com; dmt10 at waikato.ac.nz;
synth-diy at dropmix.xs4all.nl
Subject: Re: [sdiy] super cheap synthisizers


I don't think 1/80000 or 1/160000 gives enough pitch resolution for DCO.
That is why I suggested to use 16 bit timers.
At /80000 you only get 80 steps for a 1000hz waveform, to move one octave
higher you have only 40 pitch steps.
Not much room for smooth sweeps and it only gets worse, next octave only 20
steps.

IF 1/80000 is enough resolution for you , the best way might be to set up a
timer for a 1/80000 interrupt and do the real work inside the interrupt
handler.
With the cycle counting method you may loose quite some cycles to NOP
instructions to keep the cycle count the same while branching and stuff.

Just some thoughts.
Theo


From: <mikko.a.helin at nokia.com>

> 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
> > >
> >
> >

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/02

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/02




More information about the Synth-diy mailing list