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: 312
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: 334
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: 334
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: 334
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: 334
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: 45
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: 45
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: 312
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: 334
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: 45
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: 7,884
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: 312
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: 7,884
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
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 08:38 AM.


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