Add canvas-local bendin and zoom flags.
This adds canvas member variables and corresponding options for the declare
object, so that the global (user) zoom and legacy bendin flags can be enabled and disabled separately for each canvas.
This was proposed (and deferred) earlier in !561 (closed) (which see for the previous discussion and rationale), but the original branch seems to be gone, so I've rebased it on the current master and pushed it again.
Jonathan, I really hate to revive this old MR which we discussed at length already. But we're 6 months on, we don't have author-centric zoom yet, and I'm still facing the same issue that prompted me to create this MR in the first place. As long as we don't have author-centric zoom yet, can we at least implement this as a stop-gap solution, please?
Merge request reports
Activity
added feature label
I should add that I'm mostly interested in
declare -zoom
, but I included thedeclare -bendin
option in the original MR and I still think that it may be useful, so I didn't remove it.Also, I readily admit that this is a kludge. I'd rather have author-centric zoom, but as long as that isn't implemented, I just need some way to fix up up the demonstration patches for my students so that they are displayed at the right zoom level, no matter what they have set in their GUI prefs.
Also, please consider that this feature is not really advertised at all, I hid it away from the end user as well as I could. ;-) I don't know whether that helps my cause? Anyway, if all else fails, I can just hand this out as a special "teacher and student" edition to my own students, or to colleagues who are facing the same problem. It's not ideal since I'll have to keep maintaining this as a special branch on my own for the time being, but workable.
That should work exactly the same in Pd Vanilla as it does in Purr Data.
Yes, I know that because I implemented that (rev. 4a4cf4f6). ;-) So let's not go down that rabbit hole again; as I said, I don't really care about
declare -bendin
(even though it's likely more convenient than having to edit all thebendin
objects in a patch). So let's just assume that I removed that, leaving justdeclare -zoom
. Would that make this MR any more acceptable to you?This is getting off-topic, but as an aside and maybe an interesting bit of trivia which probably isn't documented anywhere... I was actually the guy who first noticed the botched bendin range and told Miller about it over a "Kölsch" at the famous "Mühle" brewery/pub when we both attended LAC 2008 at Cologne (Miller was the keynote speaker at the conference). But then I forgot to follow up on it with a bug report after the conference, and when I finally submitted that bug report some 8 years later, Miller told me that it was too late to fix it now. Which still makes me sad, because this could have all been solved back then if I filed that bug report back in 2008. Anyway, I had already been using pd-l2ork since ca. 2013, so I also reported the issue to Ico who promptly corrected this bug in pd-l2ork (from where you backported the fix in 2016, IIRC).
The funny thing is, I still vividly remember that night at the "Mühle" in Cologne as if it was yesterday, while the entire past year of lockdowns and remote teaching is just a blur for me. I think that Miller introduced me to Claude Heiland-Allen (the genius Pd student who created pd-lua) there, or maybe it was one of the other brash young computer music students in the Pd community at the time. In any case, that was a great conference... And we probably wouldn't have all the bendin fixes, as well as Purr's pd-lua external, if it wasn't for that conference. ;-)
Edited by Albert GräfWhich still makes me sad, because this could have all been solved back then if I filed that bug report back in 2008.
The history of the Pd Vanilla bug tracker does not support that assertion.
Ok, after that quick detour down memory lane: What about the MR, will you accept it if I remove
declare -bendin
?Ok, yeah. Since we still don't have the patch zooming yet I guess that's a reasonable compromise.
Ok, there you go. Removed
declare -bendin
and rolled the rest into a single commit which can easily be reverted if there's a reason to do so.This is as unobtrusive as I can make it. Normal users don't need to know or mess with
declare -zoom
, and in that case the zoom logic will work exactly as before. If the option is used, it deals with all the corner cases (declare -zoom
in a subpatch) in an efficient way (there's some clever bit of lazy zoom level evaluation going on under the hood to make those corner cases work correctly). I've tested this to death already, so I know that this works as advertised. :) Ready to be merged!I've tested this to death already, so I know that this works as advertised.
Famous last words. I found a bug. :( Hopefully it's nothing serious, might be due to the refactoring I did when I eliminated the -bendin flag. So not so ready after all, I first need to look into this before it can be merged. Hopefully I'll find some time over the Easter holidays...
Found and fixed it. The problem was that the initial zoom level was reset by
declare -zoom 1
if zoom save/restore was enabled globally; it's only supposed to do that withdeclare -zoom 0
. Seems like I never tested that specific case previously. Oh well. :) But now it works correctly with bothdeclare -zoom 0
anddeclare -zoom 1
, no matter whether zoom save/restore is enabled globally or not.mentioned in merge request !731 (merged)