|
@ -18,46 +18,72 @@ const setRotationRamp = (panner, angle, rampTime) => { |
|
|
panner.positionZ.rampTo(-Math.cos(angle), rampTime); |
|
|
panner.positionZ.rampTo(-Math.cos(angle), rampTime); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var offCooldown = true; |
|
|
|
|
|
|
|
|
export function playTabEarconSonification() { |
|
|
export function playTabEarconSonification() { |
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("tab_earcon"); |
|
|
|
|
|
|
|
|
if (offCooldown) { |
|
|
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("tab_earcon"); |
|
|
|
|
|
offCooldown = false; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
offCooldown = true; |
|
|
|
|
|
}, 500); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function playTabModelSonification() { |
|
|
export function playTabModelSonification() { |
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("tab_model"); |
|
|
|
|
|
|
|
|
if (offCooldown) { |
|
|
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("tab_model"); |
|
|
|
|
|
offCooldown = false; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
offCooldown = true; |
|
|
|
|
|
}, 500); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function playDetailEarconSonification() { |
|
|
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("detail_earcon"); |
|
|
|
|
|
|
|
|
export function playDetailEarconSonification(textDensity, linkDensity) { |
|
|
|
|
|
if (offCooldown) { |
|
|
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("detail_earcon"); |
|
|
|
|
|
offCooldown = false; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
offCooldown = true; |
|
|
|
|
|
}, 500); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export function playDetailModelSonification() { |
|
|
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("detail_model"); |
|
|
|
|
|
|
|
|
export function playDetailModelSonification(textDensity, linkDensity) { |
|
|
|
|
|
if (offCooldown) { |
|
|
|
|
|
var loop = new Tone.Loop((time) => { |
|
|
|
|
|
drumSynth.triggerAttackRelease("C3", "4n", time); |
|
|
|
|
|
}, "4n"); |
|
|
|
|
|
loop.iterations = 2; |
|
|
|
|
|
loop.start(); |
|
|
|
|
|
drumSynth.context.resume(); |
|
|
|
|
|
Tone.Transport.start(); |
|
|
|
|
|
pushToSonificationLog("detail_model"); |
|
|
|
|
|
offCooldown = false; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
offCooldown = true; |
|
|
|
|
|
}, 500); |
|
|
|
|
|
} |
|
|
} |
|
|
} |