function Envelope(context, settings) {
	    _classCallCheck(this, Envelope);

	    // Hold on to these
	    this.context = context;
	    this.settings = settings;

	    this._setDefaults();

	    // Create nodes
	    this.source = this._getOnesBufferSource();
	    this.attackDecayNode = context.createGain();
	    this.releaseNode = context.createGain();
	    this.ampNode = context.createGain();
	    this.outputNode = context.createGain();

	    this.outputNode.gain.value = this.settings.startLevel;
	    this.ampNode.gain.value = this.settings.maxLevel - this.settings.startLevel;

	    // Set up graph
	    this.source.connect(this.attackDecayNode);
	    this.source.connect(this.outputNode);
	    this.attackDecayNode.connect(this.releaseNode);
	    this.releaseNode.connect(this.ampNode);
	    this.ampNode.connect(this.outputNode.gain);
	  }
Create an envelope generator that
can be attached to an AudioParam