Old 05-15-2020, 08:32 AM   #1201
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by _Stevie_ View Post
Just tested with AS51 and Multi Tool. Not working with the latest pre build in metal mode. Same issues as before.
Justin has just replied that BitBlt doesn't yet work *from* Metal windows, and that is the function that I used apply in my attempted workaround in the latest version of the extension. So, ironically, the previous versions of the extension should work better.
juliansader is offline   Reply With Quote
Old 05-15-2020, 08:33 AM   #1202
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Reverting and checking!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-15-2020, 08:36 AM   #1203
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Okay, checked with 1.002 and AS + Multi Tool and it works in Metal mode!
However, in certain circumstances a lot of flickering is involved.
Trying to capture with LiceCap...
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-15-2020, 08:44 AM   #1204
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Okay, that worked: sidenote, if you want to capture flickering use the same fps as your monitor

__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-15-2020, 08:51 AM   #1205
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

AS51:

__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-15-2020, 12:05 PM   #1206
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,826
Default

Hi talented people. Using the reaper.JS_LICE_WritePNG() function
to save the captured screen to a file. it seems the png's saved with the v1.201 are not saved correctly.. here in windows x64 at least. I cannot open them and they are like 1Kb only. going back to js_ReaScriptAPI version 1.01 and it works.

Thank you for js_ReaScriptAPI which is amazing. still exploring.
heda is offline   Reply With Quote
Old 05-15-2020, 12:05 PM   #1207
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Thanks for testing! I have copied the results to the pre-release thread.

The next-to-last version of the extension, v1.010, contains a few improvements in compositing over v1.002, although I don't think those improvements would affect the flickering that you reported.
juliansader is offline   Reply With Quote
Old 05-15-2020, 12:09 PM   #1208
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by heda View Post
Hi talented people. Using the reaper.JS_LICE_WritePNG() function to save the captured screen to a file. it seems the png's saved with the v1.201 are not saved correctly.. here in windows x64 at least. I cannot open them and they are like 1Kb only. going back to js_ReaScriptAPI version 1.01 and it works.

Thank you for js_ReaScriptAPI which is amazing. still exploring.
There was indeed an update in the libpng library between v1.010 and v1.200, but everything seemed to work fine in my own tests.

Which OS are you using, and does it happen with all pngs?
juliansader is offline   Reply With Quote
Old 05-15-2020, 12:19 PM   #1209
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,826
Default

Quote:
Originally Posted by juliansader View Post
There was indeed an update in the libpng library between v1.010 and v1.200, but everything seemed to work fine in my own tests.

Which OS are you using, and does it happen with all pngs?
win7 x64... I'll try to test it on windows 10 later
yes.. everytime. the png only has a few header bytes
heda is offline   Reply With Quote
Old 05-15-2020, 01:26 PM   #1210
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,805
Default SetCursorPos

Is there an equivalent to the Win32 API SetCursorPos?
Edgemeal is offline   Reply With Quote
Old 05-15-2020, 01:29 PM   #1211
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Quote:
Originally Posted by juliansader View Post
Thanks for testing! I have copied the results to the pre-release thread.

The next-to-last version of the extension, v1.010, contains a few improvements in compositing over v1.002, although I don't think those improvements would affect the flickering that you reported.
You are welcome Julian! Thanks for doing so many great things!

Concerning the flickering: it's funny, because in classic mode this never happened. But I don't know enough about all that to judge where this comes from
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-15-2020, 01:44 PM   #1212
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,792
Default

I tested AS51 with Metal on the latest +dev. I couldn't reproduce all of the issues, but I did see some where the image being drawn was partly offscreen. I'll see if that is an issue on our end, but JS_Composite should perhaps clip things?
Justin is offline   Reply With Quote
Old 05-15-2020, 01:57 PM   #1213
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by Edgemeal View Post
Is there an equivalent to the Win32 API SetCursorPos?
JS_Mouse_SetPosition
juliansader is offline   Reply With Quote
Old 05-15-2020, 02:05 PM   #1214
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by Justin View Post
I tested AS51 with Metal on the latest +dev. I couldn't reproduce all of the issues, but I did see some where the image being drawn was partly offscreen. I'll see if that is an issue on our end, but JS_Composite should perhaps clip things?
Version 1.010 and later do clip if the invalidated area is smaller than the client area (it employs two steps: first LICE_ScaledBlit the bitmaps into a temporary buffer and then BitBlt only the invalidated region into the window).

