add setcps to global scope

This commit is contained in:
Felix Roos 2023-02-28 23:56:11 +01:00
parent 86d2652258
commit 1f7e293204
2 changed files with 10 additions and 4 deletions

View file

@ -32,7 +32,7 @@ function useStrudel({
const shouldPaint = useCallback((pat) => !!(pat?.context?.onPaint && drawContext), [drawContext]);
// TODO: make sure this hook reruns when scheduler.started changes
const { scheduler, evaluate, start, stop, pause } = useMemo(
const { scheduler, evaluate, start, stop, pause, setCps } = useMemo(
() =>
repl({
interval,
@ -153,6 +153,7 @@ function useStrudel({
stop,
pause,
togglePlay,
setCps,
};
}