Key sounds
This commit is contained in:
1 parent
2a3867d01b
commit
6dab8504fe
3 files changed
+17
-4
No files matched your search
@@ -11,6 +11,14 @@ export function createOsc() {
|
||||
return osc;
|
||||
}
|
||||
|
||||
export function playTickSound() {
|
||||
const osc = createOsc();
|
||||
osc.frequency.setValueAtTime(440, audio.currentTime);
|
||||
osc.frequency.setValueAtTime(0, audio.currentTime + 0.005);
|
||||
osc.start();
|
||||
osc.stop(audio.currentTime + 0.005);
|
||||
}
|
||||
|
||||
function clickInit() {
|
||||
const osc = createOsc();
|
||||
osc.start();
|
||||
|
||||
Reference in new issue
Block a user