Jeremy Leach
Senior Member
This is just an idea, but thought I'd throw it in for comment/interest. I'm interested in music synths and wonder whether there's any potential for a VERY simple Synth - using PICAXEs. I won't be hurt if people think it's a wast of time ! And I know there's a whole host of potential issues (speed, resolution, tuning etc !)
<b> Typical analogue synth stages: </b>
* Voltage Controlled Oscillator (VCO) - set the pitch of the note being played. This often has an associated Pitch Envelope Generator (PEG) that varies the pitch as a note is played.
* Voltage Controlled Filter (VCF) - Adjusts the 'colour' of the sound. This has an associated FEG.
* Voltage Controlled Amplifier (VCA) - sets the attack, decay, sustain and release (ADSR) levels of the sound. Has an associated AEG.
<b> Ideas using a PICAXE: </b>
1. Virtual VCO. Although may sound wasteful, could use a PICAXE08M just as a virtual VCO. Serin from a master PICAXE receives the note name. Tune command plays a steady note of the required frequency.
2. Virtual VCF. Although there are specific filter chips, it MIGHT be possible to make a low-pass filter with controllable cut-off using this principle:
<code><pre><font size=2 face='Courier'>
______
Signal_______| |____________ Signal Out
In |______| |
_|_
\ /
_v_
|
|
_|_
___ C
|
PICAXE Output____|
</font></pre></code>
****UPDATE: This VCF circuit WONT WORK. See posts below. *****
When the PICAXE output goes low it adds the capacitor into the circuit, which provides low impedence to higher frequencies, depending on the value C. Could use 3 PICAXE outputs each with it's own value of capacitor. This would give 8 combinations of overall capacitance - ie 8 different cut-off frequencies.
3. Virtual VCA. Again, although specific VCA chips, it MIGHT be possible to vary the amplitude of a square wave as follows:
<code><pre><font size=2 face='Courier'>
0 to 5V Square Wave -----+
Input |
_|_
| |
| R |
| |
|___|
|
+---------> Amplitude modulated
___|___ Square wave output
PWM _______ | MOSFET|
Out ----| |-+----| |
|_______| | |_______|
_|_ |
C ___ |
| |
| |
GND-----------+--------+---------
</font></pre></code>
The PICAXE generates a PWM signal, and the width of the pulse determines the average voltage across C, which is the bias voltage of the MOSFET. When the Square wave input is 'on' the bias to the MOSFET determines the output 'on' voltage - which is therefore set by the pulse width.
<b>Putting together </b>
So, need two PICAXE08Ms, both driven from a Master PICAXE:
VCO_PICAXE (08M): On startup this listens for note value and then blasts out a long note of this frequency.
VCFandVCA_PICAXE (08M): This receives note 'duration' and 'voice' value from the master PICAXE. It then manipulates the PWM signal and the filter outputs and generates the necessary FEG and AEG 'envelopes'.
<b> Polyphony </b>
In theory the two 08Ms could form a 'module'. There could be, say, 4 or even 8 (!!) of these modules. The master PICAXE detects key-press information from a keyboard (or just reads an internal 'score') and then assigns the next free module the task of playing the required note.
Edited by - Jeremy Leach on 02/05/2006 17:35:49
<b> Typical analogue synth stages: </b>
* Voltage Controlled Oscillator (VCO) - set the pitch of the note being played. This often has an associated Pitch Envelope Generator (PEG) that varies the pitch as a note is played.
* Voltage Controlled Filter (VCF) - Adjusts the 'colour' of the sound. This has an associated FEG.
* Voltage Controlled Amplifier (VCA) - sets the attack, decay, sustain and release (ADSR) levels of the sound. Has an associated AEG.
<b> Ideas using a PICAXE: </b>
1. Virtual VCO. Although may sound wasteful, could use a PICAXE08M just as a virtual VCO. Serin from a master PICAXE receives the note name. Tune command plays a steady note of the required frequency.
2. Virtual VCF. Although there are specific filter chips, it MIGHT be possible to make a low-pass filter with controllable cut-off using this principle:
<code><pre><font size=2 face='Courier'>
______
Signal_______| |____________ Signal Out
In |______| |
_|_
\ /
_v_
|
|
_|_
___ C
|
PICAXE Output____|
</font></pre></code>
****UPDATE: This VCF circuit WONT WORK. See posts below. *****
When the PICAXE output goes low it adds the capacitor into the circuit, which provides low impedence to higher frequencies, depending on the value C. Could use 3 PICAXE outputs each with it's own value of capacitor. This would give 8 combinations of overall capacitance - ie 8 different cut-off frequencies.
3. Virtual VCA. Again, although specific VCA chips, it MIGHT be possible to vary the amplitude of a square wave as follows:
<code><pre><font size=2 face='Courier'>
0 to 5V Square Wave -----+
Input |
_|_
| |
| R |
| |
|___|
|
+---------> Amplitude modulated
___|___ Square wave output
PWM _______ | MOSFET|
Out ----| |-+----| |
|_______| | |_______|
_|_ |
C ___ |
| |
| |
GND-----------+--------+---------
</font></pre></code>
The PICAXE generates a PWM signal, and the width of the pulse determines the average voltage across C, which is the bias voltage of the MOSFET. When the Square wave input is 'on' the bias to the MOSFET determines the output 'on' voltage - which is therefore set by the pulse width.
<b>Putting together </b>
So, need two PICAXE08Ms, both driven from a Master PICAXE:
VCO_PICAXE (08M): On startup this listens for note value and then blasts out a long note of this frequency.
VCFandVCA_PICAXE (08M): This receives note 'duration' and 'voice' value from the master PICAXE. It then manipulates the PWM signal and the filter outputs and generates the necessary FEG and AEG 'envelopes'.
<b> Polyphony </b>
In theory the two 08Ms could form a 'module'. There could be, say, 4 or even 8 (!!) of these modules. The master PICAXE detects key-press information from a keyboard (or just reads an internal 'score') and then assigns the next free module the task of playing the required note.
Edited by - Jeremy Leach on 02/05/2006 17:35:49