COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 03-31-2018, 11:04 AM   #401
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

No probs, glad to help!
Bobflip is offline   Reply With Quote
Old 04-10-2018, 05:44 PM   #402
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

Have there been any changes that would impact text colors?

I am having this weird issue with font colors on the Mac. PC is fine. The mColor has the correct value, but something happens when it draws. So if I have the text set to Orange, it draws light blue. If I change it to Green, it draws as Magenta. Yellow = a white/gray color.

For some controls, I have been using the ycairo_show_text with a global font. That works fine. For some other controls, I am still using IGraphics:rawIText(). That is the method that is doing weird color things.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-11-2018, 02:12 PM   #403
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Quote:
Originally Posted by random_id View Post
Have there been any changes that would impact text colors?

I am having this weird issue with font colors on the Mac. PC is fine. The mColor has the correct value, but something happens when it draws. So if I have the text set to Orange, it draws light blue. If I change it to Green, it draws as Magenta. Yellow = a white/gray color.

For some controls, I have been using the ycairo_show_text with a global font. That works fine. For some other controls, I am still using IGraphics:rawIText(). That is the method that is doing weird color things.
Yes, I have reverted back to the old version of the swell. That might mess the text drawing.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is online now   Reply With Quote
Old 04-11-2018, 02:16 PM   #404
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

I will check this out for the weekend.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is online now   Reply With Quote
Old 04-11-2018, 04:03 PM   #405
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

Quote:
Originally Posted by Youlean View Post
I will check this out for the weekend.
OK. I didn't dig so deep with the debugging and diff. I will start looking.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-11-2018, 04:08 PM   #406
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Quote:
Originally Posted by random_id View Post
OK. I didn't dig so deep with the debugging and diff. I will start looking.
This has something to do with swell text. Colors are mixed. I don't have now time to check.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is online now   Reply With Quote
Old 04-11-2018, 04:57 PM   #407
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

I think I found the problem.
In swell-gdi.mm, line 205 is:
Code:
CGContextRef c=CGBitmapContextCreate(ALIGN_FBUF(buf),w,h,8,w*4,__GetDisplayColorSpace(), kCGImageAlphaNoneSkipFirst);
If I change it to:
Code:
CGContextRef c=CGBitmapContextCreate(ALIGN_FBUF(buf),w,h,8,w*4, __GetBitmapColorSpace(), kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host);
the color looks correct
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-13-2018, 03:59 PM   #408
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

Quote:
Originally Posted by Youlean View Post
Yes, I have reverted back to the old version of the swell. That might mess the text drawing.
Just wondering what was happening with Swell to make you want to change to an older version.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-14-2018, 11:43 AM   #409
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Thanks. I will add this fix.

A new version of swell has some problems with studio one on mac, though I am still having crashes in studio one...
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is online now   Reply With Quote
Old 04-29-2018, 09:45 AM   #410
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 49
Default

How can I make it so the window cant be resized out of the bounds of the current monitor? Or make it so the plugin is resized to the max monitor width / height on load.

cuz I have 3 monitors -- and when the plugin is on the middle main monitor, and gets resized into the second monitor -- next time the plugin loads, it gets centered in the middle monitor, and the drag-arrow in the bottom right of the plugin is out of bounds and invisible on the bottom of the screen....

Wouldn't it make sense to have some sort of functionality controlling / preventing this behavior baked in?

EDIT : Oops. Doh. I just noticed a method called "SetWindowSizeLimits"....

EDIT 2 : It's not working the way I would've expected it too...assume screenHeight and screenWidth are 1080 and 960 here...

Quote:
int screenHeight, screenWidth;
GetDesktopResolution(screenWidth, screenHeight);
GetGUIResize()->SetWindowSizeLimits(0,
/* Min Width */ GUI_WIDTH / 2,
/* Min Height */ GUI_HEIGHT / 2,
/* Max Width */ screenWidth,
/* Max Height */ screenHeight
);

Last edited by Opcode 7; 04-29-2018 at 10:04 AM.
Opcode 7 is offline   Reply With Quote
Old 05-01-2018, 07:46 PM   #411
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 649
Default

