|
|
|
05-15-2020, 08:51 AM
|
#1201
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
AS51:
|
|
|
05-15-2020, 12:05 PM
|
#1202
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
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.
|
|
|
05-15-2020, 12:05 PM
|
#1203
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
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.
|
|
|
05-15-2020, 12:09 PM
|
#1204
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by heda
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?
|
|
|
05-15-2020, 12:19 PM
|
#1205
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
Quote:
Originally Posted by juliansader
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
|
|
|
05-15-2020, 01:26 PM
|
#1206
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
SetCursorPos
Is there an equivalent to the Win32 API SetCursorPos?
|
|
|
05-15-2020, 01:29 PM
|
#1207
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Quote:
Originally Posted by juliansader
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
|
|
|
05-15-2020, 01:44 PM
|
#1208
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,721
|
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?
|
|
|
05-15-2020, 01:57 PM
|
#1209
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Edgemeal
|
JS_Mouse_SetPosition
|
|
|
05-15-2020, 02:05 PM
|
#1210
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Justin
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.
|
|
|
05-15-2020, 04:05 PM
|
#1211
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by juliansader
JS_Mouse_SetPosition
|
Awesome! Just what I needed for "Auto move LICEcap" script! Moves LICEcap window when mouse gets near its edges.
Thanks again!
|
|
|
05-15-2020, 07:34 PM
|
#1212
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by Edgemeal
|
Nice scriptidea, I should check that out...
|
|
|
05-16-2020, 03:18 PM
|
#1213
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
Quote:
Originally Posted by Edgemeal
|
This looks really cool.
|
|
|
05-18-2020, 03:27 AM
|
#1214
|
Banned
Join Date: Dec 2018
Posts: 642
|
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.
Last edited by cohler; 05-18-2020 at 03:39 AM.
Reason: add video
|
|
|
05-18-2020, 03:51 AM
|
#1215
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 4,587
|
How is that related to JS_API?
|
|
|
05-18-2020, 04:36 AM
|
#1216
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Not at all
|
|
|
05-18-2020, 06:28 AM
|
#1217
|
Banned
Join Date: Dec 2018
Posts: 642
|
Quote:
Originally Posted by Sexan
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...
|
|
|
05-18-2020, 07:39 AM
|
#1218
|
Human being with feelings
Join Date: Oct 2017
Location: U.K
Posts: 542
|
Quote:
Originally Posted by cohler
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.
|
|
|
05-18-2020, 10:59 AM
|
#1219
|
Human being with feelings
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
|
Quote:
Originally Posted by Ideosound
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.
|
|
|
05-18-2020, 02:21 PM
|
#1220
|
Human being with feelings
Join Date: Oct 2017
Location: U.K
Posts: 542
|
Quote:
Originally Posted by Klangfarben
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.
|
|
|
05-18-2020, 04:21 PM
|
#1221
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by vitalker
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.
|
|
|
05-19-2020, 02:15 AM
|
#1222
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
Quote:
Originally Posted by Edgemeal
Might look cool, but moving even small-ish window around the screen basically defeats the purpose of the LICE option "
|
Ah, I see.
|
|
|
05-21-2020, 06:26 AM
|
#1223
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
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?
|
|
|
05-21-2020, 07:41 AM
|
#1224
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
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.
|
|
|
05-21-2020, 09:14 AM
|
#1225
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by Edgemeal
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
|
|
|
05-21-2020, 09:48 AM
|
#1226
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
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.
|
|
|
05-21-2020, 09:56 AM
|
#1227
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by juliansader
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?
|
|
|
05-21-2020, 12:03 PM
|
#1228
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
Quote:
Originally Posted by juliansader
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.
|
|
|
05-21-2020, 10:16 PM
|
#1229
|
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
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?
|
|
|
05-22-2020, 02:44 PM
|
#1230
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by Meo-Ada Mespotine
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
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.
|
|
|
05-22-2020, 02:51 PM
|
#1231
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by dsyrock
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?)
|
|
|
05-22-2020, 03:11 PM
|
#1232
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Quote:
Originally Posted by juliansader
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!!!
|
|
|
05-22-2020, 03:22 PM
|
#1233
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Quote:
Originally Posted by _Stevie_
@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!
|
|
|
05-22-2020, 03:25 PM
|
#1234
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
Quote:
Originally Posted by juliansader
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.
|
|
|
05-22-2020, 07:36 PM
|
#1235
|
Human being with feelings
Join Date: Sep 2018
Location: China
Posts: 565
|
Quote:
Originally Posted by juliansader
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.
|
|
|
05-23-2020, 09:34 AM
|
#1236
|
Human being with feelings
Join Date: Apr 2011
Posts: 3,451
|
Quote:
Originally Posted by dsyrock
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()
|
|
|
05-23-2020, 10:43 AM
|
#1237
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,239
|
something similar happens with the Xen_StartSourcePreview function
I use to play an audio file. And then you cannot delete that audio file until you close REAPER.
Another question: Is there a way to know what percentage of the audio has been played? Or at least when it has finished playing?
Maybe if there is a function to know when it has finished playing, it could also close the file for read.
|
|
|
05-23-2020, 11:36 AM
|
#1238
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Quote:
Originally Posted by heda
Another question: Is there a way to know what percentage of the audio has been played? Or at least when it has finished playing?
|
Unfortunately no. You would need to retrieve the length of the file somehow and calculate it on your own.
But if I remember correctly, the preview-functions need the PCM_Source and this probably would need to be destroyed later. But I might be wrong.
|
|
|
05-24-2020, 11:25 AM
|
#1239
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
|
@Julian, is there a way to "un-destroy" or re-create:
Code:
reaper.JS_LICE_Clear()
What I basically want to do is: when a key is pressed, show an object, when the key is released, hide it.
Last edited by _Stevie_; 05-24-2020 at 12:02 PM.
|
|
|
05-24-2020, 03:55 PM
|
#1240
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Could you elaborate a little on what you are trying to do?
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:08 AM.
|