Old 05-05-2019, 11:35 PM   #121
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

Quote:
Originally Posted by lb0 View Post
Can you specify how you ould like it to be?
Nothing special) just to it fits in MCP width)
Could you remove borders that goes inside around window and make buttons a little smaller and decrease vertical indents at Setup2?
Ivannn Bennnettt is offline   Reply With Quote
Old 05-06-2019, 04:05 AM   #122
cjewellstudios
Human being with feelings
 
Join Date: Sep 2017
Posts: 998
Default

Quote:
Originally Posted by lb0 View Post
Hi Charlie,

I think the main SetUp GUI lets you do this.

I'll think about how to go about this neatly if you are hoping to do it without the main GUI open.

I really need to revisit this - because I think there are much much better ways available now to do the repositioning using API's made available in Julian's API.

But as always - I have a list a mile long of things I need to do, thanks to the incredible things fellow scripters/programmers have brought to the table recently. So it's just a matter of getting round to it.

Cheers

EDIT: You could always take a look at the NEXT/PREV scripts themselves - towards the bottom you'll see a line like:

tpage = tpage + 1

tpage is the page you wish to display.

So you could make multiple identical scripts and simply change it to something like:

tpage = [fx slot number]

replacing [fx slot number] with the required fx slot number (obv.) eg. tpage = 4 - would open fx slot 5 (as it's 0 based)

This might work ok. Not sure 100% what it would do if you chose a page not available though (think it will just open the first fx slot).

EDIT2:

Editing the PREV one would probably open the last fx slot if you try to open a page beyond the last fx.
Hey Leon!

Editting the NEXT script didn't work as intended straight away. So I looked for that line in the OPEN script. That one was already setup with the line tpage = 0

So duplicating all the those and increasing that number by one each time works like a charm.

So awesome!

By the way, doing it this way, when you call say tpage 7 and there are only 4 fx on the track, it shows the 4th effect which is awesome.

I know it's just one line of code for 8 scripts but if you wanted to put it on the repository I can send them your way.

Thanks so much as always.
cjewellstudios is offline   Reply With Quote
Old 08-09-2019, 04:25 AM   #123
cjewellstudios
Human being with feelings
 
Join Date: Sep 2017
Posts: 998
Default

Hey Leon, Back again

If anybody sees the previous post and wants those scripts, PM me.

I usually use this script to flick through plugins one at a time each time bringing focus to the gui. Recently, I've been using Dan Worall's fake feedback trick and to really be intuitive you kinda have to see all three plugins. I've managed to figure out how to float them by name all at the same time. What I'd like to do is take the floating plugins from the selected track and place them where I want them. I'm sure using any of of those algorithms you put together for multiple plugins would work great. I'm naively hoping there's a bit of code that looks at the floating plugins for a selected track and then snaps them into position. My hunch is that it doesn't really work like that but I know you would be the man to ask.
cjewellstudios is offline   Reply With Quote
Old 08-10-2019, 02:31 AM   #124
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

Hi Cjewellstudios
Could you show what you mean?
Ivannn Bennnettt is offline   Reply With Quote
Old 08-10-2019, 06:48 AM   #125
cjewellstudios
Human being with feelings
 
Join Date: Sep 2017
Posts: 998
Default

Quote:
Originally Posted by Ivannn Bennnettt View Post
Hi Cjewellstudios
Could you show what you mean?
Gladly! But I've said alot of stuff in the past couple posts so which part (or parts) of what I said can I clear up?
cjewellstudios is offline   Reply With Quote
Old 08-10-2019, 01:36 PM   #126
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by cjewellstudios View Post
Hey Leon, Back again

If anybody sees the previous post and wants those scripts, PM me.

I usually use this script to flick through plugins one at a time each time bringing focus to the gui. Recently, I've been using Dan Worall's fake feedback trick and to really be intuitive you kinda have to see all three plugins. I've managed to figure out how to float them by name all at the same time. What I'd like to do is take the floating plugins from the selected track and place them where I want them. I'm sure using any of of those algorithms you put together for multiple plugins would work great. I'm naively hoping there's a bit of code that looks at the floating plugins for a selected track and then snaps them into position. My hunch is that it doesn't really work like that but I know you would be the man to ask.
Hi Charlie,

Sorry was away on holiday with the worst internet connection known to man (well - not really - but it was painful - like being back 20 years on dialup! lol).

I'm not sure you'd be able to get the current algo's for the floating fx positioner to do what you want easily. What it currently does is work out the size of each fx on the track - then position them all according to the position settings you've chosen in one go. Then it simply shows and hides the visible plugins for each page as you cycle through them.

It would somehow need to know beforehand which plugins you want to float as a group (as opposed to all the track fx plugins) - and then position them according to what you want - so you'd need to position them manually then it would need to be able to store these locations for recall when you select the track. This is quite different to how it currently works.

Of course - Reaper already remembers where you place each plugin (the fx positioner overrides this) - so really you want a way to show/hide just the plugins you want I guess - without any of the re-positioning?
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 08-10-2019, 02:38 PM   #127
cjewellstudios
Human being with feelings
 
Join Date: Sep 2017
Posts: 998
Default

Quote:
Originally Posted by lb0 View Post
Hi Charlie,

Sorry was away on holiday with the worst internet connection known to man (well - not really - but it was painful - like being back 20 years on dialup! lol).

I'm not sure you'd be able to get the current algo's for the floating fx positioner to do what you want easily. What it currently does is work out the size of each fx on the track - then position them all according to the position settings you've chosen in one go. Then it simply shows and hides the visible plugins for each page as you cycle through them.

It would somehow need to know beforehand which plugins you want to float as a group (as opposed to all the track fx plugins) - and then position them according to what you want - so you'd need to position them manually then it would need to be able to store these locations for recall when you select the track. This is quite different to how it currently works.

Of course - Reaper already remembers where you place each plugin (the fx positioner overrides this) - so really you want a way to show/hide just the plugins you want I guess - without any of the re-positioning?
1. I remember dial up Wowzers! Look how far we've come!

2. Just as I suspected, I was thinking too much on the surface (i.e. it sort of does this, why can't it do what I want it to do? lol)

I found a script on the forums that floats plugins by name, it's in EEL though. Anyways I made 3 versions of it, each one looking for the specific plugin name (i.e. SC EQ, SC PRECOMP, REACOMP) and I put them all in a custom action. and boom they all open up. Great They just open up wherever though, and if I was using this script before attempting that custom action, they would all open on top of eachother.

So I guess what I'm saying is, for it to work with your algo's, you could look for those specific names? Or perhaps look at whats floating already? Not sure what's possible. But really I was just hoping for this be almost no work for you so please don't bother yourself, this was just a silly request. I will eventually put on my big boy pants and learn how to script
cjewellstudios is offline   Reply With Quote
Old 08-12-2019, 03:26 AM   #128
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

Quote:
Originally Posted by cjewellstudios View Post
Gladly! But I've said alot of stuff in the past couple posts so which part (or parts) of what I said can I clear up?
Never mind though I've remembered the Dan Worall's fake feedback trick
But if you have other cool tricks on Floating FX Positioner I'd like to see
Ivannn Bennnettt is offline   Reply With Quote
Old 08-12-2019, 04:30 AM   #129
cjewellstudios
Human being with feelings
 
Join Date: Sep 2017
Posts: 998
Default

Quote:
Originally Posted by Ivannn Bennnettt View Post
Never mind though I've remembered the Dan Worall's fake feedback trick
But if you have other cool tricks on Floating FX Positioner I'd like to see
Yes Dan is the man! I love using that setup now.

So my "trick" is this.

I have fx positioner show one plugin at a time and then I made 8 different versions of the open script that look at tPages 1-8. In this case tPage= fx slot. Here are those scripts:

https://drive.google.com/file/d/1-BA...ew?usp=sharing


I also right clicked on the setup script somewhere (sorry, I forgot where lol) to disable the focus arrange part of the script. This way the focus stays on the floating plugin. This part is great if you are using another one of Leon's creations Smart Knobs (which controls the plugin that has focus)
cjewellstudios is offline   Reply With Quote
Old 08-13-2019, 03:48 AM   #130
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 305
Default

Quote:
Originally Posted by cjewellstudios View Post
Yes Dan is the man! I love using that setup now.

So my "trick" is this.

I have fx positioner show one plugin at a time and then I made 8 different versions of the open script that look at tPages 1-8. In this case tPage= fx slot. Here are those scripts:

https://drive.google.com/file/d/1-BA...ew?usp=sharing


I also right clicked on the setup script somewhere (sorry, I forgot where lol) to disable the focus arrange part of the script. This way the focus stays on the floating plugin. This part is great if you are using another one of Leon's creations Smart Knobs (which controls the plugin that has focus)
Thank you!
I'll check that out)
Could you do some GIFs on that?
Ivannn Bennnettt is offline   Reply With Quote
Old 08-17-2019, 06:57 AM   #131
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

Is it possible to trigger saved preset by action/keycommand?
Skorobagatko is offline   Reply With Quote
Old 12-10-2019, 03:30 PM   #132
Link0126
Human being with feelings
 
Link0126's Avatar
 
Join Date: Jul 2010
Posts: 1,268
Default

Trying to use these scripts and getting this error when I run the Setup or any of the other ones:

LBX_FXFloatPos_SetUp.lua:7: unexpected symbol near '<'

Using Reaper 6. Does this need to be updated or something?
Link0126 is offline   Reply With Quote
Old 12-10-2019, 03:49 PM   #133
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by Link0126 View Post
Trying to use these scripts and getting this error when I run the Setup or any of the other ones:

LBX_FXFloatPos_SetUp.lua:7: unexpected symbol near '<'

Using Reaper 6. Does this need to be updated or something?
Did you download as raw from github? If you don't you get random errors like that sometimes.

Alternatively - simply select all the code text from the github webpage and copy into a new reascript lua file.

I've not upgraded to 6 yet - but I don't foresee any issues with that as it is working ok on the latest 5.9x versions and there's no big leap between that and 6.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-11-2019, 08:26 AM   #134
Link0126
Human being with feelings
 
Link0126's Avatar
 
Join Date: Jul 2010
Posts: 1,268
Default

Quote:
Originally Posted by lb0 View Post
Did you download as raw from github? If you don't you get random errors like that sometimes.

Alternatively - simply select all the code text from the github webpage and copy into a new reascript lua file.

I've not upgraded to 6 yet - but I don't foresee any issues with that as it is working ok on the latest 5.9x versions and there's no big leap between that and 6.
Ok, thanks! Yeah, it seems to be working now. I must have downloaded them the wrong way. Not really familiar with Github.
Link0126 is offline   Reply With Quote
Old 03-15-2020, 09:39 PM   #135
juliuskrakow
Human being with feelings
 
Join Date: Apr 2017
Location: Los Angeles
Posts: 64
Default Setup not working in v6.05

Hey lb0,
Thanks for your work on this.
I've been using the scripts to open selected track's fx on my 2nd monitor. I'm using 4 monitors and with the 2nd being to the left of my main monitor, I've had to use weird settings to get it to work, like negative values, but worked it has. Until recently that is...
I believe since I upgraded to v6 I haven't been able to get the floating fx to open anywhere but on my main monitor. Any idea of how to fix this?
juliuskrakow is offline   Reply With Quote
Old 03-16-2020, 05:26 AM   #136
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by juliuskrakow View Post
Hey lb0,
Thanks for your work on this.
I've been using the scripts to open selected track's fx on my 2nd monitor. I'm using 4 monitors and with the 2nd being to the left of my main monitor, I've had to use weird settings to get it to work, like negative values, but worked it has. Until recently that is...
I believe since I upgraded to v6 I haven't been able to get the floating fx to open anywhere but on my main monitor. Any idea of how to fix this?
Hi,

It's working ok here - win10 x64 - Reaper 6 x64 - 3 monitor setup.

You say weird settings - but this is normal - as it depends on where Windows (I'm assuming you're on windows - I don't have a Mac - so not sure how it works on that) has located each of the screens - so 0,0 might be top-left of one particular screen (your main one ? not sure - but is the case for me).

Then the other monitors will be located depending on how they are laid out in Windows display settings.

Has anything changed regarding your monitor layout?

You can get various tools (on Windows) which can help you locate the mouse x,y positions in a multi-monitor setup - something like Window Spy (comes with auto hot key). With this - you can put the mouse to the top left corner of each screen - and it will tell you the location of that mouse position in screen coordinates. You can use these coordinates to work out what you need to put in the floating positioner settings so you have the correct rectangle set up for the FX plugins to display.

Something I've never tested with is if you use virtual desktops on any of the screens for quick flipping between multiple desktops...
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 03-16-2020, 03:01 PM   #137
juliuskrakow
Human being with feelings
 
Join Date: Apr 2017
Location: Los Angeles
Posts: 64
Default

Sorry, should have included system specs. I'm on macOS 10.13.6, Reaper 64. Using Spaces extensively. Also using Jibapps Display to set resolutions.
I'm pretty sure nothing has changed in my monitor setup and I haven't upgraded my OS in a long time.
As you don't have a mac I understand it's hard for you to help out. I'm gonna try to dig deeper.

Thanks!
juliuskrakow is offline   Reply With Quote
Old 04-12-2020, 05:09 AM   #138
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default

Hi

I'm noticing that any tracks with Kontakt on take a good 4 seconds to open with the "Open" script (if I just click on the kontakt plug it opens quick).
The "Next Page" script has the usual pace and opens kontakt quickly if it's in the second place. In that case the plugin that comes first (before kontakt) opens slowly. If I blacklist the first plug then kontakt goes back to slow opening using the "open" script.

Is this just on my system or can the script be improved?

I'm on mac 10.13.6 using Kontakt 6.

Many thanks

Donation sent the other day by the way
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com

Last edited by Triode; 04-12-2020 at 05:28 AM.
Triode is online now   Reply With Quote
Old 04-12-2020, 05:23 AM   #139
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by Triode View Post
Hi

I'm noticing that any tracks with Kontakt on take a good 4 seconds to open with the "Open" script (if I just click on the kontakt plug it opens quick).
The "Next Page" script has the usual pace and opens kontakt quickly if it's in the second place.

I'm on mac 10.13.6 using Kontakt 6.
The problem is likely because to do the necessary work - the (Open) script has to analyze and/or edit the track chunk. Kontakt libraries make the track chunk enormous (especially if you load multiple instruments into a single Kontakt instance) - so any work using the chunk data takes quite a bit of extra time. If there was an API to quickly obtain the chunk data for each FX plugin - then it would work quicker - but there isn't (It has been requested several times by a number of script programmers). Just now - in order to get a particular FX chunk from the track chunk data - the entire chunk needs scanning.

The next and previous scripts use the data already set up by the Open script - so will indeed work quicker - but without the Open script none of it works.

I don't think there is a quick fix for Kontakt libraries. Thinking more outside the box and a complete script rewrite might make improvements.

I do need to revisit this script - as a lot of third party API's have since become available (JS API) - and even updates to the standard Reaper API - which may help with some things - but just at the moment I'm concentrating on another script - so any major changes to this one will have to wait a little.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 07-31-2020, 05:32 AM   #140
MisterGTR
Human being with feelings
 
Join Date: Dec 2017
Posts: 188
Default

Hi Leon

Thanks for the great work on the script.

I however (sorry) would like a whitelist rather than a blacklist.
i.e i only really want to use for XO (by XLN) which hangs if it doesn't open on the primary monitor. This is known issue (have asked XLN). Same thing happens with Kontakt.

So i looked through the script to see where blacklist was called. My first idea was that i would name tracks XO* and so put XO* in the blacklist file and then reverse IF statements.


But that doesn't sit well with me. Being a really bad hack. So i'm wondering if i created a whitelist file what would you change. If you can suggest it to me i'll work on it. It's been 20+ years since was scripting in VBA/VBS etc. So i'm a very rusty but i'm happy to do the work to make it work. Just need a little steer where to look and what would be the best files to edit to tackle it.

Thanks in advance.
MisterGTR is offline   Reply With Quote
Old 07-31-2020, 06:33 AM   #141
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by MisterGTR View Post
Hi Leon

Thanks for the great work on the script.

I however (sorry) would like a whitelist rather than a blacklist.
i.e i only really want to use for XO (by XLN) which hangs if it doesn't open on the primary monitor. This is known issue (have asked XLN). Same thing happens with Kontakt.

So i looked through the script to see where blacklist was called. My first idea was that i would name tracks XO* and so put XO* in the blacklist file and then reverse IF statements.


But that doesn't sit well with me. Being a really bad hack. So i'm wondering if i created a whitelist file what would you change. If you can suggest it to me i'll work on it. It's been 20+ years since was scripting in VBA/VBS etc. So i'm a very rusty but i'm happy to do the work to make it work. Just need a little steer where to look and what would be the best files to edit to tackle it.

Thanks in advance.
Hi - the table holding blacklisted fx names - is called fxblacklist.

This is used in several parts of the script - but it's been several years since I last looked at this so can not provide specific details on what you'd need to change in order to get the functionality that you want.

You'd need to look at the drawing routines which display the fx name list - as this will be affected by the list, as well as the actual function which performs the data processing for the positioning (Pass1).

I think in the Pass1 function - you may be able to just reverse the blacklist == false statements to blacklist == true.

Elsewhere - you're likely to need to work out what's going on a bit more - eg. In the DrawButtons function.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 07-31-2020, 06:39 AM   #142
MisterGTR
Human being with feelings
 
Join Date: Dec 2017
Posts: 188
Default

Quote:
Originally Posted by lb0 View Post
Hi - the table holding blacklisted fx names - is called fxblacklist.

This is used in several parts of the script - but it's been several years since I last looked at this so can not provide specific details on what you'd need to change in order to get the functionality that you want.

You'd need to look at the drawing routines which display the fx name list - as this will be affected by the list, as well as the actual function which performs the data processing for the positioning (Pass1).

I think in the Pass1 function - you may be able to just reverse the blacklist == false statements to blacklist == true.

Elsewhere - you're likely to need to work out what's going on a bit more - eg. In the DrawButtons function.
Thanks Leon

Because it's very specific it's probably better that i leave your script as is, as it's very useful, and create a specific version for XO. And when i say create...i mean with your permission copy and pasting your code. Thanks
MisterGTR is offline   Reply With Quote
Old 07-31-2020, 06:44 AM   #143
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by MisterGTR View Post
Thanks Leon

Because it's very specific it's probably better that i leave your script as is, as it's very useful, and create a specific version for XO. And when i say create...i mean with your permission copy and pasting your code. Thanks
Yes of course - all my code is released under GPL3 public license (I did notice I forgot to put that in the header for FX Positioner) - so please take what you need and do what you like with it.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 07-31-2020, 06:48 AM   #144
MisterGTR
Human being with feelings
 
Join Date: Dec 2017
Posts: 188
Default

Quote:
Originally Posted by lb0 View Post
Yes of course - all my code is released under GPL3 public license (I did notice I forgot to put that in the header for FX Positioner) - so please take what you need and do what you like with it.
Yeah i kinda guessed that. But it's nice to ask. Thanks again. It's nice to delve back into a bit of coding and your stuff is well written, so easy enough for someone like me to follow.
MisterGTR is offline   Reply With Quote
Old 06-12-2021, 01:18 PM   #145
Link0126
Human being with feelings
 
Link0126's Avatar
 
Join Date: Jul 2010
Posts: 1,268
Default

Quote:
Originally Posted by lb0 View Post
Well - I created a gif ready to post - but postimage won't upload it and it's too big to upload directly here...

Any other sites that allow free hosting of gifs to be pasted into message boards?

try X: direct link

https://media.giphy.com/media/26u49j...usy4/giphy.gif

ah well - it's tiny. if i can get it working later I'll try again...

This one works if you click to go to host website...

How do you dock the script window like that? I'm on OSX and have yet to find a way...
Link0126 is offline   Reply With Quote
Old 06-12-2021, 02:20 PM   #146
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by Link0126 View Post
How do you dock the script window like that? I'm on OSX and have yet to find a way...
As far as I remember - you dock the script in it's own docker - then click the ! button in the bottom corner of the docker and choose Attach docker position right.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 03-20-2022, 06:14 AM   #147
Punchipum
Human being with feelings
 
Punchipum's Avatar
 
Join Date: Apr 2021
Location: Mallorca, Spain
Posts: 234
Default

Hi. Very nice Script, but I want to use it to Open just a specific plugin and not for open all the plugins in the track.

I'm using this code to open my channel strip:

Quote:
local track = reaper.GetSelectedTrack(0,0)
if track then
for fx = 0, reaper.TrackFX_GetCount(track)-1 do
local _, name = reaper.TrackFX_GetFXName(track, fx, "")
if (name == 'VST3: bx_console SSL 4000 E (Plugin Alliance)')
then
reaper.TrackFX_Show(track, fx, 3) -- 3 = show as floating.
-- break
end
end
end
but I want that floating window with a fixed position in the middle of my screen. How can I do that?

THX!
Punchipum is offline   Reply With Quote
Old 03-21-2022, 03:19 AM   #148
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by Punchipum View Post
Hi. Very nice Script, but I want to use it to Open just a specific plugin and not for open all the plugins in the track.

I'm using this code to open my channel strip:



but I want that floating window with a fixed position in the middle of my screen. How can I do that?

THX!
Hi - for that I would create a table holding the bounds of the screen you want to centre on (certainly on windows if you have more than one monitor - then screen boundaries can be all over the place).

So something like

Code:
screenbounds = {x = 0, y = 0, w = 1920, h = 1080}
Then you would need to use JS API (Julian Sader's API) to get the window Hwnd for the window you wish to move and get the window dimensions.

Code:
wintitle = <function to get window title>
hwnd = reaper.JS_Window_Find(wintitle, true)

ret, left, top, right, bottom = reaper.JS_Window_GetRect(hwnd)
and also JS API to move the window to centre.

Code:
newx = math.floor(screenbounds.w/2 + screenbounds.x - (right-left/2))
newy = math.floor(screenbounds.h/2 + screenbounds.y - (bottom-top/2))
reaper.JS_Window_Move(hwnd, newx, newy)
So probably the hardest bit is getting the title of the window you want to move to use with JS_Window_Find.

I have a function which calculates the window title from a given track object and fx number:

Code:
  function GetFXWindowTitle(track, fxnum)
  
    local ret, fxname = reaper.TrackFX_GetFXName(track, fxnum, '')
    local trname = reaper.GetTrackState(track)
  
    local ttrn = reaper.GetMediaTrackInfo_Value(track, 'IP_TRACKNUMBER')
    local tmpname
    if ttrn == -1 then
      tmpname = fxname..' - Master Track'
    else
      tmpname = fxname..' - Track '..string.format('%i',ttrn)
      if trname ~= '' then
        tmpname = tmpname .. ' "'..trname..'"'
      end
    end
  
    local fd = reaper.GetMediaTrackInfo_Value(track, 'I_FOLDERDEPTH')
    if fd == 1 then
      tmpname = tmpname .. ' (folder)'
    end
    local bp = reaper.GetMediaTrackInfo_Value(track, 'I_FXEN')
    if bp == 0 then
      tmpname = tmpname .. ' [BYPASSED]'
    end
  
    local fxcnt = reaper.TrackFX_GetCount(track)
    if fxcnt > 1 then
      tmpname = tmpname .. ' [' .. string.format('%i',fxnum+1) .. '/' .. string.format('%i',fxcnt) .. ']'
    end
    
    return tmpname
  end

In my FX Positioner I used the chunk to set the window position - but I would say using JS API calls to do it is probably better/easier - certainly for single windows (but I think JS API wasn't available when I first created the FX Positioner).

The window would need to be visible before it can be moved.

You could also use some function to get the viewport (screen) coordinates automatically like JS_Window_GetViewportFromRect.

There are probably other ways to do all this - but these are the methods I would probably use to achieve what you are trying to do.


EDIT: Having written all this - there may be a native way to open a FX window centred on a screen - I'm not sure as it's not something I do. But from a coding point of view - I'd be doing it like above.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-25-2023, 03:36 PM   #149
GawidWill
Human being with feelings
 
GawidWill's Avatar
 
Join Date: Mar 2020
Posts: 6
Default Dock Script

How can I dock the setup script? In your video, it appears to be docked on the right side. However, I couldn't find any option to dock it.
GawidWill is offline   Reply With Quote
Old 12-25-2023, 05:32 PM   #150
DaniloVillanova
Human being with feelings
 
Join Date: Jan 2019
Posts: 245
Default

Quote:
Originally Posted by GawidWill View Post
How can I dock the setup script? In your video, it appears to be docked on the right side. However, I couldn't find any option to dock it.
Right click on the script window's header.
DaniloVillanova is online now   Reply With Quote
Old 12-25-2023, 07:18 PM   #151
GawidWill
Human being with feelings
 
GawidWill's Avatar
 
Join Date: Mar 2020
Posts: 6
Default

Quote:
Originally Posted by DaniloVillanova View Post
Right click on the script window's header.
Thanks for trying to help, but I've already tried that and I'm still not seeing anything. The only menu I see is when I right-click the setup button, but it doesn't have an option to dock the script. I'm on Mac OS.
GawidWill is offline   Reply With Quote
Old 12-26-2023, 03:22 AM   #152
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by GawidWill View Post
Thanks for trying to help, but I've already tried that and I'm still not seeing anything. The only menu I see is when I right-click the setup button, but it doesn't have an option to dock the script. I'm on Mac OS.
Yeah - on Windows - you simply right-click the script header and can dock it from the menu that appears. I'm sure there should be a way of docking script windows on Mac - but not being a Mac owner - I'm not sure.

A bit of googling around the cockos script forum suggests that docking needs to be explicitly added to the script code - which seems a bit of an odd omission to me.

If I get some time I'll see if I can add a docking option.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-26-2023, 12:12 PM   #153
GawidWill
Human being with feelings
 
GawidWill's Avatar
 
Join Date: Mar 2020
Posts: 6
Default

Quote:
Originally Posted by lb0 View Post
Yeah - on Windows - you simply right-click the script header and can dock it from the menu that appears. I'm sure there should be a way of docking script windows on Mac - but not being a Mac owner - I'm not sure.

A bit of googling around the cockos script forum suggests that docking needs to be explicitly added to the script code - which seems a bit of an odd omission to me.

If I get some time I'll see if I can add a docking option.
Thank you so much for your help. Your scripts have been a lifesaver and have significantly improved my workflow. Please take your time, and I appreciate your time.
GawidWill is offline   Reply With Quote
Old 12-26-2023, 12:31 PM   #154
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 2,161
Default

had completely forgotten about this Script.

The Stripper Script is the one I've used.

When time allows, I'll try to check this out.
RJHollins is offline   Reply With Quote
Old 12-28-2023, 07:43 AM   #155
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by GawidWill View Post
Thank you so much for your help. Your scripts have been a lifesaver and have significantly improved my workflow. Please take your time, and I appreciate your time.
Hi GawidWill,

I've updated both SetUp scripts (1 and 2) to include a dock option in the SetUp button right-click menu.

Let me know if this works

L.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-28-2023, 07:46 AM   #156
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by RJHollins View Post
had completely forgotten about this Script.

The Stripper Script is the one I've used.

When time allows, I'll try to check this out.
Hey RJ,

Just thought I'd drop you a note as you're here . Hope you're doing well.

L.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-28-2023, 09:05 AM   #157
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 2,161
Default

Quote:
Originally Posted by lb0 View Post
Hey RJ,

Just thought I'd drop you a note as you're here . Hope you're doing well.

L.
Hi lb0,

Doing well, my Friend. Thank-you.

Hope all is good with You and Family. Wish for the Best New Year !
RJHollins is offline   Reply With Quote
Old 12-28-2023, 09:19 AM   #158
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by RJHollins View Post
Hi lb0,

Doing well, my Friend. Thank-you.

Hope all is good with You and Family. Wish for the Best New Year !
Glad to hear it. Yep - all good here too thanks, and likewise - hope you have a great new year!
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-28-2023, 10:46 AM   #159
GawidWill
Human being with feelings
 
GawidWill's Avatar
 
Join Date: Mar 2020
Posts: 6
Default

Quote:
Originally Posted by lb0 View Post
Hi GawidWill,

I've updated both SetUp scripts (1 and 2) to include a dock option in the SetUp button right-click menu.

Let me know if this works

L.
Thank you, it works perfectly. You're the best! Have a great new year.
GawidWill is offline   Reply With Quote
Old 03-02-2024, 01:34 PM   #160
Rockum
Human being with feelings
 
Join Date: Apr 2009
Location: Nashville
Posts: 178
Default

I love this script. It allows me to work the way I've wanted to for at least 10 years.

I was wondering if you could give us a few more very small actions like you have with "next" and "previous" so that they can be assigned to buttons on a MIDI controller.

The ones I see being really useful would be:

• show (which would works the same as the show button in the GUI does now)
• hide (which would works the same as the hide button in the GUI does now)
• previous track same FX*
• next track same FX*

* If the FX exists on the track / If not, hide but allow "previous/next track same FX" to be rerun in search of the same FX

The last two would allow you to quickly move across the mix working on those specific effects that tend to be placed on most if not all tracks.

PS. I also learned that while the GUI version of "next" and "previous" allow for activating and bringing to focus plugins, the script files for "next" and "previous" open plugins but do not bring them to focus.
It would be nice if that were default or an option.

Last edited by Rockum; 03-03-2024 at 09:21 PM. Reason: Learned more about a few details...
Rockum is online now   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:06 PM.


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