Captain's Log: Stardate 77861.2

I've gotten a few small things done, like adding the ability to set the global tempo (for synced LFOs, etc) when running in standalone mode, and adding dotted notes for LFOs, etc.

But the most interesting thing today was that the fuzz test I added a couple weeks ago for copying and pasting detected an extremely subtle bug, which I've fixed.

Basically the bug had to do with links that linked to other links. That's a mouthful, but basically this is the support for having a Modulator linked to a spring so that you can e.g. modulate spring stiffness. Because of this feature, there is general support for links to links. This is only allowed to be a single layer deep, which reduces a bunch of problems that would require recursive/graph algorithms to just simple two-pass algorithms.

Anyway, pasting has special logic for links. If you copy only a link, pasting it doesn't do anything, because what would it do? The two entities the link connects are already connected. But if you copy a link and one of the entities it connects to, that is meaningful. And something else happens if both of the connected entities are copied. This sounds complicated, but when you use it, everything just works in a way that makes sense.

So, copying a link to a link caused grief because to make this logic work in two passes (instead of recursion), the copied links have to be listed in the order [links-to-entities, links-to-links], in order for the regular links to be materialized before the links that refer to them. This wasn't happening.

There's basically zero chance I would have ever caught this without the fuzz test.


© 2024 Anukari LLC, All Rights Reserved
Contact Us|Legal