However, if the invalidated area covers the entire client area, it assumes that REAPER will clip blits that are partly offscreen.

It will be easy to adapt JS_Composite to clip everything to the client area.
juliansader is offline   Reply With Quote
Old 05-15-2020, 04:05 PM   #1215
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,805
Default

Quote:
Originally Posted by juliansader View Post
JS_Mouse_SetPosition
Awesome! Just what I needed for "Auto move LICEcap" script! Moves LICEcap window when mouse gets near its edges.

Thanks again!
Edgemeal is offline   Reply With Quote
Old 05-15-2020, 07:34 PM   #1216
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by Edgemeal View Post
Awesome! Just what I needed for "Auto move LICEcap" script! Moves LICEcap window when mouse gets near its edges.

Thanks again!
Nice scriptidea, I should check that out...
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-16-2020, 03:18 PM   #1217
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 5,311
Default

Quote:
Originally Posted by Edgemeal View Post
Awesome! Just what I needed for "Auto move LICEcap" script! Moves LICEcap window when mouse gets near its edges.
This looks really cool.
__________________
Quote:
Originally Posted by Sexan View Post
Make a thread "F%#! you Reaper! I quit!" to get more views and feedback since these kind of threads get much more traction
SoundCloudFR: True Non-destructive GLUEAll the REAPER names
vitalker is offline   Reply With Quote
Old 05-18-2020, 03:27 AM   #1218
cohler
Human being with feelings
 
Join Date: Dec 2018
Posts: 219
Default BUG question: Dragging fade edge reverts fade to default

Does anyone here know of a solution to the following bug/major problem in REAPER?

I posted this also in a bug thread but have received no response of any kind as usual from the developers.

If you create a cross fade and customize it with various asymmetric fade shapes and lengths, as soon as you go to drag either the left or right edge of the fade, it instantly (and for no documented reason) reverts the the fade shapes back to defaults on both sides and reverts the fade lengths back to fit precisely between the two item edges.

This is a particularly annoying bug for anyone doing acoustical music editing, which involves a large fraction of time adjusting crossfades.

__________________
Source-Destination 4-Point Editing for REAPER!
Available NOW for PC & Mac • FREE Trial License included
info@cohlerclassical.comhttps://cohlerclassical.com

Last edited by cohler; 05-18-2020 at 03:39 AM. Reason: add video
cohler is online now   Reply With Quote
Old 05-18-2020, 03:51 AM   #1219
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,808
Default

How is that related to JS_API?
Sexan is offline   Reply With Quote
Old 05-18-2020, 04:36 AM   #1220
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Not at all
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-18-2020, 06:28 AM   #1221
cohler
Human being with feelings
 
Join Date: Dec 2018
Posts: 219
Default

Quote:
Originally Posted by Sexan View Post
How is that related to JS_API?
I thought Julian or one of you might know the answer to this question, that's all. And I thought this was in the developer's forum area...
__________________
Source-Destination 4-Point Editing for REAPER!
Available NOW for PC & Mac • FREE Trial License included
info@cohlerclassical.comhttps://cohlerclassical.com
cohler is online now   Reply With Quote
Old 05-18-2020, 07:39 AM   #1222
Ideosound
Human being with feelings
 
Ideosound's Avatar
 
Join Date: Oct 2017
Location: U.K
Posts: 278
Default

Quote:
Originally Posted by cohler View Post
I thought Julian or one of you might know the answer to this question, that's all. And I thought this was in the developer's forum area...
Just post your bug report on every dev update thread on the forum until the devs respond to it. Sometimes they fix things but don't actually say in the thread it is on their list. Odd I know.
Ideosound is offline   Reply With Quote
Old 05-18-2020, 10:59 AM   #1223
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,025
Default

Quote:
Originally Posted by Ideosound View Post
Just post your bug report on every dev update thread on the forum until the devs respond to it. Sometimes they fix things but don't actually say in the thread it is on their list. Odd I know.
That's literally the worst idea ever. It's just going to piss the devs off especially as Justin has specifically asked people not to do that.

Just post it in the bug reports forum or the main Reascript/JSFX forum here, rather than in Julian's JS API thread which is specific to his API. If it can be dealt with via a script, someone will know. If not, then it has at least been reported as a bug.
Klangfarben is offline   Reply With Quote
Old 05-18-2020, 02:21 PM   #1224
Ideosound
Human being with feelings
 
