I’ve never been entirely happy with the
xypad in Cabbage (as @hdale94 knows only too well!). It harks back to a different time. I think it looks great, but it’s always been tricky to maintain. So I thought it was time I tried rebuilding it using nothing but basic Cabbage widgets and the new Cabbage opcodes. Here’s the result.
Some things to note.
- It works through a UDO that manages the components, and returns normalised x and y values.
- You only only need to declare an image with the channel “xypad” in the Cabbage section. This sets the size and position for all components. All other components are created dynamically.
- The performance is almost comparable to the native xypad, if you don’t go over the top on the UI (which I obviously did with the trailing path - even still, it’s not that bad)
- I tried doing the vertical and horizontal axis lines with a png image, it looked great but the performance was absolutely horrible. Now it is using two image widgets instead.
- I’m using two
nsliderfor the labels, with an image placed on top to make them readonly. I used slider rather than labels so that you can access the parameters in a host DAW.
I also did some experiments with making the ball change size as it moves, adding wobbly movements, using sin/cos to add interesting curves to the ball’s path. It offer a huge amount of customisation over the standard XY pad, but in many cases it’s probably overkill! But a nice experiment all the same
CustomXYPad.csd (8.4 KB)