 |
|
|
01-13-2021, 11:48 AM
|
#1
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Action for "clicking" a button into a plugin
Hello,
it is possible to create a custom action for something like "when I press a chosen key then a a button of a certain plugin is pressed (from off to on or viceversa)".
I don´t know if this is possible. I don´t need to control knobs or similar, just switch between two states of a parameter of a plugin using a custom action for that.
If not, any idea for getting something similar?
Thanks in advance
|
|
|
01-13-2021, 03:59 PM
|
#2
|
Human being with feelings
Join Date: Aug 2015
Posts: 1,324
|
Which parameter? which plugin? which track?
... are the things the action would need to know.
There's actions for doing things to the "last touched" fx.
Check out some of those (and in ReaPack)
The SWS extension has next/previous preset triggers.
Although showing a parameter as a knob would be by far the easiest way of doing it.
__________________
it's meant to sound like that...
|
|
|
01-13-2021, 04:35 PM
|
#3
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Thanks for replying.
I didn’t want to guve much more info in order to ask in a simple way.
But I can be more explicit, yes. Some plugins making tape stop effect has a button so when you click it the plugin stops audio slowly. That is what I want, to have an action so when I press a key that button is clicked.
That button is susceptible to be used as a parameter in reaper so I can linked it to an external midi controller and to another plugin’s button. But what I need is activate it by pressing a key through an action.
Any idea?
|
|
|
01-13-2021, 05:26 PM
|
#4
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,556
|
I'm almost certain this can at least be done with AutoHotkey
|
|
|
01-13-2021, 10:32 PM
|
#5
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Quote:
Originally Posted by valy
I'm almost certain this can at least be done with AutoHotkey
|
Thanks! Could you explain a bit more, please?
|
|
|
01-14-2021, 04:42 AM
|
#6
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,556
|
|
|
|
01-15-2021, 06:21 AM
|
#7
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Quote:
Originally Posted by valy
|
Thanks for link, but I guess I am dumb and don't understand it...
I need some other way maybe.
Any more ideas, please?
Last edited by babiuk; 01-15-2021 at 06:36 AM.
|
|
|
01-15-2021, 01:54 PM
|
#8
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
Quote:
Originally Posted by valy
I'm almost certain this can at least be done with AutoHotkey
|
Not necessary. You can do it with ReaScript.
|
|
|
01-15-2021, 01:57 PM
|
#9
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
Quote:
Originally Posted by babiuk
I didn’t want to guve much more info in order to ask in a simple way.
|
Sry, you're saying you don't want to share the name of the plugin? If you give the name and the parameter you want to control it's easy to do what you want through scripting.
|
|
|
01-15-2021, 04:10 PM
|
#10
|
Human being with feelings
Join Date: Jan 2020
Posts: 1,556
|
Quote:
Originally Posted by ErBird
Not necessary. You can do it with ReaScript.
|
hence the "at least"
|
|
|
01-16-2021, 03:43 AM
|
#11
|
Human being with feelings
Join Date: Jun 2019
Posts: 702
|
Quote:
Originally Posted by ErBird
Sry, you're saying you don't want to share the name of the plugin? If you give the name and the parameter you want to control it's easy to do what you want through scripting.
|
Sorry for hijacking but as you are stating this, it would be really helpful for me to have an action that presses “Import item from arrange” in reasamplomatic5000 to be used inside a custom action. Any idea how that could be done?
|
|
|
01-16-2021, 05:37 AM
|
#12
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Quote:
Originally Posted by ErBird
Sry, you're saying you don't want to share the name of the plugin? If you give the name and the parameter you want to control it's easy to do what you want through scripting.
|
Oh, no, sorry, no secret at all!
It is not an specific plugin , just one which does tape stop effect like Kilohearts one, Softube one, many ones..
When you are on playing audio on reaper and you press that button (Let us say on Kilohearts Tapestop plugin, where the button I am talking about is the classic triangle for "PLAY") sound stops like on tape machines, slowly. And if you press button again then it starts to sound slowly. It is a 2 states button.
My idea is make an action attached to a key(really they should be 2 keys) for that list of actions:
FIRST KEY FOR:
- "Start" on transport
- Pressing plugin button
That way it could start to play like on a tape machine. Of course we need to have the plugin on "off" state firstly.
SECOND KEY FOR:
- Pressing plugin button (so as to do "tape stop" effect)
- "stop" in transport.
That way I could get both start/stop effects.
Do you know how to implement this, please?
I would be so grateful.
PS: My first idea was applying this to the plugin being on "monitoring fx" rack so it does not affexct to audio renders, but I am afraid we can not control monitoring fx rack plugins, at least using "parameter link" way. So maybe it should be done using the plugin on master bus.
Last edited by babiuk; 01-16-2021 at 05:44 AM.
|
|
|
01-18-2021, 08:42 AM
|
#13
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
could you help me on this, please?
|
|
|
01-18-2021, 04:58 PM
|
#14
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
Quote:
Originally Posted by babiuk
could you help me on this, please?
|
Yeah, let me read over your posts. I'll respond later.
|
|
|
01-19-2021, 06:39 AM
|
#15
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Quote:
Originally Posted by ErBird
Yeah, let me read over your posts. I'll respond later.
|
Of course, thanks!
|
|
|
01-20-2021, 11:58 AM
|
#16
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
Let's start simple. This is how you would toggle a parameter in the monitoring fx chain.
As far as linking the parameter change to the playback state, are you sure you want two separate actions and not one play/stop toggle?
Lua Script:
Code:
fx_name = "ggain" --Enter your fx name here
param = 0 --Enter the parameter number (Count starts at zero)
track = reaper.GetMasterTrack(0)
fx = 0x1000000 + reaper.TrackFX_AddByName(track, fx_name, 1, 0)
_, param_name = reaper.TrackFX_GetParamName(track, fx, param, "")
state = reaper.TrackFX_GetParamNormalized(track, fx, param)
if state == 0 then
state = 1
else
state = 0
end
reaper.TrackFX_SetParamNormalized(track, fx, param, state)
|
|
|
01-20-2021, 12:07 PM
|
#17
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
Quote:
Originally Posted by Phazma
Sorry for hijacking but as you are stating this, it would be really helpful for me to have an action that presses “Import item from arrange” in reasamplomatic5000 to be used inside a custom action. Any idea how that could be done?
|
Have you checked out MPL's RS5k tools in ReaPack? There might be an action in there that does this.
Otherwise, I know “Import item from arrange” is possible via script.
|
|
|
01-20-2021, 02:01 PM
|
#18
|
Human being with feelings
Join Date: Jun 2019
Posts: 702
|
Quote:
Originally Posted by ErBird
Have you checked out MPL's RS5k tools in ReaPack? There might be an action in there that does this.
Otherwise, I know “Import item from arrange” is possible via script.
|
Yes I have messed more thoroughly with those some months ago and I remember that they did not work for my purpose. Probably it was because he only has scripts for importing to an RS5k instance on a track while I need to import to RS5k on an item. Here is a video of what I am doing:
https://vimeo.com/502766290
I wouldn't go into the details of what I am doing and why I am doing it this way because it would require a lengthy explanation (and I know there are alternatives but this still works best for me).
However if it was possible to have a script that works with items and
clicks "import item from arrange" in currently visible instance of RS5K and closes the FX chain window
I could merge my custom action with "Take: Switch items to next take" and the whole thing would work with one click and as I use this custom action quite often my workflow would feel smoother.
Btw. I guess the closing of the FX chain would also work with "SWS/S&M: Close all FX chain windows" as part of the custom action after this script, so probably all I really need is actually just
Script: click "import item from arrange" in currently visible instance of RS5K
|
|
|
Yesterday, 10:53 AM
|
#19
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Quote:
Originally Posted by ErBird
Let's start simple. This is how you would toggle a parameter in the monitoring fx chain.
As far as linking the parameter change to the playback state, are you sure you want two separate actions and not one play/stop toggle?
Lua Script:
Code:
fx_name = "ggain" --Enter your fx name here
param = 0 --Enter the parameter number (Count starts at zero)
track = reaper.GetMasterTrack(0)
fx = 0x1000000 + reaper.TrackFX_AddByName(track, fx_name, 1, 0)
_, param_name = reaper.TrackFX_GetParamName(track, fx, param, "")
state = reaper.TrackFX_GetParamNormalized(track, fx, param)
if state == 0 then
state = 1
else
state = 0
end
reaper.TrackFX_SetParamNormalized(track, fx, param, state)
|
Thanks, Erbird,
I have been trying to do it, my first time...
I copy that and paste into texedit and save as txt, later I change name to .lua file, yes?
I do it without altering your code, I loaded ggain plugin on masterbus and then went to action list and imported the lua file, reaper recognized lua script but when I clicked on run nothing happens. I tried changing the paramenter number (I mean "param = 0", I wrote 1 on first test later 2 and later 3) by deleting the lua file aqnd creating a new one with a different number and importing again (and I deleted the lua script on reaper action list before, every time).
BUt it does not do anything.
I am sure I am doing things badly, could you tell me what I am wrong on, please?
|
|
|
Yesterday, 11:01 AM
|
#20
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
That's weird, idk.
You can paste the text within reaper. In the action list, click new action, new Reascript.
And this will work for any plugin if you change "ggain" to something else. The parameter list is found by clicking the UI button in top right of your VST window.
|
|
|
Yesterday, 11:06 AM
|
#21
|
Human being with feelings
Join Date: Jan 2017
Location: Los Angeles
Posts: 654
|
Quote:
Originally Posted by babiuk
I loaded ggain plugin on masterbus
|
This is the problem I think.
The script acts on the monitoring fx. Either put ggain there or to act on the master bus, change this line:
Code:
fx = 0x1000000 + reaper.TrackFX_AddByName(track, fx_name, 1, 0)
to
Code:
fx = reaper.TrackFX_AddByName(track, fx_name, 0, 0)
If that works, it's just a couple more lines to control stop/start.
Last edited by ErBird; Yesterday at 11:13 AM.
|
|
|
Yesterday, 12:31 PM
|
#22
|
Human being with feelings
Join Date: Jun 2019
Posts: 702
|
Quote:
Originally Posted by Phazma
Script: click "import item from arrange" in currently visible instance of RS5K (valid for item FX)
|
Hey ErBird, any chance you might also help me with this one or is that rather time-consuming to do?
|
|
|
Yesterday, 12:32 PM
|
#23
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Quote:
Originally Posted by ErBird
This is the problem I think.
The script acts on the monitoring fx. Either put ggain there or to act on the master bus, change this line:
Code:
fx = 0x1000000 + reaper.TrackFX_AddByName(track, fx_name, 1, 0)
to
Code:
fx = reaper.TrackFX_AddByName(track, fx_name, 0, 0)
If that works, it's just a couple more lines to control stop/start.
|
thank you so much, I will do it now
|
|
|
Yesterday, 12:40 PM
|
#24
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Wow!!!
it works now with ggain, I saw that list of parameters on UI menu just shows gain while in "learn" menu you have gain, bypass and wet with numbers 0,1 and 2 as I have tested.
Now I will try to do it with other plugin, I will tell you right now. Thanks!!
|
|
|
Yesterday, 01:14 PM
|
#25
|
Human being with feelings
Join Date: Apr 2012
Posts: 121
|
Thanks a lot, it worked with Softube's Tape plugin.
Now what would next step be? My goal is setting a key as play/stop (like space is right now, is it was space then it would be better!) so when I press it then it does play/sstop thing pluds this plugin toogling.
I have just add a key for that action, so when I press it the script runs, but now I would need something extra which joins "script" and "play/stop" thing.
There should be a little delay time when stopping, between "script" and "stop" instructions so the fade out (which the plugin does from script's call) is listened and then stop acts, no need to be an exact delay(0,5s or more is ok)
And same about when starting to play, I mean first "play" and then "script"(because once "play" starts script makes the fade in)
Here you have a link to the screen video I made showing it works:
https://gofile.io/d/sOO3RL
Last edited by babiuk; Yesterday at 01:33 PM.
|
|
|
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 02:22 AM.
|