Quote:
Originally Posted by Opcode 7 View Post
How can I make it so the window cant be resized out of the bounds of the current monitor? Or make it so the plugin is resized to the max monitor width / height on load.

cuz I have 3 monitors -- and when the plugin is on the middle main monitor, and gets resized into the second monitor -- next time the plugin loads, it gets centered in the middle monitor, and the drag-arrow in the bottom right of the plugin is out of bounds and invisible on the bottom of the screen....

Wouldn't it make sense to have some sort of functionality controlling / preventing this behavior baked in?

EDIT : Oops. Doh. I just noticed a method called "SetWindowSizeLimits"....

EDIT 2 : It's not working the way I would've expected it too...assume screenHeight and screenWidth are 1080 and 960 here...
I have not figured this out completely. GetDesktopResolution will give you desktop resolution but so far I have not found a way to get plugin border size to compensate for that too.

SetWindowSizeLimits will just limit resizing, but when you switch monitors you should resize GUI yourself.
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is online now   Reply With Quote
Old 06-13-2018, 09:05 PM   #412
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 49
Default

Question: My plugins has hundreds of parameters, distributed through many AutoGUI Tabs -- so the window resizing seems to be a bit sluggish and laggy.

Is there any variables anywhere that control the speed of the re-draw? I tried adjusting DRAW_FPS from 120 to 240, to no avail....

Thoughts?
Opcode 7 is offline   Reply With Quote
Old 06-14-2018, 08:34 AM   #413
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

I noticed a little pause in between resizes, but after commenting all my resizing code it remained so figured it was just part of the process!

Are you resizing all your controls or just the visible ones? If the former you could put a switch case statement in there to only resize the controls for the current tab, and then when the user changes to a different tab resize those controls - maybe even put boolean variables in there to store whether or not that tab's controls match the window size.
Bobflip is offline   Reply With Quote
Old 06-14-2018, 09:41 AM   #414
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

I had added some code to cut the framerate in half during resizing (when the corner is being dragged), and then setting it back to normal rate OnMouseUp(). Unfortunately, it didn't really do anything noticeable.

Are you on a Mac or PC? As Youlean has said, there are some weird things happening with the Windows timer that triggers graphics drawing. I don't know if this has anything to do with it.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 06-22-2018, 08:35 PM   #415
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 49
Default

