fix: highlighting sync

This commit is contained in:
Felix Roos
2022-11-10 17:15:10 +01:00
parent c7c90b0647
commit 372bdf8be7
10 changed files with 347 additions and 335 deletions
+5 -3
View File
@@ -35,8 +35,10 @@ currently broken / buggy:
- [ ] pending flag
- [ ] web midi
- [ ] draw / pianoroll
- [ ] pause does stop
- [x] pause does stop
- [ ] pause then play logs "TOO LATE" and drops some events
- [x] random button triggers start
- [?] highlighting seems too late (off by latency ?)
- [ ] unexpected ast format without body expression (kalimba)
- [ ] highlighting sometimes drops highlights (zeldasRescue first note)
- [x] highlighting seems too late (off by latency ?)
- [x] highlighting sometimes drops highlights (zeldasRescue first note)
- [ ] highlighting still sometimes drops highlights (zeldasRescue somtimes)
+6 -2
View File
@@ -146,7 +146,7 @@ function App() {
view,
pattern,
active: started && !activeCode?.includes('strudel disable-highlighting'),
getTime: () => scheduler.phase,
getTime: () => scheduler.getPhase(),
// getTime: () => Tone.getTransport().seconds,
});
@@ -312,7 +312,11 @@ function App() {
{/* onCursor={markParens} */}
<CodeMirror value={code} onChange={setCode} onViewChanged={setView} />
<span className="z-[20] bg-black rounded-t-md py-1 px-2 fixed bottom-0 right-1 text-xs whitespace-pre text-right pointer-events-none">
{!started ? `press ctrl+enter to play\n` : isDirty ? `press ctrl+enter to update\n` : 'press ctrl+dot do stop\n'}
{!started
? `press ctrl+enter to play\n`
: isDirty
? `press ctrl+enter to update\n`
: 'press ctrl+dot do stop\n'}
</span>
{error && (
<div
-1
View File
@@ -308,7 +308,6 @@ export const blippyRhodes = `samples({
}
}, 'https://loophole-letters.vercel.app/')
const bass = synth(osc('sawtooth8')).chain(vol(.5),out())
const scales = cat('C major', 'C mixolydian', 'F lydian', ['F minor', cat('Db major','Db mixolydian')])
stack(