mirror of
https://codeberg.org/uzu/strudel
synced 2026-08-03 22:08:50 -04:00
sync highlighting with tone draw
This commit is contained in:
+2
-1
@@ -11,7 +11,7 @@ let s4 = () => {
|
||||
.substring(1);
|
||||
};
|
||||
|
||||
function useRepl({ tune, defaultSynth, autolink = true, onEvent }: any) {
|
||||
function useRepl({ tune, defaultSynth, autolink = true, onEvent, onDraw }: any) {
|
||||
const id = useMemo(() => s4(), []);
|
||||
const [code, setCode] = useState<string>(tune);
|
||||
const [activeCode, setActiveCode] = useState<string>();
|
||||
@@ -52,6 +52,7 @@ function useRepl({ tune, defaultSynth, autolink = true, onEvent }: any) {
|
||||
};
|
||||
// cycle hook to control scheduling
|
||||
const cycle = useCycle({
|
||||
onDraw,
|
||||
onEvent: useCallback(
|
||||
(time, event) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user