Ideosound's Avatar
 
Join Date: Oct 2017
Location: U.K
Posts: 278
Default

Quote:
Originally Posted by Klangfarben View Post
That's literally the worst idea ever. It's just going to piss the devs off especially as Justin has specifically asked people not to do that.
Ah yeah ok then not a good idea! I take that back. Your advice is a lot more sensible.
Ideosound is offline   Reply With Quote
Old 05-18-2020, 04:21 PM   #1225
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,805
Default

Quote:
Originally Posted by vitalker View Post
This looks really cool.
Might look cool, but moving even small-ish window around the screen basically defeats the purpose of the LICE option "...make smaller gifs" and file sizes get big pretty quick!
Better to just set LICE to only area you need to capture with a reasonable FPS.
Edgemeal is offline   Reply With Quote
Old 05-19-2020, 02:15 AM   #1226
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 5,311
Default

Quote:
Originally Posted by Edgemeal View Post
Might look cool, but moving even small-ish window around the screen basically defeats the purpose of the LICE option "
Ah, I see.
__________________
Quote:
Originally Posted by Sexan View Post
Make a thread "F%#! you Reaper! I quit!" to get more views and feedback since these kind of threads get much more traction
SoundCloudFR: True Non-destructive GLUEAll the REAPER names
vitalker is offline   Reply With Quote
Old 05-21-2020, 06:26 AM   #1227
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Is there a way to set the windowstyle in a way, that resizing it is not possible?
And does this work on Mac and Linux as well?
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-21-2020, 07:41 AM   #1228
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,805
Default

Only Win10 here, but maybe try,

WS_THICKFRAME: The window has a sizing border. Same as the WS_SIZEBOX style.
https://docs.microsoft.com/en-us/win.../window-styles

EDIT Don't allow user to resize or maximize window...
Code:
function Main()
  window = reaper.JS_Window_Create("Testing", "myClass", 120, 120, 300, 300)
  local style = reaper.JS_Window_GetLong(window, "STYLE")
  style = style & (0xFFFFFFFF - (WS_THICKFRAME | WS_MAXIMIZEBOX))
  reaper.JS_Window_SetLong(window, "STYLE", style)
end

WS_THICKFRAME = 0x40000
WS_MAXIMIZEBOX = 0x10000

Main()

Last edited by Edgemeal; 05-21-2020 at 07:53 AM.
Edgemeal is offline   Reply With Quote
Old 05-21-2020, 09:14 AM   #1229
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by Edgemeal View Post
Only Win10 here, but maybe try,

WS_THICKFRAME: The window has a sizing border. Same as the WS_SIZEBOX style.
https://docs.microsoft.com/en-us/win.../window-styles

EDIT Don't allow user to resize or maximize window...
Code:
function Main()
  window = reaper.JS_Window_Create("Testing", "myClass", 120, 120, 300, 300)
  local style = reaper.JS_Window_GetLong(window, "STYLE")
  style = style & (0xFFFFFFFF - (WS_THICKFRAME | WS_MAXIMIZEBOX))
  reaper.JS_Window_SetLong(window, "STYLE", style)
end

WS_THICKFRAME = 0x40000
WS_MAXIMIZEBOX = 0x10000

Main()
Thanks
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-21-2020, 09:48 AM   #1230
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

I have uploaded v1.215 with the following changes:
* Fixed: LICE_WritePNG when image has transparency.
* New: LICE_LoadJPG, LICE_WriteJPG.
* Updated: If Metal graphics, JS_Composite clips to client area.
juliansader is offline   Reply With Quote
Old 05-21-2020, 09:56 AM   #1231
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by juliansader View Post
I have uploaded v1.215 with the following changes:
* Fixed: LICE_WritePNG when image has transparency.
* New: LICE_LoadJPG, LICE_WriteJPG.
AWESOME!!!

So I can resize png and jpg images and store them right away?
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-21-2020, 12:03 PM   #1232
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 2,071
Default

Quote:
Originally Posted by juliansader View Post
I have uploaded v1.215 with the following changes:
* Fixed: LICE_WritePNG when image has transparency.
* New: LICE_LoadJPG, LICE_WriteJPG.
* Updated: If Metal graphics, JS_Composite clips to client area.

