Old 05-21-2019, 05:18 AM   #1
mabian
Human being with feelings
 
mabian's Avatar
 
Join Date: Aug 2007
Location: Italy
Posts: 3,588
Default v5.978+dev0521a - May 21 2019

v5.978+dev0521a - May 21 2019
+ ReaScript: prevent possible use-after-free when running quit action from script [t=221191]
# MIDI editor: fix CC segment mouse modifier to draw/edit CC ignoring snap
# MIDI editor: fix inconsistent behavior of mouse modifier to move CC events respecting time selection
# ReaScript: fix calling extension-supplied functions with optional or output parameters

v5.978+dev0521 - May 21 2019
  • + API: support optional arguments in extension-supplied functions when called from ReaScript/Lua [t=219455]
  • + Configuration: store item and track-specific docker preferences with the project, not globally [p=2136380]
  • # MIDI editor: add MIDI CC segment context mouse modifiers to draw CC events [p=2136645]
  • # MIDI editor: add mouse modifier to move CC segment within time selection
  • # MIDI editor: draw active channel CC fill behind events on other channels
This thread is for pre-release features discussion. Use the Feature Requests forum for other requests.

Changelog - Pre-Releases

Generated by X-Raym's REAPER ChangeLog to BBCode
__________________
My DAW: Intel i7700k @4.2GHz / 16GB RAM / RME Fireface UC / 250GB SSD / 2x2TB HD / Win10x64
My Music: http://www.reverbnation.com/errepici - http://www.errepici.it/web/contents.asp?sec=4

Last edited by schwa; 05-22-2019 at 04:25 AM.
mabian is offline   Reply With Quote
Old 05-21-2019, 05:20 AM   #2
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 20,789
Default

per project docking wow yay
__________________
Beliefs do not require respect. People do.
Jason Brian Merrill is offline   Reply With Quote
Old 05-21-2019, 05:28 AM   #3
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

Quote:
Originally Posted by Jason Brian Merrill View Post
per project docking wow yay
There shouldn't be any change in what actually happens, this just removes some clutter from the global ini file.
schwa is offline   Reply With Quote
Old 05-21-2019, 05:32 AM   #4
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 20,789
Default

oh. I haven't changed docking much so didnt realize. heh. just sounded cool.
__________________
Beliefs do not require respect. People do.
Jason Brian Merrill is offline   Reply With Quote
Old 05-21-2019, 05:37 AM   #5
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,918
Default

Quote:
Originally Posted by schwa View Post
There shouldn't be any change in what actually happens, this just removes some clutter from the global ini file.
Ah, is this in relation to docked MIDI editor thing I mentioned?


EDIT: Reaper hard crashes when right-clicking in the CC lanes.


EDIT #2: Also looks like all my MIDI editor settings from Options and View menus (what is displayed on notes, etc.) got restored to defaults?

Last edited by EvilDragon; 05-21-2019 at 05:46 AM.
EvilDragon is online now   Reply With Quote
Old 05-21-2019, 05:52 AM   #6
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,037
Default

Something in this release has broken something in Julian's API.

Trying to open Stripper hard crashes Reaper. Removed Julian's API dll - works ok.

To do with the allow extensions to use optional parameters perhaps?

EDIT - I've narrowed it down to the JS_ReascriptAPI_Version function. Hopefully Julian can fix.
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal

Last edited by lb0; 05-21-2019 at 06:21 AM.
lb0 is offline   Reply With Quote
Old 05-21-2019, 05:54 AM   #7
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

Quote:
Originally Posted by EvilDragon View Post
EDIT: Reaper hard crashes when right-clicking in the CC lanes.


EDIT #2: Also looks like all my MIDI editor settings from Options and View menus (what is displayed on notes, etc.) got restored to defaults?
I don't see either of these problems, but they are probably related. Could you share your reaper-menu.ini?
schwa is offline   Reply With Quote
Old 05-21-2019, 06:14 AM   #8
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

CC segment: "Draw/edit CC events ignoring snap and selection" doesn't seem to work here. The one that obeys snap works neatly
Thanks
gofer is offline   Reply With Quote
Old 05-21-2019, 06:19 AM   #9
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,183
Default

