|
|
|
05-19-2019, 04:56 AM
|
#1
|
Human being with feelings
Join Date: Dec 2008
Posts: 78
|
Load Track Template by name
I’ve been searching in the SWS track template commands, and was wondering if there was such a functionality as this:
Create a blank track, name it ‘Violins - Legato’
Then run a SWS command to load the track template named ‘Violins - Legato’ which I saved earlier
This way I could load a huge orchestral template with simply the names on each empty track, then assign a key command to load that track template only when it is needed.
Even better would be to also autosave all the tracks at once as Track Templates with names matching the tracks.
Can it be done with the existing extensions or a custom script?
TLDR - A command to load the track template by matching the text name currently on the track
|
|
|
05-19-2019, 05:25 AM
|
#2
|
Banned
Join Date: Jul 2015
Posts: 391
|
Quote:
Originally Posted by Zamyen
I’ve been searching in the SWS track template commands, and was wondering if there was such a functionality as this:
Create a blank track, name it ‘Violins - Legato’
Then run a SWS command to load the track template named ‘Violins - Legato’ which I saved earlier
This way I could load a huge orchestral template with simply the names on each empty track, then assign a key command to load that track template only when it is needed.
Even better would be to also autosave all the tracks at once as Track Templates with names matching the tracks.
Can it be done with the existing extensions or a custom script?
TLDR - A command to load the track template by matching the text name currently on the track
|
See track templates in manual reaper can do what your asking without extensions.
|
|
|
05-19-2019, 05:42 AM
|
#3
|
Human being with feelings
Join Date: Dec 2008
Posts: 78
|
It’s possible to save the track template, yes.
It’s possible to load a track template from a file, yes.
But as far as I can see there is no key command/SWS action to load/reload the corresponding Track template from the Name of the empty track.
Last edited by Zamyen; 05-19-2019 at 05:55 AM.
|
|
|
05-19-2019, 09:17 AM
|
#4
|
Human being with feelings
Join Date: Dec 2008
Posts: 78
|
For anyone familiar with Cubase there it is possible to load a track from a track preset, then delete the VST (freeing memory) then clicking the Track Preset reload button to reinitialise the track.
The reason for doing it is when you have 100’s of tracks and can deactivate VST and save both loading times and also the size of the save file (VST state would be handled by the track presets so freeing up space in the project file).
Is there another way to do this? (Simply offlining or disabling the effect in Reaper doesn’t quite achieve this - it fixes the load time issue but not the save file bloat).
|
|
|
05-19-2019, 09:55 AM
|
#5
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
+1
Offloading vst data from the rpp files linking them to external fx chain files would the best thing to happen in REAPER 6.
|
|
|
05-19-2019, 04:18 PM
|
#6
|
Human being with feelings
Join Date: Dec 2008
Posts: 78
|
Thanks Heda, I noticed you have a very useful library of scripts you have created for Reaper.
Would you think it is possible for me to create such a script using Lua /API ?
The script would run this command:
Recurse through the selected tracks
Check the Track Template folder for a matching Track template with exact Name match (ie Track name + Reaper template file extension)
Load the Track Template for each track as defined
I am not sure if the API would support this, the only script I have written so far in Lua are processing Midi, but if it’s possible/feasible I will look into writing this. It seems like a reasonably reaperesque solution given it’s potential simplicity and leveraging the existing track templates if the load commands are exposed via Api.
|
|
|
05-19-2019, 06:01 PM
|
#7
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
it is not clear to me why you want to load a track template to an existing empty track...
the whole point of trk templates is you load them and get them as a new track....
if you want a key command to load a given saved trk template you can do that...
However you can also come kind of close to what you want to do... but it would be best to make a toolbar for it so you can give that names...
you'll have to edit the S&M.ini file to give you more 'slots' than the default it comes with... and then you will have to assign your trk templates to those slots, so each slot has a number...
then there will be a set of SWS/S&M actions in the heading of Resources in the actions list...
that are like.... Apply track template to select tracks slot1
etc, etc...
and also one that will prompt for the slot
you have to create the list of which trk templates are in which slot # in the S&M.ini file as well...
you want to look at that .ini file near the end of it... use Notepad++ as the text editor to work in it... IMO
hopefully this will get you started... check back if you need more
|
|
|
05-19-2019, 06:13 PM
|
#8
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
|
|
|
05-20-2019, 03:56 AM
|
#9
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
Yes it is totally possible Zamyen
making some progress
|
|
|
05-20-2019, 04:24 AM
|
#10
|
Human being with feelings
Join Date: Feb 2008
Location: Eesti
Posts: 2,721
|
Quote:
Originally Posted by hopi
it is not clear to me why you want to load a track template to an existing empty track...
the whole point of trk templates is you load them and get them as a new track....
|
Probably "Load FX chain by name to an existing track" could do something similar - if existed.
|
|
|
05-20-2019, 07:07 AM
|
#11
|
Human being with feelings
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
|
OK well if anyone can sort this out it will be HeDa....
|
|
|
05-20-2019, 03:12 PM
|
#12
|
Human being with feelings
Join Date: Dec 2008
Posts: 78
|
Thanks Heda, that looks brilliant.
Reading the other comments, if "Save All FX as chain" and "Load FX chain" are exposed in the API, this would be another solution instead of track templates (which introduce routing complications).
Are there such commands I wonder?
(I know they exist in the FX chain menu when clicking manually so there is always hope)
|
|
|
05-20-2019, 03:15 PM
|
#13
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
Quote:
Originally Posted by Zamyen
Thanks Heda, that looks brilliant.
Reading the other comments, if "Save All FX as chain" and "Load FX chain" are exposed in the API, this would be another solution instead of track templates (which introduce routing complications).
Are there such commands I wonder?
(I know they exist in the FX chain menu when clicking manually so there is always hope)
|
It works with FX Chains. I've published a working update to Track Templates script here https://forum.cockos.com/showpost.ph...&postcount=136
I may have to rename the script since it can also work with FX Chains (it was only track templates first) Maybe.. HeDaBrowser? I don't know.
There is FX Chain load API, but I haven't found FX Chain save. Unless it would be just saving the chunk data to the file, which would be slower but possible.
|
|
|
05-20-2019, 04:39 PM
|
#15
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
Quote:
Originally Posted by Zamyen
|
yes... It is always delicate to work with chunks. an API function would be the best and fastest. mpl is awesome
|
|
|
05-22-2019, 09:33 PM
|
#16
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 161
|
I'm using super-large templates, and this is what I do.
I create a track exactly as I want it - FX, samples, whatever. Then I have a custom action that does this:
Code:
Track: Mute tracks
Track: Set all FX offline for selected tracks
Track: Lock track controls
This removes all CPU load, and the "lock" action dims the track so it's obvious it's not active.
I can then search for any track in the Track Manager (eg "Vln I SHORTS") and with a button click I have another custom action that enables it.
Is there any reason this kind of thing isn't viable? I did the same thing in Cubase, except I used its native track enable/disable functionality.
|
|
|
05-22-2019, 09:37 PM
|
#17
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 161
|
Also - Track Templates can actually save an entire section (say, all Vln I) with all their bussing + FX etc - so you could break your template into sections and use the Media Explorer to load a section (the Media Explorer has track template search ability).
I know these are solutions that are slightly different than what you posted, but I'm dealing with the same issue and these approaches are working for me - YMMV.
|
|
|
05-22-2019, 11:44 PM
|
#18
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
Quote:
Originally Posted by TabbyCat
I
Is there any reason this kind of thing isn't viable? I did the same thing in Cubase, except I used its native track enable/disable functionality.
|
Yes, Reaper becomes really slow with more than 1000 tracks (the GUI gets sluggish).
Plus, the tracks aren't actually deactivated, they still consume some CPU.
Last edited by _Stevie_; 05-23-2019 at 12:50 AM.
|
|
|
05-23-2019, 02:18 AM
|
#19
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
Quote:
Originally Posted by TabbyCat
Is there any reason this kind of thing isn't viable? I did the same thing in Cubase, except I used its native track enable/disable functionality.
|
Even with plugins off loaded, the plugin data is still saved in the project which makes slow project saving times. That is why the idea is to off load the plugins to external fx chain.
Quote:
Originally Posted by _Stevie_
Yes, Reaper becomes really slow with more than 1000 tracks (the GUI gets sluggish).
Plus, the tracks aren't actually deactivated, they still consume some CPU.
|
With thousands of tracks it gets slow even without any plugins https://forum.cockos.com/showthread.php?t=220757
|
|
|
05-23-2019, 02:26 AM
|
#20
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
Exactly HeDa. 1000 empty tracks will already show the issue
|
|
|
05-23-2019, 02:31 AM
|
#21
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,269
|
but less than if the tracks have off-loaded plugins? I haven't tested. Still, project saving times will be worse with plugins off-loaded. That's for sure.
|
|
|
05-23-2019, 04:39 PM
|
#22
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
The lag is unfortunately still noticeable with such a huge amount of tracks.
And yeah, I concur, the loading and saving times are getting worse, as well.
Not to speak about the space that a project will take.
|
|
|
05-24-2019, 07:04 PM
|
#23
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
|
Some days ago I added version for loading FX chains by name with overriding online and bypass states (easier to modify) in loaded chunk, but I'm not at PC this week, so can't check.
Edit: oh and seems I forget to uncomment offline code in github so this is how it should looks like
Code:
-- @description Load selected tracks FX chains by name, offline mode
-- @version 1.0
-- @author MPL
-- @website http://forum.cockos.com/showthread.php?p=2137484
-- @changelog
-- + init
function ReplaceFXChunk(track, content)
local _, chunk = GetTrackStateChunk(track, '')
-- extract input FX chain
local rec_chain_chunk = ''
local rec_chain_cnt = TrackFX_GetRecCount( track )
if rec_chain_cnt ~= 0 then
local lastfxGUID = literalize( TrackFX_GetFXGUID( track, 0x1000000 + rec_chain_cnt -1 ))
rec_chain_chunk = chunk:match('<FXCHAIN_REC.*FXID '..lastfxGUID..'[\r\n]+WAK %d[\r\n]+>')
end
local full_chunk = chunk:match('<FXCHAIN.*WAK %d[\r\n]+>')
if not full_chunk then full_chunk = chunk:match('<FXCHAIN.*>') end
if rec_chain_cnt ~= 0 then full_chunk = chunk:match('<FXCHAIN.*WAK %d[\r\n]+>[\r\n]+>') end
local out_chunk = chunk:gsub(literalize(full_chunk),
[[
<FXCHAIN
WNDRECT 100 100 400 400
SHOW 0
LASTSEL 0
DOCKED 0
]]..
content..'\n'..
rec_chain_chunk..'\n'..'>' )
SetTrackStateChunk(track, out_chunk, false)
end
---------------------------------------------------------------------
function MakeChainOffline(content)
return content:gsub('BYPASS %d %d %d', 'BYPASS 0 1 0')
end
---------------------------------------------------------------------
function main()
-- check are tracks selected
local cnt_seltr = CountSelectedTracks(0)
if cnt_seltr == 0 then MB('There aren`t selected tracks', 'Error', 0) return end
-- ask for input path
local fsttr = GetSelectedTrack(0,0)
local ret, fsttr_name = GetTrackName( fsttr )
local retval, fn = reaper.GetUserFileNameForRead(fsttr_name..'.RfxChain', 'Select FX chain for selected track(s)', 'RfxChain' )
if not retval then return end
local search_path = GetParentFolder(fn)
for i = 1, cnt_seltr do
local track = GetSelectedTrack(0,i-1)
local ret, tr_name = GetTrackName( track )
if tr_name ~= '' then
local f = io.open(search_path..'/'..tr_name..'.RfxChain')
if f then
local content = f:read('a')
f:close()
content = MakeChainOffline(content)
ReplaceFXChunk(track, content)
end
end
end
end
---------------------------------------------------------------------
function CheckFunctions(str_func) local SEfunc_path = reaper.GetResourcePath()..'/Scripts/MPL Scripts/Functions/mpl_Various_functions.lua' local f = io.open(SEfunc_path, 'r') if f then f:close() dofile(SEfunc_path) if not _G[str_func] then reaper.MB('Update '..SEfunc_path:gsub('%\\', '/')..' to newer version', '', 0) else return true end else reaper.MB(SEfunc_path:gsub('%\\', '/')..' missing', '', 0) end end
--------------------------------------------------------------------
local ret = CheckFunctions('VF_CalibrateFont')
local ret2 = VF_CheckReaperVrs(5.95,true)
if ret and ret2 then main() end
Last edited by mpl; 05-24-2019 at 07:11 PM.
|
|
|
05-31-2019, 11:47 AM
|
#24
|
Human being with feelings
Join Date: Sep 2013
Posts: 657
|
@Zamyen and everyone interested in the topic:
I've added the track template applying ability to my "Quick add..." script in the new v1.2 update.
The applying can be done in two ways, one of which follows the OP request (see demo below).
Check out the update post and the script's thread for more information.
|
|
|
06-19-2019, 02:32 PM
|
#25
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 161
|
Quote:
Originally Posted by _Stevie_
Yes, Reaper becomes really slow with more than 1000 tracks (the GUI gets sluggish).
Plus, the tracks aren't actually deactivated, they still consume some CPU.
|
Quote:
Originally Posted by heda
With thousands of tracks it gets slow even without any plugins
|
I don't experience this - the sluggishness, nor the CPU. A 1000 (empty) track project loads in about 3-4 secs for me, and saves in even less time. The project file size is literally 550 kb.
I just tested with 120 Kontakt instances, all in dedicated processes and consuming 55Gb of RAM when fully loaded. When disabled using my technique above, Reaper is literally consuming .8% CPU in Win Task Manager (which is only .5% above its idle state with no tracks of any kind loaded). Load time again is 3 seconds.
Environment: Win10, Intel i9-7940x @3.10GHz, 64Gb RAM, nVidia GTX 1080.
Could the bottleneck be GPU? Does Reaper do its graphic rendering natively, or on the GPU?
|
|
|
06-19-2019, 02:42 PM
|
#26
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
That’s interesting. Curious what your Reaper settings look like.
GPU can be neglected, as Reaper does only use the CPU.
|
|
|
06-19-2019, 04:37 PM
|
#27
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 161
|
My Reaper settings are factory, except for Kontakt --> Dedicated process. I don't dare touch anything in the "buffering" page of the Preferences (yet) Should have mentioned I/O - it's an RME UCX @ 256 samples (48k). The Reaper executable + projects all come off (different) SSDs.
I will say that I am getting a really good load distribution (pic attached). I haven't seen anything run this balanced. Not sure if that is BIOS or what, but it might be related (GUI slowdowns/stutters or "phantom CPU" sometimes occurs in unbalanced environments under high-load).
I'm happy to share anything else specific, as it seems we're all trying to get insane track counts
|
|
|
06-28-2019, 05:22 PM
|
#28
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 161
|
Discovered this today, and I suspect it has something to do with my template performance:
Preferences --> Playback --> Run FX when stopped.
I have this UN-checked.
The tooltip implies that you won't be able to audition VSTi's with the transport stopped, but this is actually not the case - I can play any VSTi with the transport stopped, and at significant CPU savings. (When I enable it, my performance decreases significantly).
Worth having a look at in terms of large templates.
|
|
|
06-29-2019, 06:29 AM
|
#29
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
|
I remember this option but there was an issue, so I had to turn it on. Can’t recall what it was but maybe you will stumble across it.
|
|
|
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 09:54 AM.
|