Thanks, good suggestion Bob! I traced the slow resizing performance to the "GetLayoutContainerIsHidden" call (when there's a tonnn of parameters!) Adding the following checks to ResizeControlRects() made my resizing snappy again!

Code:
		IControl* pControl = mGraphics->GetControl(i);
		if (pControl->IsHidden()) {
			continue;
		}

		int *isHidden = GetLayoutContainerIsHidden(current_view_mode, pControl);
		if (*isHidden) {
			continue;
		}
Opcode 7 is offline   Reply With Quote
Old 07-13-2018, 03:50 PM   #416
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,171
Default

Quote:
Originally Posted by Bobflip View Post
Ok, seems like presets are currently broken, unless I'm missing something in how to implement them. I have taken a fresh IPlugEffect, and added the following lines:

Code:
#define kNumPrograms 3

  MakePreset("pre1", kGain, 1.0);
  MakePreset("pre2", kGain, 55.0);
  MakePreset("pre3", kGain, 80.0);
  
  
//  MakePresetFromNamedParams("pre1", 1,
//                            kGain, 1.0
//                            );
//  
//  MakePresetFromNamedParams("pre2", 1,
//                            kGain, 55.0
//                            );
//  
//  MakePresetFromNamedParams("pre3", 1,
//                            kGain, 80.0
//                            );
//
Tried it with both the MakePreset calls and the MakePresetFromNamedParams calls, and both will show the presets in the host preset list (tested with AU in Logic and VST2 in Ableton), but I can't select any presets other than the first, and the Gain control isn't updated.
Excuse me if I missed it, is above still an issue or is it supposed to be fixed ?
Because I seem to be getting a quite similar problem with my plugin (Win VST2, Reaper, current WDL-Youlean master branch, VST SDK 3610) ,when wanting to create 'built in' presets.

With this code in my plugin

Code:
const int kNumPrograms = 3;

MakeDefaultPreset("default", 1);
MakePreset("pre1", kGain, 55.0);
MakePreset("pre2", kGain, 80.0);
I get the following quirky behaviour, i.e. I can select presets 2 and 3 but they immediately snap back to default preset and the parameter isn't updated either.


Last edited by nofish; 07-14-2018 at 05:33 AM.
nofish is offline   Reply With Quote
Old 07-23-2018, 05:49 AM   #417
jan hase
Human being with feelings
 
Join Date: Jul 2017
Posts: 16
Default cant start IPlug YouLean

hey there,
i would love to use IPlug Youlean, but i cant get it to start. i get the following error and dont know what to do about it ??? tried several different sdk versions ans platform toolsets...any clue?


SDK Version : 10.0.17134.0
Platform ToolSet: Visual Studio 2017 (v141)

Error LNK1104 cannot open file '..\..\YCAIRO\Cairo_Graphics\Lib-Win\cairo-Win32-Debug.lib'
jan hase is offline   Reply With Quote
Old 07-23-2018, 07:29 AM   #418
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

You need to build the Cairo libraries. Open up YCAIRO/Cairo_graphics/projects/cairo.sln and build all.
Bobflip is offline   Reply With Quote
Old 07-23-2018, 09:10 AM   #419
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,171
Default

I've been also stumbling over the missing Cairo libs and having to build yourself when starting with IPlug - Youlean and it took me a bit to figure it out (find an older relevant post in this thread).

Would be helpful I think if the first post could be updated with this info (currently it says 'All libs for MSVC2015 and 10.7+ XCode are included').

edit:
Maybe also that use of Cairo can be disabled by not defining (commenting out) '#define USING_YCAIRO' in IPlugBase.h, which also took me a bit to find out (but maybe it's just me ).

Last edited by nofish; 07-23-2018 at 11:03 AM.
nofish is offline   Reply With Quote
Old 09-09-2018, 12:27 PM   #420
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

Is anyone using IPlug-Youlean with bitmaps?

I am having significant problems when there are multiple instances of a plugin that are sized differently. I have made the bitmap storage non-static, but there are still issues after several rounds of resizing the different plugin instances.

Any suggestions would be great.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 09-09-2018, 12:47 PM   #421
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

What are the issues?
Bobflip is offline   Reply With Quote
Old 09-09-2018, 02:29 PM   #422
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

Quote:
Originally Posted by Bobflip View Post
What are the issues?
Yeah, I guess I could be clearer.

When I have 2 instances open and start to resize them, eventually the bitmaps will be incorrect. It looks like one plugin size is controlling the bitmap size of the other instance.

So, the normal GUI looks like this...


When I start playing around with 2, I eventually get this ...


I thought that the bitmaps must be stored statically, and that was the problem. However, I changed the bitmap storage to be per instance (I think). I also thought that it was related to the global size being saved and recalled to the config file, but I disabled that and I still have issues.

I have been debugging and it looks like the bitmaps and scale_ratios are unique.
__________________
Website: LVC-Audio

Last edited by random_id; 09-11-2018 at 03:49 AM.
random_id is offline   Reply With Quote
Old 09-09-2018, 04:38 PM   #423
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

Weird, I'm using bitmaps and resizing but got no issues like that. I worked from the example project. Maybe the issue is in the GUI resize code rather than the variables?
Bobflip is offline   Reply With Quote
Old 09-09-2018, 06:52 PM   #424
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

I went through IGraphic.h/cpp and IPlugGUIResize.h/cpp to make sure I didn't change anything from the current commit. There are a few changes that I needed to make, but nothing should be of consequence to this.

One thing that I noticed with the screenshot is that I think the bitmaps are sized correctly, I think the problem is that both plugin instance's set of bitmaps are being drawn over the other instance. It is like the Draw command draws the correct set first, then overlays the incorrect bitmaps from the other plugin instance. I am checking Draw() now, but nothing is sticking out to me.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 09-09-2018, 07:20 PM   #425
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

Sorry, I was thinking there might be a bug in your SetGUILayout code. Though I'm wondering now if you've possibly missed a ycairo_draw() call in one of your controls. I think if that is left off it'll draw that stuff the next time it's called, and maybe that's happening on the next window instead? Just a vague idea though and may well be completely not that!
Bobflip is offline   Reply With Quote
Old 09-10-2018, 06:34 PM   #426
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 338
Default

Fixed it!

I was looking at this post (https://forum.cockos.com/showpost.ph...61&postcount=4), and removed static from the definition of storeLoadedBitmap and s_bitmapCache. After a lot of testing, I realized that the storeLoadedBitmap size was doubling as the second plugin instance was added.

I did the following:
-Moved GUIResizeBitmapStorage and BitmapStorage classes to the IGraphics.h file so I didn't have to do any forward declaration
-I added (as pointers) storeLoadedBitmap and s_bitmapCache as private members in the IGraphics class
-In the IGraphics constructor, I added code to create new objects for each
-In the deconstructor, I used the DELETE_NULL to clean things up for the 2 objects.
-I also had to change all the . operators to -> to deference the new pointers

I guess all of this could be macro-ed if people wanted to have shared bitmaps or separate. Although it is more storage, I think it would be needed for any plugin where there are bitmaps, more than one plugin instance, and the instances could be different sizes.

By the way...Can I edit the images in my previous post so you don't have to scoll left/right to read it? Sorry the images were so big.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 09-10-2018, 08:41 PM   #427
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

I just realised I made a bit of a mistake - I'm using bitmaps and resizing, but all the resizing is for controls that are drawn on the fly, and the bitmaps stay the same size... so that may be why I hadn't run into the same issues... oops! Well done for getting it worked out.

Not sure about how to directly edit the images in a forum post but you could upload resized versions to Imgur and edit the post's bbcode.
Bobflip is offline   Reply With Quote
Old 10-06-2018, 12:57 AM   #428
k.d.iv
Human being with feelings
 
Join Date: Mar 2018
Posts: 13
Default

Hi. I'm curious, is it true that Youlean will not update his Iplug-Youlean anymore?
If true then what we should do - probably switch to Olie's Iplug2 or work on "personal" fork?
k.d.iv is offline   Reply With Quote
Old Today, 08:28 AM   #429
k.d.iv
Human being with feelings
 
Join Date: Mar 2018
Posts: 13
Default

Does someone know how to compile the VST3 Visual Studio project?(Myplugin-vst3.vcxproj)

I'm getting this with freshly installed VST3_SDK 3.6.11:

Code:
1>pluginfactoryvst3.obj : error LNK2001: unresolved external symbol "public: static class Steinberg::FUID const Steinberg::FUnknown::iid" (?iid@FUnknown@Steinberg@@2VFUID@2@B)
1>base.lib(fobject.obj) : error LNK2001: unresolved external symbol "public: static class Steinberg::FUID const Steinberg::FUnknown::iid" (?iid@FUnknown@Steinberg@@2VFUID@2@B)
1>base.lib(updatehandler.obj) : error LNK2001: unresolved external symbol "public: static class Steinberg::FUID const Steinberg::FUnknown::iid" (?iid@FUnknown@Steinberg@@2VFUID@2@B)
1>base.lib(fobject.obj) : error LNK2001: unresolved external symbol "public: static class Steinberg::FUID const Steinberg::IDependent::iid" (?iid@IDependent@Steinberg@@2VFUID@2@B)
1>base.lib(updatehandler.obj) : error LNK2001: unresolved external symbol "public: static class Steinberg::FUID const Steinberg::IDependent::iid" (?iid@IDependent@Steinberg@@2VFUID@2@B)
1>base.lib(updatehandler.obj) : error LNK2001: unresolved external symbol "public: static class Steinberg::FUID const Steinberg::IUpdateHandler::iid" (?iid@IUpdateHandler@Steinberg@@2VFUID@2@B)
I think also there is problem with IPlug_include_in_plug_src.h
when VST3_API is defined, but no building errors for this which is strange.
Any suggestions ?? Thanks.
k.d.iv is offline   Reply With Quote
Old Today, 09:41 AM   #430
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 317
Default

Might be that you're using too *new* a version of the VST SDK. I'm using 3.6.7 I believe.
Bobflip is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.