Hi, this is my first post on here.
I have been working on this synthesiser project for a year or two and am now seeking help as I can get no further by myself.
My teenage son who is a musician was given a Tech Will Save Us Stutter synth. He built it, it worked. It has two potentiometer inputs - one for frequency, one for a "stutter" effect, a 556 timer IC, and a loudspeaker output.
Original circuit, drawn by Glenn K Lockwood <a href=https://www.glennklockwood.com/electronics/twsu-synth-kit.html>here: </a>.
I was inspired to attempt to MIDI control it. How hard could that be? LOL. I wanted to use Mixpad software to send a single MIDI channel to an Arduino UNO, in lieu of the manual frequency input.
I initially tried to take control of Pin 7 of the 556 to try and control the PWM output, but this failed as the output was very granular - about 5 sounds were available that bore little relationship to the music.
I did some reading and decided to replace the manual potentiometer with a digital potentiometer. Digital potentiometers are available in much lower resistances than 470k, so I chose a 10k MCP41XXX resistor, adjusted the time constant to be as close to the original as possible, and built the circuit below:

and photo attached.
I am using loopmidi and Hairless Midi to connect the Mixpad to the Arduino. The Hairless MIDI displays the correct MIDI data, the Arduino flashes as it receives the data.
The problem I have is that when I press play the circuit does not make any sounds beyond clicking at the start and end of each note, but the 'stutter' part of the circuit with the other 470k pot still works.
I have put a crude monitor into the code to display ASCII codes in the Hairless MIDI bridge, this has worked before, but not this time. I get this error now: +38.224 - Warning: got a status byte when we were expecting 1 more data bytes, sending possibly incomplete MIDI message 0xaa
Here is the Arduino code:
Thank you for your help in advance. I don't know much about electronics so I am worried I have gone down the wrong path and it is actually impossible to MIDI-fy the stutter synth. I can't think what else to do now. Let me know if you have any questions or need more detail. I kept the post brief.
I have been working on this synthesiser project for a year or two and am now seeking help as I can get no further by myself.
My teenage son who is a musician was given a Tech Will Save Us Stutter synth. He built it, it worked. It has two potentiometer inputs - one for frequency, one for a "stutter" effect, a 556 timer IC, and a loudspeaker output.
Original circuit, drawn by Glenn K Lockwood <a href=https://www.glennklockwood.com/electronics/twsu-synth-kit.html>here: </a>.
I was inspired to attempt to MIDI control it. How hard could that be? LOL. I wanted to use Mixpad software to send a single MIDI channel to an Arduino UNO, in lieu of the manual frequency input.
I initially tried to take control of Pin 7 of the 556 to try and control the PWM output, but this failed as the output was very granular - about 5 sounds were available that bore little relationship to the music.
I did some reading and decided to replace the manual potentiometer with a digital potentiometer. Digital potentiometers are available in much lower resistances than 470k, so I chose a 10k MCP41XXX resistor, adjusted the time constant to be as close to the original as possible, and built the circuit below:

and photo attached.
I am using loopmidi and Hairless Midi to connect the Mixpad to the Arduino. The Hairless MIDI displays the correct MIDI data, the Arduino flashes as it receives the data.
The problem I have is that when I press play the circuit does not make any sounds beyond clicking at the start and end of each note, but the 'stutter' part of the circuit with the other 470k pot still works.
I have put a crude monitor into the code to display ASCII codes in the Hairless MIDI bridge, this has worked before, but not this time. I get this error now: +38.224 - Warning: got a status byte when we were expecting 1 more data bytes, sending possibly incomplete MIDI message 0xaa
Here is the Arduino code:
C:
[CODE=c]#include <SPI.h>
//****C S O'Brien Arduino Controlled Tech Will Save Us Stutter Synth ************
//variables setup
byte incomingByte;
double note; // note read in from MIDI source
double freq; //desired note frequency
double Vctrl; // control voltage for pin 7 of 556 no longer used
double PulseWM;// pulse width modulation from 1 to 128 this is no longer used
double RW; // wiper resistance of digipot
double RA; // resistance of RA is 10,000K
int CS =10; // arduino pin for digipot control
int i=0; // value between 0 and 128 to control digipot wiper
byte velocity; // to determine whether it is note off or some other velocity value from MIDI source
int state=0; // State machine variable 0 = MIDI command 1 = Note 2 = velocity e.g. note off velocity = 0
int channel = 1; // Only reading from channel 1 to make things easier
//Setup
void setup() {
RA = 0;
pinMode(2,OUTPUT); // Pin 2 switches the voltage on and off
pinMode(CS, OUTPUT); // set output to CS from PIN 10
//Check if the DAC is still needed to smooth the input to the CS pin. ???? This has been removed from the circuit now.
state = 0; // state machine starts at 0
//start serial with MIDI baudrate 115200
// digitalWrite(2,HIGH);//****TEMP OFF***
Serial.begin(115200);
SPI.begin();
// digitalWrite(10, LOW);
// byte address = 0x00;
// SPI.transfer(0x00);
//SPI.transfer(0);
//digitalWrite(10, HIGH);
//turn off the output ready to begin
digitalWrite(2,LOW); //****TEMP OFF****
}
void loop () {
digitalWrite(10, LOW);
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
// digitalWrite(2,LOW); // clear any previous note just in case it is still on //****TEMP OFF****
switch (state){
case 0:
// look for MIDI channel 1, for relevant note on signal
if (incomingByte== (144 | channel)){
// next byte is the note
state = 1;
// Serial.print((int)incomingByte); //this would send an ASCII code corresponding to the MIDI note to the hairless MIDI bridge for debugging
}
if (incomingByte== (128 | channel)){
//Look for NOTE OFF No incoming byte of 128 in this particular midi file as it uses velocity = 0 instead
digitalWrite(2,LOW);
state = 1;
// Serial.print((int)incomingByte); //this should send an ASCII code corresponding to the MIDI note off to the hairless MIDI bridge for debugging - e.g. this
// is useful to see whether any NOTE OFFs are in the file
}
case 1:
// get the note to play or stop
if(incomingByte < 128) {
note=incomingByte;
// set the state to 2 if the note number is less than 128, e.g, it is an actual note to be played
//then set state to 2 get the velocity, e.g. check whether the note is meant to be on or off
state=2;
}
else{
state = 0; // state = 0 if the note number is on or above 128.
}
break;
//After the break go back to void loop and read in another byte, with case set to 0 or 2
case 2:
// get the velocity
if(incomingByte == 0){
//If a NOTE OFF has been received velocity = 0 then switch the note off. Otherwise, regardless of the velocity, play the note
digitalWrite(2,LOW);
}
else{
digitalWrite(2,HIGH);
freq = ((2^((int(note)-69)/12)*440));
RW = 1.44/(100E-9*freq)-2*100;
i = int((RW/10000)*128);
//if (i>128) {
// Serial.write(i);
// Serial.write(" ");
// state=0;
// }
// else
// {
SPI.transfer(0x00);
SPI.transfer(i);
//digitalWrite(2,HIGH);
digitalWrite(CS, HIGH);
Serial.write(i);
Serial.write(" ");
// }
// digitalPotWrite(i); // Old function no longer called
}
state = 0; // Back to start
}
}
}
int digitalPotWrite(int value)
{
}
Attachments
-
108.2 KB Views: 3