Hi, I found two annoying bugs in nui, which I can't fix by myself. To reproduce them, I modified a bit the vstplugin example: http://www.ckmedia.pl/~fev/nuingl/test.zip (source code included).
Problem 1. : This one is a host specific thing. For now I've checked several hosts (Logic, EnergyXT, Cubase SX1, Bidule, Audition, Chainer and Ableton Live 5 Beta), and the problem exists only in the last two of them. But what is the problem You ask? Well it's really hard to explain, so it's better to download chainer demo ( http://www.xlutop.com/ ) and see for yourself. Basicly odd thing happen when plugin editor is opened. For example try to open my example plugin, and open chainer generic plugin editor, and plugin custom editor. Now try to move a knob, and you will notice how chainer editor is flickering. You can get more drastic effect when you open plugin editor, and cover the chainer window with some other window (windows explorer, for example). Now tweak the knob, and the whole chainer window will be flickering like hell (even though it should be below explorer window). Basicly the same thing happens in Live. Dunno if it's not the host fault, but when I switched nuiRenderer to software mode, the problem went away (although editor looked like crap). Also when two plugin editors are opened (two plugin instances loaded) the problem is gone. I "connected" the knob with effect parameter using ValueChanged event (look at the source code for a implementation). Problem 2. : To reduce CPU usage a bit I decided to reduce the editor frame rate to 60fps. Unfortunately it has the side effect, that the widgets in editor may not represent the actual values. The easiest way to observe this in my example plugin is by using pitchbend controller (it should automate the knob). In most midi controllers the pitchbend wheel, when moved and then released, returns to it's middle position very fast. Now if you try to move the wheel to it's extreme position, and release it, the knob should also return to it's middle position. But sometimes it doesnt. The internal effect parameter has the right value, but the knob doesn't represent that value :-/ When FPS limit is not set, the problem doesn't appear. Any ideas on how to fix these two "guys"? Maybe I should "connect" parameters to widgets in some other way? Help :-) cheers, Bart