Merge pull request #1272 from tidalcycles/fix-sf2-timing

Fix sf2 timing
This commit is contained in:
Felix Roos 2025-02-01 22:57:00 +01:00 committed by GitHub
commit 0338c5b222
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -375,6 +375,7 @@ export function resetGlobalEffects() {
}
export const superdough = async (value, t, hapDuration) => {
const ac = getAudioContext();
t = typeof t === 'string' && t.startsWith('=') ? Number(t.slice(1)) : ac.currentTime + t;
let { stretch } = value;
if (stretch != null) {
@ -382,7 +383,6 @@ export const superdough = async (value, t, hapDuration) => {
const latency = 0.04;
t = t - latency;
}
const ac = getAudioContext();
if (typeof value !== 'object') {
throw new Error(
`expected hap.value to be an object, but got "${value}". Hint: append .note() or .s() to the end`,