function Pulse(freq, w) {
    var _this;
    pulse_classCallCheck(this, Pulse);
    _this = _super.call(this, freq, 'sawtooth');

    _this.w = w || 0;

    _this.osc2 = new SawOsc(freq);

    _this.dNode = main.audiocontext.createDelay();

    _this.dcOffset = createDCOffset();
    _this.dcGain = main.audiocontext.createGain();
    _this.dcOffset.connect(_this.dcGain);
    _this.dcGain.connect(_this.output);
    _this.f = freq || 440;
    var mW = _this.w / _this.oscillator.frequency.value;
    _this.dNode.delayTime.value = mW;
    _this.dcGain.gain.value = 1.7 * (0.5 - _this.w);

    _this.osc2.disconnect();
    _this.osc2.panner.disconnect();
    _this.osc2.amp(-1); 
    _this.osc2.output.connect(_this.dNode);
    _this.dNode.connect(_this.output);
    _this.output.gain.value = 1;
    _this.output.connect(_this.panner);
    return _this;
  }
Creates a Pulse object, an oscillator that implements
 Pulse Width Modulation.
 The pulse is created with two oscillators.
 Accepts a parameter for frequency, and to set the
 width between the pulses. See <a href="
 http://p5js.org/reference/#/p5.Oscillator">
 <code>p5.Oscillator</code> for a full list of methods.

 @class p5.Pulse
 @extends p5.Oscillator
 @constructor
 @param {Number} [freq] Frequency in oscillations per second (Hz)
 @param {Number} [w]    Width between the pulses (0 to 1.0,
                        defaults to 0)
 @example
 <div><code>
 let pulse;
 function setup() {
   let cnv = createCanvas(100, 100);
   cnv.mousePressed(startPulse);
   background(220);

   pulse = new p5.Pulse();
   pulse.amp(0.5);
   pulse.freq(220);
 }
 function startPulse() {
   pulse.start();
   pulse.amp(0.5, 0.02);
 }
 function mouseReleased() {
   pulse.amp(0, 0.2);
 }
 function draw() {
   background(220);
   text('tap to play', 5, 20, width - 20);
   let w = map(mouseX, 0, width, 0, 1);
   w = constrain(w, 0, 1);
   pulse.width(w);
   text('pulse width: ' + w, 5, height - 20);
 }
 </code></div>