Thank you!

What is the current state of the Metal/JS_Composite problem? Is it considered to be solved?

Last edited by amagalma; 05-22-2020 at 02:59 AM.
amagalma is offline   Reply With Quote
Old 05-21-2020, 10:16 PM   #1233
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 266
Default

I have a question about JS_Dialog_BrowseForOpenFiles

After I using it to read a file, for example E:\bak\test.wav, then Reaper will occupy the path that it load from, in this case E:\bak will be lock up.

Is there any way to prevent?
dsyrock is offline   Reply With Quote
Old 05-22-2020, 02:44 PM   #1234
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
So I can resize png and jpg images and store them right away?
Yep. (Note that LICE_Resize only resizes the bitmap coordinates, and does not do anything to the bitmap image contents. You have to use another function such as LICE_ScaledBlit to resize the images.)


Quote:
Originally Posted by amagalma View Post
What is the current state of the Metal/JS_Composite problem? Is it considered to be solved?
The opacity problem (which caused the huge opaque blocks in my MIDI scripts) and the stretching problem (which caused your guidelines and Sexan's areas to disappear, since they both make use of single-pixel bitmaps that are stretched into lines or rextangles) are both fixed.

Stevie did report lots of flickering, unfortunately. I'm not sure what the cause of the flickering is, whether other users will report the same problem, or whether any further improvements in Metal are in the works.
juliansader is offline   Reply With Quote
Old 05-22-2020, 02:51 PM   #1235
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by dsyrock View Post
I have a question about JS_Dialog_BrowseForOpenFiles

After I using it to read a file, for example E:\bak\test.wav, then Reaper will occupy the path that it load from, in this case E:\bak will be lock up.

Is there any way to prevent?
Could you please give some more information? (Which functions did you use to open and read the file? What happens when the file is locked? Which other functions or applications cannot access the file?)
juliansader is offline   Reply With Quote
Old 05-22-2020, 03:11 PM   #1236
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Quote:
Originally Posted by juliansader View Post
Yep. (Note that LICE_Resize only resizes the bitmap coordinates, and does not do anything to the bitmap image contents. You have to use another function such as LICE_ScaledBlit to resize the images.)




The opacity problem (which caused the huge opaque blocks in my MIDI scripts) and the stretching problem (which caused your guidelines and Sexan's areas to disappear, since they both make use of single-pixel bitmaps that are stretched into lines or rextangles) are both fixed.

Stevie did report lots of flickering, unfortunately. I'm not sure what the cause of the flickering is, whether other users will report the same problem, or whether any further improvements in Metal are in the works.
@Julian, this solved ALL of my issues in MacOS! Thank you!!!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-22-2020, 03:22 PM   #1237
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,143
Default

Quote:
Originally Posted by _Stevie_ View Post
@Julian, this solved ALL of my issues in MacOS! Thank you!!!
Are you *not* seeing the flickering any more, even in Metal mode? That would be very good news!
juliansader is offline   Reply With Quote
Old 05-22-2020, 03:25 PM   #1238
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 3,675
Default

Quote:
Originally Posted by juliansader View Post
Are you *not* seeing the flickering any more, even in Metal mode? That would be very good news!
I checked quickly with AS51 (Metal mode) and there was no flickering at alll!
So I would say it’s fixed. But I will check in-depth tomorrow.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 05-22-2020, 07:36 PM   #1239
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 266
Default

Quote:
Originally Posted by juliansader View Post
Could you please give some more information? (Which functions did you use to open and read the file? What happens when the file is locked? Which other functions or applications cannot access the file?)
I am using reaper.JS_Dialog_BrowseForOpenFiles.

For example, I use it to load/read E:\bak\test.wav, then Reaper will occupy the FOLDER E:\bak. I mean I can't change it's name, or delete it in window's explorer.
dsyrock is offline   Reply With Quote
Old 05-23-2020, 09:34 AM   #1240
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 2,071
Default

Quote:
Originally Posted by dsyrock View Post
I am using reaper.JS_Dialog_BrowseForOpenFiles.

For example, I use it to load/read E:\bak\test.wav, then Reaper will occupy the FOLDER E:\bak. I mean I can't change it's name, or delete it in window's explorer.

I confirm. Should this happen? It's like we have used file = io.open() in lua and then forgot to file:close()
amagalma 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 06:42 AM.


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