Zoomable objects

Apr 13, 2009 at 4:04am

Zoomable objects

Been messing around a bit with the patching_rect command to multiple objects, and put together this simple set of 8 zoomable waveform~ objects. Pretty straightforward once I realized that I’d only need to determine the range of zoom (figure out all the sizes and positions at full zoom in and out), store those as two pattrstorage slots, then interpolate. Wasn’t sure how well it would work but I’m very happy with it!

Hopefully this will give ideas for people to create patches with this functionality if it helps the UI, especially with objects you sometimes want to see a lot of at once, but other times have them big for more detailed interaction…thinking waveform~, bpfunction, itable, multislider. I’d be interested in seeing other people’s experiments with this.

You need to save the xml file to get the settings I stored, for the zoom slider to work as designed. You can manually create some of your own settings too—it’s a bit laborious at first, but when you get a range you like, pattrstorage will do the dirty work for you. Check out the “zoom settings” subpatch to do this.

[edit: one small glitch fixed, several other settings added.]

#43341
Apr 13, 2009 at 3:50pm

This probably have to do with rounding. You might want to use floating points as coordinates for the patching_rect attribute. One other simple thing that might be visually enough though would be to put a panel object behind with the color of your waveform~’s border, so you don’t see the background.

Cheers,

#155467

You must be logged in to reply to this topic.