Quote:
+ API: support optional arguments in extension-supplied functions when called from ReaScript/Lua [t=219455]
That's nice. Will open a lot of possibilities for SWS as well
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 05-21-2019, 06:48 AM   #10
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,918
Default

Quote:
Originally Posted by schwa View Post
I don't see either of these problems, but they are probably related. Could you share your reaper-menu.ini?
reaper-menu.zip


(Everything worked perfectly in the previous dev build!)
EvilDragon is online now   Reply With Quote
Old 05-21-2019, 07:02 AM   #11
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

"Move CC segment" (obey time selection) is acting up:



This is with "Allow selecting a single event..." enabled. If I disable that option, nothing will happen at all, provided I didn't select the events beforehand.

Also, it will move events (on that lane) on all visible channels even if the event filter is set to a specific channel. It will obey the filter only if "Show only events that pass filter" is enabled.
gofer is offline   Reply With Quote
Old 05-21-2019, 08:30 AM   #12
MRMJP
Human being with feelings
 
MRMJP's Avatar
 
Join Date: May 2016
Location: Milwaukee, WI USA
Posts: 1,792
Default

I have a somewhat large custom action containing some custom scripts that is now broken in this pre-release. Rolling back to the previous pre-release solves the issue.

Below is an image of the error message as well as an overview of the custom action.

Please let me know if this can be cleared up in the next pre-release or if I have to consult my scripting expert to fix one of the scripts.



__________________
iMac Pro 3.0GHz 10-Core • 64GB RAM • SSD • MacOS 10.14.4
Mac Mini 3.2 GHz Intel Core i7 (6-Core) • 32GB RAM • SSD • MacOS 10.14.4
https://www.mysteryroommastering.com/ - https://www.justincarlperkins.com/

Last edited by MRMJP; 05-21-2019 at 08:35 AM.
MRMJP is offline   Reply With Quote
Old 05-21-2019, 09:00 AM   #13
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,782
Default

Quote:
Originally Posted by MRMJP View Post
I have a somewhat large custom action containing some custom scripts that is now broken in this pre-release. Rolling back to the previous pre-release solves the issue.
Confirmed here.
Issue seems to be (from a first test) when extension provided functions are supposed to return more than one parameter they aren't returned anymore in this version.

https://i.imgur.com/mOERVNQ.gif
nofish is offline   Reply With Quote
Old 05-21-2019, 09:43 AM   #14
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

If possible, it would be really helpful to narrow down a specific example of a script or extension function that breaks with this build.

I suspect the problem is that some extension functions are not properly handling receiving NULLs from scripts, which was never a problem before because a bug on our side prevented it from happening. If that is the case, we might have to make the feature (optional parameters for extension-provided functions) officially not allowed.

But a specific example would really help us figure it out.
schwa is offline   Reply With Quote
Old 05-21-2019, 09:45 AM   #15
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 3,037
Default

Quote:
Originally Posted by schwa View Post
If possible, it would be really helpful to narrow down a specific example of a script or extension function that breaks with this build.

I suspect the problem is that some extension functions are not properly handling receiving NULLs from scripts, which was never a problem before because a bug on our side prevented it from happening. If that is the case, we might have to make the feature (optional parameters for extension-provided functions) officially not allowed.

But a specific example would really help us figure it out.
JS_ReascriptAPI_Version() from Julian's extension causes a Reaper crash as mentioned earlier if this helps.
__________________
Projects - Reascripts - Lua:
LBX Stripper | LBX Chaos Engine | LBX Floating FX Positioner | LBX SRD Smart Knobs
Donate via Paypal
lb0 is offline   Reply With Quote
Old 05-21-2019, 10:14 AM   #16
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

Quote:
Originally Posted by EvilDragon View Post
Attachment 36640


(Everything worked perfectly in the previous dev build!)
Still can't get it to crash, and I do see your customized Options and View menus...
schwa is offline   Reply With Quote
Old 05-21-2019, 10:25 AM   #17
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,918
Default

Ugh... Not sure. It's a poof crash, no crashlog, nothing. Any suggestions on how to catch what happens?
EvilDragon is online now   Reply With Quote
Old 05-21-2019, 10:25 AM   #18
MRMJP
Human being with feelings
 
