|
|
|
07-23-2021, 09:10 AM
|
#1
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Script: Keep only one floating fx open and centered in screen
Hi guys, I just added two new scripts to my ReaPack repository:
1. Keep only one floating fx open and centered in screen
2. Keep only one floating fx open at the same position (top left corner)
I rewrote them today to make them really light on CPU, let me know if there's any issues.
Warning: Don't run both scripts at the same time!
You can find the scripts on my github or download them using ReaPack:
Copy and paste this link into: Extensions > ReaPack > Import a repository
Code:
https://raw.githubusercontent.com/iliaspoulakis/Reaper-Tools/master/index.xml
Donation Link
|
|
|
07-23-2021, 10:12 AM
|
#2
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Bravo!
I'll give these a try
Thank you!
|
|
|
07-23-2021, 10:17 AM
|
#3
|
Human being with feelings
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
|
FTC FTC FTC FTC! thanks!
|
|
|
07-23-2021, 11:36 AM
|
#4
|
Human being with feelings
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
|
Thank you very much!
|
|
|
07-23-2021, 11:40 AM
|
#5
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
But is it really so difficult to add this feature natively? It should be easy. It seems there were a lot of requests. What's the catch? Need to detect a monitor when connecting multiple monitors? Basically, the user will open one plugin, then close and then open another. There may, of course, be another catch in the windowing policy in other operating systems besides OS windows, unfortunately I do not use these operating systems... And it is unlikely that there will be something scary if plugins overlap each other.
Last edited by Yanick; 07-23-2021 at 11:46 AM.
|
|
|
07-23-2021, 12:12 PM
|
#6
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
FTC the "Keep only one floating fx open at the same position" script is really great on the eyes here when floating a new FX.
The only thing that doesn't work so far is if you open a new project and then open a new FX. (I guess the variables are from the old project and don't match up) Instead of a new plug opening I get the error: 81: bad argument #1 to 'TakeFX_GetCount' (MediaItem_Take expected)
|
|
|
07-23-2021, 12:31 PM
|
#7
|
Human being with feelings
Join Date: Sep 2011
Posts: 198
|
This is great, but it would be nice to be able to pin some windows if you want to. Is that doable?
|
|
|
07-24-2021, 01:54 AM
|
#8
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Triode
FTC the "Keep only one floating fx open at the same position" script is really great on the eyes here when floating a new FX.
The only thing that doesn't work so far is if you open a new project and then open a new FX. (I guess the variables are from the old project and don't match up) Instead of a new plug opening I get the error: 81: bad argument #1 to 'TakeFX_GetCount' (MediaItem_Take expected)
|
Glad you like it I think it crashed because I didn't consider empty takes (the script also works with floating take/item fx). Let me know if it's still a problem with the updated version.
Quote:
Originally Posted by Yanick
But is it really so difficult to add this feature natively? It should be easy. It seems there were a lot of requests. What's the catch?
|
Really not sure. Hopefully it gets added soon.
Quote:
Originally Posted by Teddy
This is great, but it would be nice to be able to pin some windows if you want to. Is that doable?
|
Definitely doable, I could think of another action/script for the toolbar that toggles the pin status of the currently focused window. Could be quite a bit of work though, so I don't really want to add it atm. Let's see what the devs come up with in the next pre-release builds first.
|
|
|
07-26-2021, 01:42 PM
|
#9
|
Human being with feelings
Join Date: Sep 2011
Posts: 198
|
Quote:
Originally Posted by FeedTheCat
Definitely doable, I could think of another action/script for the toolbar that toggles the pin status of the currently focused window. Could be quite a bit of work though, so I don't really want to add it atm. Let's see what the devs come up with in the next pre-release builds first.
|
Great. Good to hear.
Would love to see it included native without scripts, so fingers crossed. But great work by you, anyhow. Thanks again.
|
|
|
07-26-2021, 02:33 PM
|
#10
|
Human being with feelings
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
|
Great! Thank you FTC.
|
|
|
08-13-2021, 02:01 AM
|
#11
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Hey FTC
I've been enjoying your script but I think there's a serious bug:
It resets the settings of a specific plugin that I have (vst version).
The plugin is Lindell 80 Channel. It happens with the vst version and not the vst 3 version. Are you able to confirm this?
I'm not sure if it happens with any other specific plugins yet.
Here's a licecap. It also happens when the script is already running when the project is open. The demo of this plugin is available from plugin alliance.
|
|
|
08-13-2021, 06:05 AM
|
#12
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Hey Triode,
I managed to replicate this, seems like it's not specific to this script though, it's a byproduct of using track chunks.
The following code will cause the same issue.
Code:
local track = reaper.GetSelectedTrack(0, 0)
local _, chunk = reaper.GetTrackStateChunk(track, '', false)
reaper.SetTrackStateChunk(track, chunk, false)
I just posted a bug report
|
|
|
08-14-2021, 07:13 AM
|
#13
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Thanks for chasing that up FTC
I've edited a script together that turns your script off if a project is opened that has that vst plug in the session and says how many instances there are.
If anyone needs it shout and I'll post it. (probably a bit specific for mass consumption! )
Looks like the process of getting the settings from the vst2 to vst3 version is gonna have to be manual though.
|
|
|
08-15-2021, 05:22 AM
|
#14
|
Human being with feelings
Join Date: Oct 2017
Location: Larisa, Greece
Posts: 3,827
|
Useful, thanks FTC!
|
|
|
08-15-2021, 08:03 AM
|
#15
|
Human being with feelings
Join Date: Jul 2009
Posts: 1,231
|
I love this. So useful, and I love that it will let me decide what screen it operates on. Love it! ❤
|
|
|
03-04-2022, 02:12 AM
|
#16
|
Human being with feelings
Join Date: Jul 2007
Posts: 726
|
Thanks for this. Been using it for a while (same position script).
I noticed I get some crackling/gui slow down sometimes, and it goes away when i turn it off.
Anyone else seeing this?
edit: it's likely happening when i move the plug to different position. Probably just the way it goes. Thanks.
|
|
|
03-04-2022, 04:10 AM
|
#17
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by dna598
edit: it's likely happening when i move the plug to different position. Probably just the way it goes. Thanks.
|
Yep, it only happens when you move the open fx window (the script updates the position of all other windows via chunk). Unfortunately there isn't really a way to avoid this. In the other script (centered), it only happens when you move the window to a new monitor.
|
|
|
03-04-2022, 05:06 AM
|
#18
|
Human being with feelings
Join Date: Jul 2007
Posts: 726
|
Quote:
Originally Posted by FeedTheCat
In the other script (centered), it only happens when you move the window to a new monitor.
|
ah nice one thanks again
|
|
|
03-09-2022, 10:33 AM
|
#19
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Hi FTC
Is it an easy mod to make this script only active when the mixer window is open? In a way that isn't more taxing on processing?
The reason being I use a different script when in the arrange window to open plugins and the two scripts work against each other there.
I'd have a go at making the change it's just deferred scripts do my head in!
Many thanks
|
|
|
03-10-2022, 08:03 AM
|
#20
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Triode
Hi FTC
Is it an easy mod to make this script only active when the mixer window is open? In a way that isn't more taxing on processing?
The reason being I use a different script when in the arrange window to open plugins and the two scripts work against each other there.
I'd have a go at making the change it's just deferred scripts do my head in!
Many thanks
|
Yep, that's fairly easy. Find the Main function in the code and add this right at the start:
Code:
function Main()
local is_mixer_visible = reaper.GetToggleCommandState(40078) == 1
if not is_mixer_visible then
reaper.defer(Main)
return
end
|
|
|
03-10-2022, 02:55 PM
|
#21
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Brilliant! That works nicely thankyou
|
|
|
05-01-2022, 03:07 AM
|
#22
|
Human being with feelings
Join Date: Jan 2015
Posts: 53
|
So useful ! Good work FTC !!!
Can I ask you to make a version where there will be no restrictions on the number of open FX's, just center opened floating fx in center?
I was looking for a similar script in Reapack, but I only find
- amagalma_Center in screen the floating FX or FX Chain
- mpl_Move focused Track FX to screen center
In both cases you need to Open FX - Select FX window - Activate Script.
|
|
|
05-01-2022, 04:11 AM
|
#23
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Ven Adams
So useful ! Good work FTC !!!
Can I ask you to make a version where there will be no restrictions on the number of open FX's, just center opened floating fx in center?
I was looking for a similar script in Reapack, but I only find
- amagalma_Center in screen the floating FX or FX Chain
- mpl_Move focused Track FX to screen center
In both cases you need to Open FX - Select FX window - Activate Script.
|
I think this behavior was added natively not to long ago. Try this:
- 1. Set Preferences > Plugins > Floating FX positioning > Modal default
- 2. Set Preferences > General > Advanced UI/system tweaks > Modal window positioning > Center on current screen.
|
|
|
05-01-2022, 04:25 AM
|
#24
|
Human being with feelings
Join Date: Jan 2015
Posts: 53
|
Quote:
Originally Posted by FeedTheCat
- 2. Set Preferences > General > Advanced UI/system tweaks > Modal window positioning > Center on current screen.
|
Thanks a lot for your help! Didn't know about this setting.
|
|
|
05-01-2022, 09:27 AM
|
#25
|
Human being with feelings
Join Date: Nov 2018
Posts: 660
|
What a fantastic little script! Love what you do. Thanks!
|
|
|
05-02-2022, 12:14 PM
|
#26
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
There's a scenario that doesn't work with this script.
Say you have a plugin open in one window set and another plugin open in another window set. When switching window sets with the script running, the plugin in the window set you switch to often moves to a corner (bottom left most of the time). I'm not sure if there's a way around this?
Edit: To be clear, this is the case with the "...at the same position" version of the script
|
|
|
05-03-2022, 03:37 PM
|
#27
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Triode
There's a scenario that doesn't work with this script.
Say you have a plugin open in one window set and another plugin open in another window set. When switching window sets with the script running, the plugin in the window set you switch to often moves to a corner (bottom left most of the time). I'm not sure if there's a way around this?
Edit: To be clear, this is the case with the "...at the same position" version of the script
|
Hmmm, I'll have a look when I find some time. Not sure if there's a good way to detect a window set change.
|
|
|
05-03-2022, 07:21 PM
|
#28
|
Human being with feelings
Join Date: Jul 2010
Location: New England
Posts: 34
|
Quote:
Originally Posted by FeedTheCat
2. Set Preferences > General > Advanced UI/system tweaks > Modal window positioning > Center on current screen.
|
Is there something else that needs to be set in order to get this to work generally on Win 10? It doesn't seem to work at all.
For example, with Reaper on Display 2, when I open the modal MIDI Editor window, it opens on Display 1 (i.e., the place it was last opened, which I believe is the default for this option). Same for the Preferences... window and any FX window I open. Regardless how I set that option, I always get the default setting behavior.
Suggestions greatly appreciated.
TIA,
__________________
U0
AMD 3900X / Win10 Pro / EW/QLSO, N-I Komplete / Reaper
Last edited by UserZero; 05-04-2022 at 10:23 AM.
|
|
|
05-08-2022, 03:18 AM
|
#29
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Quote:
Originally Posted by FeedTheCat
Hmmm, I'll have a look when I find some time. Not sure if there's a good way to detect a window set change.
|
I've sorted this by making my window set change key command toggle your script off, change the window set and then turn your script on on again.
|
|
|
06-18-2022, 11:48 AM
|
#30
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Update on the last post. Restarting the script works but in large sessions it slows down the window set change considerably.
I'm wondering if the script could write the last plugin window position to ExtState so that if the window set is changed any open plugin windows in the switched window set can use the same position?
It's a corner case I know. If anyone has the time to put this into the "Keep only one floating fx open at the same position" script I will donate - it's too complex for me
|
|
|
06-19-2022, 12:43 PM
|
#31
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Triode
Update on the last post. Restarting the script works but in large sessions it slows down the window set change considerably.
I'm wondering if the script could write the last plugin window position to ExtState so that if the window set is changed any open plugin windows in the switched window set can use the same position?
It's a corner case I know. If anyone has the time to put this into the "Keep only one floating fx open at the same position" script I will donate - it's too complex for me
|
The problem is that there isn't a really a way to detect screenset changes afaik. And if there was, the lag might still not be avoidable (it lags because the script is setting fx positions via chunking, which it would also need to do when changing screenset).
That said, I looked at the code and improved it a bit. If I'm thinking correctly it should now be a lot faster when changing screensets (assuming that you haven't created the screenset for that particular project, in which case... it's complicated...). Let me know if there's a noticeable difference
|
|
|
06-19-2022, 01:56 PM
|
#32
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Hi FTC
Thanks. I'll give it a try and let you know.
The initial problem was that if screenset 1 and 2 had a plugin open then changing between them meant that the plugin on the switched to screenset would get moved to a screen corner. As if the data about where the plugin window should be was lost. I imagined that if the position data was written to ExtState then it could be retained after switching (even if the screenset change itself can't be detected).
|
|
|
06-20-2022, 12:50 AM
|
#33
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Triode
Hi FTC
Thanks. I'll give it a try and let you know.
The initial problem was that if screenset 1 and 2 had a plugin open then changing between them meant that the plugin on the switched to screenset would get moved to a screen corner. As if the data about where the plugin window should be was lost. I imagined that if the position data was written to ExtState then it could be retained after switching (even if the screenset change itself can't be detected).
|
Hmmm, why extstate? You want to save the position when the script ends and reload when it opens? The current position is saved in a variable as long as the script runs.
The primary issue is that I can't differentiate if you move the window manually or the move is causes by a screenset.
I have an idea maybe. Do you use keyboard shortcuts to switch screensets?
|
|
|
06-20-2022, 01:02 AM
|
#34
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Quote:
Originally Posted by FeedTheCat
Hmmm, why extstate? You want to save the position when the script ends and reload when it opens? The current position is saved in a variable as long as the script runs.
The primary issue is that I can't differentiate if you move the window manually or the move is causes by a screenset.
I have an idea maybe. Do you use keyboard shortcuts to switch screensets?
|
Try making two window sets both with a different plugin window open and you'll find that the position values are lost when you switch window sets. I think when the script is running through a window set change, the values are lost because the plugin window gets moved to the side of the screen as if the values are zeroed out.
I do use a keyboard shortcut to switch screensets and I added in to this a command to turn your script off and on again during the change which cures the problem of plugin windows moving but even with your updated code this slows the window set change down on large sessions.
|
|
|
02-17-2023, 05:59 PM
|
#35
|
Human being with feelings
Join Date: Nov 2015
Location: Cologne
Posts: 1,640
|
super useful thanks! would be nice if we could make exceptions. especially: Doesn't affect Master Track Plugins
|
|
|
02-17-2023, 08:07 PM
|
#36
|
Human being with feelings
Join Date: Oct 2018
Posts: 262
|
thank you, feedthecat!
|
|
|
02-18-2023, 03:29 AM
|
#37
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Gass n Klang
super useful thanks! would be nice if we could make exceptions. especially: Doesn't affect Master Track Plugins
|
Hmm, exceptions for specific fx by name?
Quote:
Originally Posted by boolin
thank you, feedthecat!
|
Cheers
|
|
|
02-18-2023, 07:53 AM
|
#38
|
Human being with feelings
Join Date: Nov 2015
Location: Cologne
Posts: 1,640
|
Quote:
Originally Posted by FeedTheCat
Hmm, exceptions for specific fx by name?
|
exception for all fx that are on the master track would be nice I think. That way, we can leave the limiter and bus compression on a second screen.
|
|
|
02-18-2023, 07:09 PM
|
#39
|
Human being with feelings
Join Date: May 2019
Location: Berlin
Posts: 2,202
|
Quote:
Originally Posted by Gass n Klang
exception for all fx that are on the master track would be nice I think. That way, we can leave the limiter and bus compression on a second screen.
|
Ok cool, just added two new scripts to ReaPack.
|
|
|
02-18-2023, 09:29 PM
|
#40
|
Human being with feelings
Join Date: Oct 2018
Posts: 262
|
very helpful. thank you, ftc!
|
|
|
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 11:20 PM.
|