Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 04-05-2019, 11:32 AM   #41
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Quote:
Originally Posted by Embass View Post
just workaround.. transparent gfx window example (windows os only).
https://stash.reaper.fm/manage_file/...%20example.lua
That link will only work for you.

https://stash.reaper.fm/36003/transp...%20example.lua
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 04-07-2019, 12:32 PM   #42
Embass
Human being with feelings
 
Embass's Avatar
 
Join Date: Jan 2014
Posts: 923
Default

link: https://drive.google.com/file/d/1jTy...ew?usp=sharing
Embass is offline   Reply With Quote
Old 04-08-2019, 01:17 AM   #43
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by Embass View Post
just workaround.. transparent gfx window example (windows os only).
https://stash.reaper.fm/manage_file/...%20example.lua
It is very useful to have a "bag of tricks" for getting transparent windows and other interesting UI features!
juliansader is offline   Reply With Quote
Old 04-08-2019, 02:00 AM   #44
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Good news! Alpha blending on Linux has been enabled in the newest version of REAPER!

(Somewhat unexpectedly, JS_Composite now seems to work better on Linux and macOS than on Windows.)

Also, v0.981 of the ReaScriptAPI extension has also been uploaded, with a few improvements in JS_Composite. For example, if the destination width or height is set to -1, the image will be stretched to fill the target window if the window is resized.
juliansader is offline   Reply With Quote
Old 04-09-2019, 01:39 AM   #45
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,596
Default

edit...

Last edited by Sexan; 04-11-2019 at 01:59 PM.
Sexan is offline   Reply With Quote
Old 04-11-2019, 10:42 AM   #46
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

As mentioned above, I implemented the idea to intercept WM_PAINT, and it works perfectly on Linux and macOS.

Unfortunately, on WindowsOS, it still glitches. I therefore tried to get REAPER to draw into an offscreen memory bitmap instead of the screen, so that this bitmap and the script's LICE bitmap can be composited before blitting to the screen. WM_PAINT can optionally point to a memory bitmap in its WPARAM parameter, but code such as this didn't work, so I suspect that REAPER's windows ignore the WPARAM pointer:
Code:
RECT r{0,0,0,0};
GetClientRect(hwnd, &r);
HDC clientDC = GetDC(hwnd);
HDC memDC = CreateCompatibleDC(clientDC);
HBITMAP memBitmap = CreateCompatibleBitmap(clientDC, r.right, r.bottom);
SelectObject(memDC, memBitmap);

LRESULT result = SendMessage(hwnd, WM_PAINT, (WPARAM)memDC, lParam);

AlphaBlend LICE into memDC;

BitBlt(clientDC, 0, 0, r.right, r.bottom, memDC, 0, 0, SRCCOPY);

DeleteObject( memBitmap );
DeleteDC( memDC );
Changing WM_PAINT into WM_PRINT or WM_PRINTCLIENT didn't work either (or at least, not with the options that I tried).
juliansader is offline   Reply With Quote
Old 04-30-2019, 10:00 PM   #47
future-bit
Human being with feelings
 
Join Date: May 2008
Posts: 117
Default

+1 good idea!
future-bit is offline   Reply With Quote
Old 05-01-2019, 04:12 AM   #48
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

+1 from me too! I've been experimenting a little with things placing progress bars in other script GUI's (eg - the script doing the work has no GUI) - but so far it's been a little flickery.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 05-23-2019, 03:42 PM   #49
lexomir
Human being with feelings
 
lexomir's Avatar
 
Join Date: Oct 2018
Posts: 39
Default

+2 YES, I've been needing this for a while
lexomir is offline   Reply With Quote
Old 07-29-2019, 10:27 AM   #50
shady
Human being with feelings
 
Join Date: Jun 2017
Posts: 110
Default

Bump would be cool
__________________
twitch.tv/suprshady trying to stream REAPER stuff.. more than twice a year
shady is offline   Reply With Quote
Old 02-24-2020, 05:46 AM   #51
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

Hi Julian! We still don`t know reason of a little glitching on windows?This is because AlphaBlend is slow?
May be some kind of double buffering help avoid this?
nappies is online now   Reply With Quote
Old 02-24-2020, 06:45 AM   #52
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by nappies View Post
May be some kind of double buffering help avoid this?
I did try to implement double buffering (post #48 above), but unfortunately couldn't get REAPER's windows to draw to the offscreen buffer.
juliansader is offline   Reply With Quote
Old 02-24-2020, 08:02 AM   #53
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

Quote:
Originally Posted by juliansader View Post
I did try to implement double buffering (post #48 above), but unfortunately couldn't get REAPER's windows to draw to the offscreen buffer.

Ah, I realized this is it) And reason of windows blinking not clear?
If this because Alphablend slow ,I found custom AlphaBlend function using SSE instructions.

According to the developer. It works 4 times faster.
Here in code:

https://github.com/isotoxin/isotoxin...itmap.cpp#L825

And from another developer in functions:

https://github.com/ermig1979/Simd/bl...haBlending.cpp
https://github.com/ermig1979/Simd/bl...haBlending.cpp

Maybe it helps)
nappies is online now   Reply With Quote
Old 02-24-2020, 12:50 PM   #54
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by nappies View Post
Ah, I realized this is it) And reason of windows blinking not clear?
If this because Alphablend slow ,I found custom AlphaBlend function using SSE instructions.
Do these functions perform blitting from one device context to another, similar to the Win32 AlphaBlend function, or do they perform alpha pre-multiplication on a bitmap?

In any case, it seems that recent versions of REAPER introduced a bug in the WDL/swell version of AlphaBlend, so that it doesn't work on new Macs that use Metal graphics. Until this bug is fixed, compositing isn't not usable cross-platform.
juliansader is offline   Reply With Quote
Old 03-26-2023, 07:47 AM   #55
ilmel
Human being with feelings
 
Join Date: Dec 2020
Posts: 15
Default

Hi! Can you, please, tell me if the collection works in Reaper 6+?
Thank you
ilmel is offline   Reply With Quote
Old 03-27-2023, 02:16 AM   #56
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by ilmel View Post
Hi! Can you, please, tell me if the collection works in Reaper 6+?
Thank you
You mean the functions of the extension? They work on Reaper 6+
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine 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 03:03 PM.


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