setType(type) {
    this.oscillator.type = type;
  }
Set type to 'sine', 'triangle', 'sawtooth' or 'square'.

 @method  setType
 @for p5.Oscillator
 @param {String} type 'sine', 'triangle', 'sawtooth' or 'square'.