JSFiddle - React, Tailwind, and code Playground

by SoftwareEngineer171

JavaScript

var app = {
	context: new (window.AudioContext || window.webkitAudioContext)(),
  gainNode: null,
  oscillator: null,
  init(){
  	this.gainNode = this.context.createGain(), 
    this.oscillator = this.context.createOscillator();
    
    this.gainNode.connect(this.context.destination);
    this.oscillator.frequency.value = 440;
    this.oscillator.connect(this.gainNode);
    this.oscillator.start();
  }
};

app.init();