wip - work on arp in progress

This commit is contained in:
2023-10-01 23:44:37 -07:00
parent bf35d04f7f
commit c469d51403
2 changed files with 13 additions and 0 deletions

View File

@@ -130,4 +130,16 @@ window.onload = function () {
osc.stop();
osc = null;
});
document.getElementById("arp").addEventListener("click", () => {
const notes = ["C", "D", "E", "F", "G", "A", "B"];
for (let i = 0; i < notes.length; i++) {
setTimeout(2000);
console.log(notes[i]);
osc.frequency.setValueAtTime(
noteToHz(notes[i]),
audioContext.currentTime
);
}
});
};