Merge pull request #1004 from tidalcycles/worker-repl
eliminate chromium clock jitter
This commit is contained in:
commit
31067d5cb5
9 changed files with 498 additions and 51 deletions
|
|
@ -260,7 +260,7 @@ export function resetGlobalEffects() {
|
|||
analysersData = {};
|
||||
}
|
||||
|
||||
export const superdough = async (value, deadline, hapDuration) => {
|
||||
export const superdough = async (value, t, hapDuration) => {
|
||||
const ac = getAudioContext();
|
||||
if (typeof value !== 'object') {
|
||||
throw new Error(
|
||||
|
|
@ -272,7 +272,7 @@ export const superdough = async (value, deadline, hapDuration) => {
|
|||
// duration is passed as value too..
|
||||
value.duration = hapDuration;
|
||||
// calculate absolute time
|
||||
let t = ac.currentTime + deadline;
|
||||
t = typeof t === 'string' && t.startsWith('=') ? Number(t.slice(1)) : ac.currentTime + t;
|
||||
// destructure
|
||||
let {
|
||||
s = 'triangle',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue