View Single Post
Old 03-22-2018, 09:35 PM   #2
MSK
Human being with feelings
 
Join Date: Jan 2017
Posts: 43
Default

Hey MLN,

Glad you're getting into plugin development! The way I see it there are two things you need to implement:

First, you need a parameter that has dynamic minimum and maximum values. If you look at the class definition of IParam, located (for me) in /Frameworks and Libraries/WDL/IPlug/IParam.h, it doesn't look like you can change the minimum and maximum values. This means you'll have to do it yourself. There's a number of ways you could do it, some ideas that come to mind are:

- Change IParam's implementation to allow dynamic min/max values. (Probably hard)
- Make you own parameter class by inheriting from IParam. (Also probably hard)
- Set the absolute min/max parameter values and handle the logic yourself. (Maybe easier)

If I were doing this, the last way is probably what I would try first. I'd probably make a new class - something like DynamicParam - that had the parameter as a member, and then handle parameter changes/scaling through that class. If you're just starting with WDL/C++ that might not make much sense, I'd be happy to go into more detail or make an example for ya if it doesn't.

Second, you need an editable text box. It looks like ICaptionControl would be something to build off of, but I haven't really played with that control. A while back I made an editable text box using Cairo in Youlean's branch. I'd be happy to dig it up if you're interested. Building your own would definitely be a great exercise in learning C++ and this framework, but it might be tricky, especially if you don't have much experience with programming in general - you'll have to handle drawing, mouse clicks, input validation and then connect the text box to the parameter!

Let me know if you want any more info/examples, and welcome to the community!

Cheers,
Max
MSK is offline   Reply With Quote