I wouldn’t be too worried about it. Especially if you are working on a desktop.
LFO on GUI Parameters
I was thinking when exporting to .vst, trying to wrap my head around optimizing the code
So I was wondering if it’s possible to update the X and/or Y range of a xy-pad?
Something like this?
chnset "rangex(-12, 12, 0)", "XY-pad"
I can’t seem to get it to work
(“XY-pad” being the identchannel)
Basically, I am trying to change the range when a combobox has selected a item, so that pitch can go from -12 to 12 instead of 0 to 1 which I normally have the xy-pad set to.
Not if you use the xypad widget that comes with Cabbage. You can’t change the ranges of any plugin parameters on the fly. Hosts don’t support that. On the other hand, if you roll your own you could get away with it, but the parameters would no longer be automatable from a host.
Okey, do you have any suggestion to how I could solve this through scaling the number to 0-1 instead?
-12 = 0, 0 = 0.5, 12 = 1
If for example kRange
goes from -12 to 12, then something like this will scale it to 0, 1:
kNormalised = (kRange+12)/24
Right?
Yep Trying to implement it now.
Okey so I am a little stuck. The ball in the xy-pad gets stuck when I try to change the parameter with a normalized one. Do you have any time to look at the code?
I’m only on my phone right now, but are you trying to change the range? You can’t do that…?
No rush. Watching a movie at the moment, will upload a gif and demonstrate when I’m done
Also am having a problem with the ball jumping back and forth as you can see
Yep, will need to go through the code. It has gotten quite complex
Might be time for a rewrite
Yep…
I’m considering making the code shorter by using user-made opcodes
If you can, stick to D.R.Y (don’t repeat yourself). UDOs are great for this. They can help to organise things really well and save a lot of work.