message: optimizing basic waveform case
diff: @@ -110,7 +110,11 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/source/Source", "Tone/core
  Tone.Oscillator.prototype._start = function(time){
  //new oscillator with previous values
  this._oscillator = this.context.createOscillator();
  + if (this._wave){
  this._oscillator.setPeriodicWave(this._wave);
  + } else {
  + this._oscillator.type = this._type;
  + }
  //connect the control signal to the oscillator frequency & detune
  this._oscillator.connect(this.output);
  this.frequency.connect(this._oscillator.frequency);
  @@ -189,12 +193,21 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/source/Source", "Tone/core
  return this._type;
  },
  set : function(type){
  + var isBasicType = [Tone.Oscillator.Type.Sine, Tone.Oscillator.Type.Square, Tone.Oscillator.Type.Triangle, Tone.Oscillator.Type.Sawtooth].includes(type);
  + if (this._phase === 0 && isBasicType){
  + this._wave = null;
  + //just go with the basic approach
  + if (this._oscillator !== null){
  + this._oscillator.type === type;
  + }
  + } else {
  var coefs = this._getRealImaginary(type, this._phase);
  var periodicWave = this.context.createPeriodicWave(coefs[0], coefs[1]);
  this._wave = periodicWave;
  if (this._oscillator !== null){
  this._oscillator.setPeriodicWave(this._wave);
  }
  + }
  this._type = type;
  }
  });
  