|
|
|
04-04-2020, 08:52 AM
|
#41
|
Banned
Join Date: Jul 2017
Posts: 192
|
Anybody?
|
|
|
04-04-2020, 09:17 AM
|
#42
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by MEMFIS_AKA
How can i upgrade code to ability insert FX on Master track?
|
try,...
Code:
FX = "ReaComp"
reaper.Undo_BeginBlock()
track = reaper.GetMasterTrack()
reaper.TrackFX_AddByName(track, FX, 0, -1 )
reaper.TrackFX_Show( track, reaper.TrackFX_GetCount( track ) - 1 , 3 )
reaper.Undo_EndBlock("Add new track FX instance - "..FX,-1)
|
|
|
04-04-2020, 01:09 PM
|
#43
|
Banned
Join Date: Jul 2017
Posts: 192
|
Quote:
Originally Posted by Edgemeal
try,...
Code:
FX = "ReaComp"
reaper.Undo_BeginBlock()
track = reaper.GetMasterTrack()
reaper.TrackFX_AddByName(track, FX, 0, -1 )
reaper.TrackFX_Show( track, reaper.TrackFX_GetCount( track ) - 1 , 3 )
reaper.Undo_EndBlock("Add new track FX instance - "..FX,-1)
|
Thanks! It's working for master.
But i wondering - can i upgrade my code to able insert on MCP AND Master when (MCP or Master Track) selected.
Mine add FX only to TCP
Your only to Master Track.
Plus i don't need to open and float just added FX =)
|
|
|
04-04-2020, 04:47 PM
|
#44
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by MEMFIS_AKA
Thanks! It's working for master.
But i wondering - can i upgrade my code to able insert on MCP AND Master when (MCP or Master Track) selected.
Mine add FX only to TCP
Your only to Master Track.
Plus i don't need to open and float just added FX =)
|
If you don't want to show the fx after its added then just remove that 'TrackFX_Show' line of code.
To add fx to master track only if selected, try,
Code:
local track = reaper.GetMasterTrack()
local master_sel = reaper.IsTrackSelected(track)
if master_sel then reaper.TrackFX_AddByName(track, FX, 0, -1) end
|
|
|
04-05-2020, 04:07 AM
|
#45
|
Banned
Join Date: Jul 2017
Posts: 192
|
Quote:
Originally Posted by Edgemeal
If you don't want to show the fx after its added then just remove that 'TrackFX_Show' line of code.
To add fx to master track only if selected, try,
Code:
local track = reaper.GetMasterTrack()
local master_sel = reaper.IsTrackSelected(track)
if master_sel then reaper.TrackFX_AddByName(track, FX, 0, -1) end
|
Doesn't work, brother. I select master track and nothing add's
|
|
|
04-05-2020, 04:08 AM
|
#46
|
Banned
Join Date: Jul 2017
Posts: 192
|
Work's like this ^_^
reaper.Undo_BeginBlock()
FX = "PLUGIN NAME"
TrackIdx = 0
TrackCount = reaper.CountSelectedTracks(0)
local track = reaper.GetMasterTrack()
local master_sel = reaper.IsTrackSelected(track)
if master_sel then reaper.TrackFX_AddByName(track, FX, 0, -1) end
while TrackIdx < TrackCount do
track = reaper.GetSelectedTrack(0, TrackIdx)
reaper.TrackFX_AddByName( track, FX, 0, -1 )
TrackIdx =TrackIdx+1
end
reaper.Undo_EndBlock("Add new track FX instance",-1)
|
|
|
04-05-2020, 08:25 AM
|
#47
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Ya, I wasn't trying to write the whole script for you.
Best you refer to the ReaScript documentation (REAPER Main Menu > Help > ReaScript documentation), once open in your web browser use its search to find keywords of functions, read what little documentation there is (if any), try to code each part of your script separately as you learn, test what works, then put it all together.
If you need help with scripting probably best to post them in the Developer Forum. I'm also not a guru coder!
|
|
|
07-06-2020, 08:42 AM
|
#48
|
Banned
Join Date: Jul 2017
Posts: 192
|
How can i avoid that ugly gaps and align my toolbar icons?
They are same width. When i set this up first it aligns perfect.
But somehow someway after i restart Reaper it's all messed up.
Last edited by MEMFIS_AKA; 07-06-2020 at 09:48 AM.
|
|
|
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:38 AM.
|