logoalt Hacker News

fwiptoday at 4:50 PM3 repliesview on HN

What's the value of modeling these as petri nets instead of a regular sequencer? I was expecting some sort of branching, or at least multiple tokens per ring, but I can't figure out how to set that up.

Also - is it just me, or is delivery weirdly off-beat sometimes? Like, isolating to just the kick drums in a standard 4-on-the-floor techno song, it has almost a disorienting amount of delay on some of the beats.


Replies

ericwoodtoday at 6:38 PM

Browsers intentionally add jitter to timing methods like setTimeout and setInterval to avoid fingerprinting and other side channel style attacks. When I've messed with building in-browser sequencers in the past you had to use a webworker with the clock that sends messages back to the main event loop, although I'm sure there's reasons that won't work these days either.

m_kostoday at 6:18 PM

> is it just me, or is delivery weirdly off-beat sometimes?

I played with it for a while and implementation is perhaps not the strongest aspect of this project.

embedding-shapetoday at 5:01 PM

> Also - is it just me, or is delivery weirdly off-beat sometimes?

Is just browser jank I think, with JS in browsers it is infamously hard to get the timing right and consistent, sequencing make this painfully obvious.

show 2 replies