more work
This commit is contained in:
@@ -57,10 +57,19 @@ class Synth {
|
||||
let globalAudioContext = new AudioContext();
|
||||
let synth = new Synth(globalAudioContext);
|
||||
|
||||
function toggleOscillator() {
|
||||
synth.toggleOsc();
|
||||
}
|
||||
window.onload = function() {
|
||||
console.log("hello world!");
|
||||
console.log(synth);
|
||||
|
||||
var selectedWaveType = document.querySelector("input[name='wave']");
|
||||
selectedWaveType.addEventListener("change", () => {
|
||||
let selectedWaveTypeValue = document.querySelector("input[name='wave']:checked").value;
|
||||
console.log("the value of the wave has changed to" + selectedWaveTypeValue);
|
||||
synth.setOscWaveType(selectedWaveTypeValue);
|
||||
})
|
||||
var detune = document.getElementById("detune");
|
||||
detune.addEventListener("input", () => {
|
||||
synth.setOscDetune(parseFloat(detune.value))
|
||||
|
||||
Reference in New Issue
Block a user