home


This is a trimmed down version of the hard soft synth 1. The hss1 used 2 arduinos, one for sequencing and one for audio. This version has both the sequencer and the audio in one arduino, reducing the number of parts allot.

The user manuals and scripts can be found here.

There are some HSS2s for sale in my shop.

If you build one yourself, send me a picture, i would like to see it.

Links to useful information about this kind of stuff.

A example version of the script is shown below.
 
// Hard Soft Synth V2 example version
// this version is almost empty so you can easily see how it works and fill in the gaps 
// Gijs Gieskes
// http://gieskes.nl

//audio out variable
byte S1out;

//lookup tables
float sinC[3][16] = {
                    {0.5, 0.656, 0.787, 0.873, 0.9, 0.864, 0.77, 0.634, 0.477, 0.323, 0.197, 0.119, 0.102, 0.147, 0.247, 0.388},  //sinus
                    {0.5, 0.557, 0.614, 0.672, 0.729, 0.786, 0.843, 0.9, 0.057, 0.114, 0.172, 0.229, 0.286, 0.343, 0.4, 0.458},   //saw
                    {0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1}  //sqw
                    };

void setup() {
  analogReference(INTERNAL);
  
  //audio output
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
  
  //buttons pins
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(6, INPUT);
  digitalWrite(2, HIGH);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  digitalWrite(5, HIGH);
  digitalWrite(6, HIGH);
  
  Serial.begin(9600);
}

void loop(){

  //Synth 2 (Sine Wave)
  if(digitalRead(2) == LOW){
      
    //walk thrue wave form with for loop
    for(int i=0; i<16; i++){
      S1out = sinC[0][i]*64;                //convert selected frame to 6 bit output
      aWrite(S1out);                        //write to 6 bit output
      delayMicroseconds(analogRead(1)+1);   //use a delay to set the pitch (the +1 is there so there will be no 0 delay).
    }
    
  //Synth 3 (Saw)
  }else if(digitalRead(3) == LOW){
    
    for(int i=0; i<16; i++){
      S1out = sinC[1][i]*64;   
      aWrite(S1out); 
      delayMicroseconds(analogRead(1)+1);
    }
    
  //Synth 4 (Square)
  }else if(digitalRead(4) == LOW){  
    
    for(int i=0; i<16; i++){
      S1out = sinC[2][i]*64;
      aWrite(S1out);
      delayMicroseconds(analogRead(1)+1);
    }
    
  //Synth 5 (noise)
  }else if(digitalRead(5) == LOW){
    
    S1out = random(64);                  //noise is like a random signal..
    aWrite(S1out);
    delayMicroseconds(analogRead(1)+1);
    
  //Synth 6 (Sample and hold)
  }else if(digitalRead(6) == LOW){
    
    S1out = analogRead(4)/16;            //convert the incoming audio to 6 bit.
    aWrite(S1out);
    delayMicroseconds(analogRead(1)+1);
    
  }
  
}

//output to audio
void aWrite(byte i){
  PORTB = PORTB & B000000;
  PORTB = PORTB | i;
}


HSS2c
HSS2d
HSS2e
HSS2a

Copy "ilovegijs" here: (it stops spam bots)
Put your here:
1977 B.C. till 2010 © Gijs Gieskes - about