MRMJP's Avatar
 
Join Date: May 2016
Location: Milwaukee, WI USA
Posts: 1,792
Default

Quote:
Originally Posted by schwa View Post
If possible, it would be really helpful to narrow down a specific example of a script or extension function that breaks with this build.

I suspect the problem is that some extension functions are not properly handling receiving NULLs from scripts, which was never a problem before because a bug on our side prevented it from happening. If that is the case, we might have to make the feature (optional parameters for extension-provided functions) officially not allowed.

But a specific example would really help us figure it out.
This gets beyond my knowledge of software coding/development but this appears to be the script that is shown in the error message:

https://www.dropbox.com/s/0kv0zjzl6l...value.lua?dl=0

The error message itself is truncated but I think that's it, and maybe NoFish can weigh in more.
__________________
iMac Pro 3.0GHz 10-Core • 64GB RAM • SSD • MacOS 10.14.4
Mac Mini 3.2 GHz Intel Core i7 (6-Core) • 32GB RAM • SSD • MacOS 10.14.4
https://www.mysteryroommastering.com/ - https://www.justincarlperkins.com/
MRMJP is offline   Reply With Quote
Old 05-21-2019, 10:39 AM   #19
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

OK, got the ReaScript/extension problem sorted, it was our error.
schwa is offline   Reply With Quote
Old 05-21-2019, 10:40 AM   #20
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

Quote:
Originally Posted by EvilDragon View Post
Ugh... Not sure. It's a poof crash, no crashlog, nothing. Any suggestions on how to catch what happens?
I assume it does not crash with the default menus?
schwa is offline   Reply With Quote
Old 05-21-2019, 10:44 AM   #21
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,918
Default

Actually, it does crash with default menus as well.

Also seems to crash if just clicking in the piano roll and ruler area, regardless if a MIDI item is opened in piano roll or not. It doesn't crash if I right-click in the MIDI CC chooser area, or above the piano keys area.
EvilDragon is online now   Reply With Quote
Old 05-21-2019, 10:56 AM   #22
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Posts: 397
Default

A quick thing I've noticed with the last few releases -- opening some Older projects gives me an error like this:

There were 4 items in the project that were not understood. If this project was created in a newer version of REAPER, this version may not preserve all of the settings of the project.

Project tokens not recognized:

SWSAUTOCOLOR


Is there an issue with the latest Reaper builds in conjunction with SWS?
ferropop is offline   Reply With Quote
Old 05-21-2019, 10:56 AM   #23
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Just outside of Glacier National Park
Posts: 12,475
Default

I checked out the CC mods and a quick test shows that "Shift+LeftClick/Drag" is now working great.

However, "LeftClick/Drag" is not functioning as I would expect. Even when it's assigned "Draw/edit CC events" it only "Moves CC segment".

Also, for myself, I can't think of any reason I would want it to move the segment with LeftClick/Drag. In the Arrange area yes, but not on CCs. Besides, as you can see, Shift+Ctrl is assigned to "Move CC segment".



__________________
Kontakt Vid Tutorials->Create Outputs / Create Templates -|- SMDrums Free drums -|- Elk Video Productions -|- Tod's Music

Last edited by Tod; 05-21-2019 at 01:54 PM.
Tod is offline   Reply With Quote
Old 05-21-2019, 11:03 AM   #24
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,782
Default

Quote:
Originally Posted by schwa View Post
If possible, it would be really helpful to narrow down a specific example of a script or extension function that breaks with this build.
Expanding on my previous post, this is a script (calling an SWS provided ReaScript function) which worked before but breaks in this version in that it doesn't return lufsIntegrated anymore.

Code:
reaper.ClearConsole()

function msg(m)
  return reaper.ShowConsoleMsg(tostring(m) .. "\n")
end

item = reaper.GetMediaItem(0, 0)
take =  reaper.GetActiveTake( item )
retval, lufsIntegrated = reaper.NF_AnalyzeTakeLoudness_IntegratedOnly( take )
msg(lufsIntegrated)
(For demonstration purpose I've omitted the nil checks for item / take)

Running it in 0517:


Running it in 0521 (screencap from previous post):


relevant code sections in SWS:
https://github.com/reaper-oss/sws/bl...cript.cpp#L287
https://github.com/reaper-oss/sws/bl...cript.cpp#L268
https://github.com/reaper-oss/sws/bl...ness.cpp#L4350
nofish is offline   Reply With Quote
Old 05-21-2019, 11:21 AM   #25
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,569
Default

Quote:
Originally Posted by schwa View Post
I suspect the problem is that some extension functions are not properly handling receiving NULLs from scripts, which was never a problem before because a bug on our side prevented it from happening. If that is the case, we might have to make the feature (optional parameters for extension-provided functions) officially not allowed.
It seem the problem lies with parameters that use the "Out" suffix -- not "Optional" -- such as "double* versionOut". Previously, such *output* parameters did not require any arguments in Lua, are were automatically provided with a proper pointer for the parameter type. In this dev version, they seem to be handled similar to Optional *input* parameters, and are given NULL pointers.

Functions such as JS_ReaScriptAPI_Version, which use "Out" parameters will now only work in Lua if the function is provided with a dummy variable:
Code:
reaper.JS_ReaScriptAPI_Version(5)
(Another issue that I noticed, is that void* (or should it be void**?) parameters do not yet work with the Optional suffix in Lua.)
juliansader is offline   Reply With Quote
Old 05-21-2019, 11:38 AM   #26
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

The API issue should be fixed with 5.978+dev0521a, which we just posted. Would you mind testing that?
schwa is offline   Reply With Quote
Old 05-21-2019, 11:40 AM   #27
ovnis
Human being with feelings
 
ovnis's Avatar
 
Join Date: Oct 2011
Posts: 1,311
Default

"# MIDI editor: add mouse modifier to move CC segment within time selection"

Is it possible to always display the CC segment, even when CC is set to 0 ?

With CC always displayed, we would be able to use this new fonctionnality (add mouse modifier to move CC segment within time selection) without the need to create a CC segment.

Last edited by ovnis; 05-21-2019 at 12:33 PM.
ovnis is offline   Reply With Quote
Old 05-21-2019, 11:41 AM   #28
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,782
Default

Quote:
Originally Posted by juliansader View Post
It seem the problem lies with parameters that use the "Out" suffix -- not "Optional" -- such as "double* versionOut". Previously, such *output* parameters did not require any arguments in Lua, are were automatically provided with a proper pointer for the parameter type. In this dev version, they seem to be handled similar to Optional *input* parameters, and are given NULL pointers.

Functions such as JS_ReaScriptAPI_Version, which use "Out" parameters will now only work in Lua if the function is provided with a dummy variable:
[code]
reaper.JS_ReaScriptAPI_Version(5)
I can confirm here too.
If I do
Code:
retval, lufsIntegrated = reaper.NF_AnalyzeTakeLoudness_IntegratedOnly(take, 5)
instead of
Code:
retval, lufsIntegrated = reaper.NF_AnalyzeTakeLoudness_IntegratedOnly(take)
it works.

edit:
Posted before I saw schwa's reply about the new build.
nofish is offline   Reply With Quote
Old 05-21-2019, 01:10 PM   #29
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,782
Default

Quote:
Originally Posted by schwa View Post
The API issue should be fixed with 5.978+dev0521a, which we just posted. Would you mind testing that?
Fixed for me with the test script from above, thanks.
Also

Quote:
+ API: support optional arguments in extension-supplied functions when called from ReaScript/Lua [t=219455]
tested with int*, correctly passed nullptr now (if parameter omitted in call), thanks.

Last edited by nofish; 05-21-2019 at 02:04 PM.
nofish is offline   Reply With Quote
Old 05-21-2019, 01:39 PM   #30
MRMJP
Human being with feelings
 
MRMJP's Avatar
 
Join Date: May 2016
Location: Milwaukee, WI USA
Posts: 1,792
Default

This seems fixed now on my end too.

Thanks for the quick native fix.
__________________
iMac Pro 3.0GHz 10-Core • 64GB RAM • SSD • MacOS 10.14.4
Mac Mini 3.2 GHz Intel Core i7 (6-Core) • 32GB RAM • SSD • MacOS 10.14.4
https://www.mysteryroommastering.com/ - https://www.justincarlperkins.com/
MRMJP is offline   Reply With Quote
Old 05-21-2019, 01:47 PM   #31
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,918
Default

It's all just code.
EvilDragon is online now   Reply With Quote
Old 05-21-2019, 01:54 PM   #32
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

"Draw edit ignoring snap" is fixed as well, thank you

There is still something off with "Move segment" obeying time selection, though. It does create points at the time selection edges, but the end point should not be moved away from the original value, so that after the time selection the original value is still valid:


This modifier doesn't seem to work at all when "Allow selecting a single event in a CC lane with a mouse click" (Mouse modifiers, CC lane context) is disabled.

I've got another issue with it that I might have failed to explain in the previous post. Move CC segment always works on all visible channels. It should obey the setting of the filter fields instead:
(channel 1 is yellow, channel 2 is blue)

Please move all channels only if this field is set to "All channels".

Note that, even if it's intended behavior (for whatever reason) that channel 2 events are moved in this szenario, there is an error at the time selection start of the blue events, it failed to create events on time selection edges for channel 2.
Attached Images
File Type: png move CC segment 2.png (11.4 KB, 553 views)
File Type: png move CC segment 3.png (14.5 KB, 549 views)
gofer is offline   Reply With Quote
Old 05-21-2019, 02:04 PM   #33
ovnis
Human being with feelings
 
ovnis's Avatar
 
Join Date: Oct 2011
Posts: 1,311
Default

Fast (CC lane is always displayed) - only 1 step:



Slow (CC lane is not always displayed) - 3 steps:

ovnis is offline   Reply With Quote
Old 05-21-2019, 02:21 PM   #34
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

Hmm, at least for you the end point is not moving. Going to check which setting makes it fail for me. Mine gets selected and moves with the segment.

I think, the 0-segment (without any existing points) doesn’t need to be shown, Reaper could just be smart and create a point (on the active channel) at time selection start in this situation. But I agree that this should work without having to create a segment for Reaper to understand what it should do in the first place.

EDIT: Thinking about it, my proposal above would probably collide with whatever is set for the same modifier in “CC lane” context... so it’s maybe really necessary to always show a 0-segment for the active channel if no events exist on the lane for this channel. Should be center for pitch and pan.

Last edited by gofer; 05-21-2019 at 02:37 PM.
gofer is offline   Reply With Quote
Old 05-21-2019, 02:25 PM   #35
ovnis
Human being with feelings
 
ovnis's Avatar
 
Join Date: Oct 2011
Posts: 1,311
Default

Quote:
I think, the 0-segment (without any existing points) doesn’t need to be shown,
The advantage with CC lane always displayed is the visual feedback. If the CC lane is set to 0 or 5, we should be able to see that.
ovnis is offline   Reply With Quote
Old 05-21-2019, 02:29 PM   #36
ovnis
Human being with feelings
 
ovnis's Avatar
 
Join Date: Oct 2011
Posts: 1,311
Default

In this exemple, we are not able to see the CC value inside the next MIDI item... It's not great to know the CC value.

ovnis is offline   Reply With Quote
Old 05-21-2019, 02:50 PM   #37
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

Yep, I agree, that’s not good. I’m too much concentrating on MPE so I didn’ t even notice. The current valid value should absolutely be visible across the entire track.
gofer is offline   Reply With Quote
Old 05-21-2019, 02:53 PM   #38
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,918
Default

Imagine this. No crash on right-click in piano roll/CC lane in dev0521a!
EvilDragon is online now   Reply With Quote
Old 05-21-2019, 03:00 PM   #39
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Posts: 397
Default

With the new "ramp-style" CCs, if you draw using "Ignore Snap" are you getting maximum resolution? It seems a bit low-res even when zooming in a little bit...but maybe that's been the case the whole time?
ferropop is offline   Reply With Quote
Old 05-21-2019, 03:03 PM   #40
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,070
Default

Quote:
Originally Posted by EvilDragon View Post
Imagine this. No crash on right-click in piano roll/CC lane in dev0521a!
Maybe you had a customized menu that included an extension action that was crashing when it called the extension code to see if the menu item should be checked?
schwa 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:27 AM.


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