CSE 471 - Project 1 - Additive Synthesizer

Sample xml code

<?xml version="1.0" encoding="utf-8"?>
<score bpm="60" beatspermeasure="4">
   <instrument instrument="Additive">
      <note measure="1" beat="1" duration="1.9" note="C4" harmonics="1 0 0.4 0 0.2 0 0.1 0 0.05" />
      <note measure="1" beat="3" duration="1.9" note="G4" attack="0.05" decay = "0.05" release="0.05"/>
      <note measure="2" beat="1" duration="3.7" note="C5"/>
      <note measure="2" beat="4" duration="0.5" note="C4" vibratoFreq="3" vibratoAmp="10"/>       <note measure="2" beat="4" duration="0.5" note="E4" vibratoFreq="3" vibratoAmp="10"/>       <note measure="2" beat="4" duration="0.5" note="G4"/>    </instrument> </score>

Elements

Sinusoid playback on demand from the sequencer
Definition of all harmonics - The set of amplitudes is specified (as a string of numbers) by attribute harmonics of the node
Envelope generation - Create a class CADSR to handle envelope generation. Attack, decay, release duration are specified in coresponding attributes
Polyphony - Start and stop more than one note at the same time
Vibrato - Vibrato frequency and the frequency change amplitude are specified in vibratoFreq and vibratoAmp

Demonstration

Score file: additiveSample.score
Wave file: additiveSample.wav