Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 03-19-2015, 09:08 AM   #41
amoretam
Human being with feelings
 
Join Date: Oct 2011
Posts: 515
Default

Quote:
Originally Posted by X-Raym View Post
@amoretam
Yes you need last ore release version for Lua script. WIll add this onfo on my website
(edit: in fact you don't need the LATEST pre-release, but with it, you will be sure it works!)

Thanks for your support!
Sorry. I know nothing about scripts and stuff.. would you please point me in the dirsction of Lua Script and how to install?

Thanks alot
amoretam is offline   Reply With Quote
Old 03-19-2015, 10:12 AM   #42
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Quote:
Originally Posted by X-Raym View Post
I used BR_EnvAlloc which seems to work fine,
but all I get from BR_EnvGetProperties is nil value.
Could you please take a look and tell me what I missed ? I'm sure it is a small thing but I can find it...
I can't get it working too :/ Looks like it has something to do with lua implementation...reported it on preforum

Even this simple example fails to work properly:
Code:
envPtr   = reaper.GetSelectedEnvelope(0)
envelope = reaper.BR_EnvAlloc(envPtr, true)
reaper.BR_EnvFree(envelope, false)

Last edited by Breeder; 03-19-2015 at 10:26 AM.
Breeder is offline   Reply With Quote
Old 03-19-2015, 10:42 AM   #43
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

@amoretam
I will make it very short.
We can consider than scripts are actions in individual files.
You can load them in REAPER as described on my scripts collection linked in my signature.
If you see than a script is written in Lua, it means that you would need REAPER pre-releases to make it work (Lua is a language that is not implemented in REAPER 4). They are not reserved to advanced users, but I will not encourage you to use a pre-release version for your casual work, as you will not get any support for these, and that they can have non-desired behavior. It is development version, so that users can test it and tell if there is error or not.
There is nothing to install to make a script work, except if written in Python, which is not the case of these envelope scripts.
If you stay with REAPER 4, you will be able to use most of EEL scripts without problems.

@Breeder
Thanks Breeder!
I will follow updates on this subject, as I want to use br_env for some future envelope script.
Cheers!
X-Raym is offline   Reply With Quote
Old 03-19-2015, 01:15 PM   #44
amoretam
Human being with feelings
 
Join Date: Oct 2011
Posts: 515
Default

Quote:
Originally Posted by X-Raym View Post
@amoretam
I will make it very short.
We can consider than scripts are actions in individual files.
You can load them in REAPER as described on my scripts collection linked in my signature.
If you see than a script is written in Lua, it means that you would need REAPER pre-releases to make it work (Lua is a language that is not implemented in REAPER 4). They are not reserved to advanced users, but I will not encourage you to use a pre-release version for your casual work, as you will not get any support for these, and that they can have non-desired behavior. It is development version, so that users can test it and tell if there is error or not.
There is nothing to install to make a script work, except if written in Python, which is not the case of these envelope scripts.
If you stay with REAPER 4, you will be able to use most of EEL scripts without problems.

@Breeder
Thanks Breeder!
I will follow updates on this subject, as I want to use br_env for some future envelope script.
Cheers!
Ok, these mean that I will not be able to use the "Copy visible armed envelope of last touched track and paste to selected tracks" and such???

Also, .. does this mean that Reaper 5 will not have any of these Post-production features by default??

Thanks
amoretam is offline   Reply With Quote
Old 03-19-2015, 01:23 PM   #45
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

@amoretam
Quote:
does this mean that Reaper 5 will not have any of these Post-production features by default??
Unless they are secretly working on it, no.
That why I coded these scripts!
X-Raym is offline   Reply With Quote
Old 04-26-2015, 09:36 AM   #46
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default Update

  • X-Raym_Delete envelope points preserving edges if time selection.lua
Code:
 * Changelog:
 * v1.2 (2015-04-26)
    + Better edges preservation
This new version really preserve edges, not matter what
The previous version add troubles if there was several points on the edges of time selection.

Last edited by X-Raym; 04-26-2015 at 09:50 AM.
X-Raym is offline   Reply With Quote
Old 08-21-2015, 03:03 PM   #47
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 144
Default reaper.BR_EnvAlloc unknown error

Hello,
first of all thank you for your marvellous work! Here is my problem: today i tried to use your "Copy points envelopes in time selection and paste them at edit cursor"; that function could improve my workflow but I got this message, reported somewhere else:

"...nd paste at edit cursor preserving destination edges.lua:80: 'reaper.BR_EnvAlloc' is unknown"

Reaper V.5, Sws 1.8.

The only <strange> thing I should maybe report is that I'm still not using 5.0 but 4.7 because I have to close a big project started with 4.7 and I prefer to stay in my old "safe environment" until I will finish it. That said, I downloaded the latest SWS version and it conflicts with the last one (which I need for 4.7), but it says it just loaded the v. 2.8 ignoring the rest (but if I open the About SWS window it says that the current loaded version is 2.7). To be clear, I'm of course trying your Script with Reaper 5.0.

I really don't know what to do because LUA and all the new scripting stuff is really new to me. What am I missing? Should I need download and install additional stuff?

Thank you a lot!

Greetings

SL
simonluca is offline   Reply With Quote
Old 08-21-2015, 03:11 PM   #48
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Yo are welcome !
hmmm.... It seems that when you tested you didn't have last SWS 2.8.0 and REAPER v5, because it is unable to recognize one function which needs both.
Can you please retry being sure to have these versions ?

If you can, make a screenscapture so I can be sure of the problem.
The syntax look good for me so it really look like a version issue.
X-Raym is offline   Reply With Quote
Old 08-22-2015, 02:02 AM   #49
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 144
Default

Quote:
Originally Posted by X-Raym View Post
Yo are welcome !
hmmm.... It seems that when you tested you didn't have last SWS 2.8.0 and REAPER v5, because it is unable to recognize one function which needs both.
Can you please retry being sure to have these versions ?

If you can, make a screenscapture so I can be sure of the problem.
The syntax look good for me so it really look like a version issue.
Oh Yes, I misread the SWS loading alert, It <didn't> load the last version. I had to delete the 2.7 Version which was the only working in Reaper 4.7 and now your script works... Thank you so much!

SL
simonluca is offline   Reply With Quote
Old 08-22-2015, 03:22 AM   #50
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 144
Default 1 Unespected behaviour and 1 bug (?) report

Ok, so I got the scripts working and I'm messing around with them a little bit, they are very powerful and useful, so again, thank you a lot. I'd like to report a couple of things:

There is a (maybe just for me?) unexpected behavior with "Copy Points envelopes in time selection and paste them at edit cursor". If you select one specific envelope lane it copy just this one instead all the "armed, visible envelopes". To make it work as expected you have to unselect the whole track, then reselect it and then run the script. Just selecting the track after you selected one envelope lane doesn't work.

Uhm, I don't know if I'm clear, so this is the sequence of actions you have to follow to understand what I mean:

Track with 2 armed visible envelopes
- select one envelope lane (for ex: Reaq LowPass Freq)
- Run the script
- It copies just the selected envelope
- Select the track
- Run the script
- It copies just the last selected envelope
- Unselect the track (or select another track), reselect it
- Run the script
- It works as expected.

"Delete Envelope points in time selection preserving edges": it doesn't work here. Message: lua:164: bad argument #3 to 'InsertEnvelopePoint' (number expected, got nil). And then it crashes Reaper. Little annotation: the action has also a little typo in the name "...edges IF time selection" instead of "...edges OF time selection".

Again, thank you for work, I hope that my reports are useful.

SL
simonluca is offline   Reply With Quote
Old 08-22-2015, 04:47 AM   #51
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Your bug report is indeed very useful, I will correct the big that crashes REAPER in a minute !

For the workflow here is how it works
1. It works on selected Envelope.
2. If no selected envelope, it works on visible armed envelope of selected track.

This is a way to make it work in on single action (like a regular action) or on several.
X-Raym is offline   Reply With Quote
Old 08-22-2015, 05:17 AM   #52
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Ok so I discover hat one of my functions updated recently has a mistake in it, some other scripts are involved but the good news is that I will correct it !

Stay tuned, but meanwhile, avoid the "if time selection" scripts !
X-Raym is offline   Reply With Quote
Old 08-22-2015, 05:46 AM   #53
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

So here are the scripts that have been updated :

  • Envelopes/Across Tracks/X-Raym_Set flat points value in time selection preserving edges if time selection.lua
  • Envelopes/Across Tracks/X-Raym_Set or Offset envelope points preserving edges if time selection.lua
  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from max to min preserving edges.lua
  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from min to max preserving edges.lua
  • Envelopes/On Tracks/X-Raym_Delete envelope points preserving edges if time selection.lua
  • Envelopes/On Tracks/X-Raym_Invert envelope points values preserving edges if time selection.lua
Tell me if you face any other problems.


Cheers !
X-Raym is offline   Reply With Quote
Old 08-22-2015, 06:02 AM   #54
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Also release two new scripts :

  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from min to min preserving edges.lua
  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from max to max preserving edges.lua
  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from center to center preserving edges.lua
X-Raym is offline   Reply With Quote
Old 08-22-2015, 09:54 AM   #55
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 144
Default

Quote:
Originally Posted by X-Raym View Post
So here are the scripts that have been updated :

  • Envelopes/Across Tracks/X-Raym_Set flat points value in time selection preserving edges if time selection.lua
  • Envelopes/Across Tracks/X-Raym_Set or Offset envelope points preserving edges if time selection.lua
  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from max to min preserving edges.lua
  • Envelopes/On Tracks/X-Raym_Add envelope points at time selection edges from min to max preserving edges.lua
  • Envelopes/On Tracks/X-Raym_Delete envelope points preserving edges if time selection.lua
  • Envelopes/On Tracks/X-Raym_Invert envelope points values preserving edges if time selection.lua
Tell me if you face any other problems.


Cheers !
Ok, you are officially the quickest problem solver around. You seriously rock!
About the action, a little thought: the power of your script is that it works on several envelopes and across tracks. There is already a "(single) envelope points copy and paste" basic function in reaper so I don't get the utility of having it also in your script. Am I missing something?

So: have a nice day!
simonluca is offline   Reply With Quote
Old 08-22-2015, 10:34 AM   #56
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Quote:
There is already a "(single) envelope points copy and paste" basic function i
You named it... It is too basic
It doesnt work on multiple tracks at once, and it doesnt sample points from time selection but from point selection.
Well, it is very different ! :P
X-Raym is offline   Reply With Quote
Old 07-03-2017, 01:25 PM   #57
Luster
Human being with feelings
 
Luster's Avatar
 
Join Date: Nov 2015
Posts: 642
Default

Good evening!

Quote:
Originally Posted by X-Raym View Post
  • X-Raym_Copy visible armed envelope points in time selection of last touched track and insert in selected
  • X-Raym_Copy visible armed envelope points in time selection of last touched track and paste to selected tracks.lua

Short question: What is the difference between inserting and pasting?
Luster is offline   Reply With Quote
Old 07-03-2017, 01:35 PM   #58
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

@Lutser
Hi !
Insert preserve curve outise the time selection. So slopes outside TS are left untouched.
With paste, it is not the case. the value from curos is put inside time selection, but this can change slope outside TS.



Subtile but different. INSERT is the usual solution. :P
X-Raym is offline   Reply With Quote
Old 07-03-2017, 01:38 PM   #59
Luster
Human being with feelings
 
Luster's Avatar
 
Join Date: Nov 2015
Posts: 642
Default

Ah, understood. Thanks! Man you are fast.
Luster is offline   Reply With Quote
Old 11-17-2020, 07:32 AM   #60
Fox the Reaper
Human being with feelings
 
Join Date: May 2018
Posts: 9
Default

And does this one:

"Copy visible armed envelope values at edit cursor and paste at time selection"

Does it exit somewhere? I can't find in my hopefully updated Actions...

This would be so nice to have!!
Cheerio and THX
Fox the Reaper is offline   Reply With Quote
Old 11-17-2020, 07:41 AM   #61
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Damn, CloudApp has change URL pattern, all my gif uploaded there are unacessible :S


Anyway I find and upload this particular script demo.


So it may simply have been rename with something more concized.


Check : Script: X-Raym_Copy envelope values at edit cursor and insert at time selection.lua
X-Raym is offline   Reply With Quote
Old 11-17-2020, 01:36 PM   #62
Fox the Reaper
Human being with feelings
 
Join Date: May 2018
Posts: 9
Default

Hello,

thanks so far. But this Action is just working for the selected track envelope. Just for the selected envelope. Would be nice if it would work for all visible and armed envelopes of the selected track. Like it shows up in the gif.

It make sense, cause you want to say, hey those fx-parameters of one fx or more, we want to have same later in this section exactly the same...

That would be awesome!
Fox the Reaper is offline   Reply With Quote
Old 11-17-2020, 02:17 PM   #63
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

if works on all visible armed envelope of selected rracks except if there is a selected envelope. Then it works only for that. Same design for all my track envelope scripts.
X-Raym is offline   Reply With Quote
Old 11-18-2020, 02:57 AM   #64
Fox the Reaper
Human being with feelings
 
Join Date: May 2018
Posts: 9
Default

Naice, thanks man!
Fox the Reaper is offline   Reply With Quote
Old 09-16-2022, 01:22 PM   #65
fricia
Human being with feelings
 
Join Date: Apr 2017
Posts: 119
Default

Hi, I have a question regarding "Delete envelope points preserving edges if time selection"

Isn't the intention to preserve each envelopes indivual edge points?



Seems like they the second envelope grabs the edge points of the first envelope.
Even weirder things happen, when more than one envelope type is in play:



If used on a single envelope all works as expected.

Am I doing something wrong or is this a bug?

Also just wanted to chime in and say THANK YOU X-Raym for your super awesome work! Not just on your scripts, but also your educational work regarding scripting!
fricia is offline   Reply With Quote
Old 09-16-2022, 02:50 PM   #66
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Hi !
thx for your feedback !


this script purpose isnt to add point at time selection. Just delete what is inside.


Also it worls o' selected envelope if any, or on selected tracks visible and armed envelope.


There is a version with 'preserving value at edges for your case I think :P
X-Raym 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 02:42 AM.


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