|
|
@ -18,7 +18,10 @@ const setRotationRamp = (panner, angle, rampTime) => { |
|
|
|
panner.positionZ.rampTo(-Math.cos(angle), rampTime); |
|
|
|
}; |
|
|
|
|
|
|
|
var offCooldown = true; |
|
|
|
|
|
|
|
export function playTabEarconSonification() { |
|
|
|
if (offCooldown) { |
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
}, "4n"); |
|
|
@ -27,9 +30,15 @@ export function playTabEarconSonification() { |
|
|
|
drumSynth.context.resume(); |
|
|
|
Tone.Transport.start(); |
|
|
|
pushToSonificationLog("tab_earcon"); |
|
|
|
offCooldown = false; |
|
|
|
setTimeout(() => { |
|
|
|
offCooldown = true; |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export function playTabModelSonification() { |
|
|
|
if (offCooldown) { |
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
}, "4n"); |
|
|
@ -38,9 +47,15 @@ export function playTabModelSonification() { |
|
|
|
drumSynth.context.resume(); |
|
|
|
Tone.Transport.start(); |
|
|
|
pushToSonificationLog("tab_model"); |
|
|
|
offCooldown = false; |
|
|
|
setTimeout(() => { |
|
|
|
offCooldown = true; |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export function playDetailEarconSonification() { |
|
|
|
export function playDetailEarconSonification(textDensity, linkDensity) { |
|
|
|
if (offCooldown) { |
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
}, "4n"); |
|
|
@ -49,9 +64,15 @@ export function playDetailEarconSonification() { |
|
|
|
drumSynth.context.resume(); |
|
|
|
Tone.Transport.start(); |
|
|
|
pushToSonificationLog("detail_earcon"); |
|
|
|
offCooldown = false; |
|
|
|
setTimeout(() => { |
|
|
|
offCooldown = true; |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export function playDetailModelSonification() { |
|
|
|
export function playDetailModelSonification(textDensity, linkDensity) { |
|
|
|
if (offCooldown) { |
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
}, "4n"); |
|
|
@ -60,4 +81,9 @@ export function playDetailModelSonification() { |
|
|
|
drumSynth.context.resume(); |
|
|
|
Tone.Transport.start(); |
|
|
|
pushToSonificationLog("detail_model"); |
|
|
|
offCooldown = false; |
|
|
|
setTimeout(() => { |
|
|
|
offCooldown = true; |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |