 }
 
 
+#define CV_FREQUENCY 74
+#define CV_RESONANCE 71
+#define CV_AMP_ATTACK 73
+#define CV_AMP_DECAY 9
+#define CV_AMP_SUSTAIN 12
+#define CV_AMP_RELEASE 72
+
+int quad_freq_val = 0;
+int quad_res_val = 0;
+
+void midi_cv(int type, int cv, int value){
+  if(cv == CV_FREQUENCY){
+    quad_freq_val = value*10;
+
+    biquad1.setLowpass(0, quad_freq_val, quad_res_val);
+    Serial.print("setting biquad1 lowpass(0,");
+    Serial.print(quad_freq_val);
+    Serial.print(",");
+    Serial.print(quad_res_val);
+    Serial.print(")\n");
+  }
+  if(cv == CV_RESONANCE){
+
+    quad_res_val = 0.99/(float)value;
+
+    biquad1.setLowpass(0, quad_freq_val, quad_res_val);
+    Serial.print("setting biquad1 lowpass(0,");
+    Serial.print(quad_freq_val);
+    Serial.print(",");
+    Serial.print(quad_res_val);
+    Serial.print(")\n");
+  }
+
+
+}
+
 
 
 void midi_input() {

        Serial.println(String("Note Off: ch=") + channel + ", note=" + note + ", velocity=" + velocity);
        break;
    default:
        d1 = MIDI.getData1();
        d2 = MIDI.getData2();
        Serial.println(String("Message, type=") + type + ", data = " + d1 + " " + d2);
    }
    t = millis();

      case NoteOn:
        note = MIDI.getData1();
	synth_note_on(note);
        velocity = MIDI.getData2();
        channel = MIDI.getChannel();
        if (velocity > 0) {
