|
|||
Hia peeps,
Okay, so my VST plug-in works fine, but now it's time to make it looks snazzy. The plug-in is coded in XCode (using VST2.4 sdk), and I'm trying to use VST GUI 4 to implement my custom view. The VST SDK has a "getting started" section as well as an XCode tutorial project that I followed very closely to build up just a basic view to start off with. But this is what I'm getting (after building the plug-in and bringing it up in Audacity for the first time):
If I close Audacity, open it up and bring up the plug-in again, I get a gigantic, blank window that takes up half my screen; and this is within the same build of the plug-in -- no code is changed, just reopening the host and selecting the plug-in. When I get the small window with the knobs under the buttons, I can move them around and it works as expected, but something is completely off with the view obviously. It seems the window isn't scaling to the view size I specify with CFrame. I've racked my brain over this and can't see what I'm doing wrong. Anyone have any insight into this? It seems like such a basic thing to get VST GUI up and running with a simple view, but I just can't get it working properly. Maybe I'm missing an important Framework (the tutorial has Accelerate, Carbon, Cocoa), or build setting, ...? Inside my plug-in constructor I have: // set editor for plug-in GUI extern AEffGUIEditor* createEditor (AudioEffectX*); setEditor (createEditor (this)); Then, inside the editor .cpp file: AEffGUIEditor* createEditor (AudioEffectX* effect) { return new RingModEditor (effect); } //--------------------------------// RingModEditor::RingModEditor (void* ptr) : AEffGUIEditor (ptr) { } //--------------------------------// bool RingModEditor::open (void* ptr) { CRect frameSize (0, 0, 300, 300); CFrame* newFrame = new CFrame (frameSize, ptr, this); newFrame->setBackgroundColor(kWhiteCColor); ... // additional code setting up knobs, etc. //--------------------------------// void RingModEditor::close () { CFrame* oldFrame = frame; frame = 0; oldFrame->forget(); } Along the same lines, what's the opinion on VST gui? Are there better tools out there for custom UI? What do you guys use for custom UI? I read a little bit about JUCE and it seems pretty cool. Much appreciated. LemonLime |
|||
| ^ | Joined: 15 Apr 2012 Member: #278696 Location: Toronto, ON | ||
|
|||
| ^ | Joined: 28 May 2001 Member: #586 Location: New York, NY | ||
|
|||
Magic!
Thank you, sir. In case others encounter this problem, I added these lines of code inside the 'open' function of my plugin editor: ERect *wSize; getRect (&wSize); wSize->top = wSize->left = 0; wSize->bottom = wSize->right = 300; And then you go about creating the view frame, attaching it to the parent window, etc. |
|||
| ^ | Joined: 15 Apr 2012 Member: #278696 Location: Toronto, ON |
| KVR Forum Index » DSP and Plug-in Development | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group






