Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 07-13-2020, 05:07 AM   #1
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default Rendered mastermix to new track in project AND mute original tracks

All render options fully understood here but just want to see an action where original tracks are muted when rendered through mastermix / rendered file added to new track in project.
I just can't find this

thanks
permeke is offline   Reply With Quote
Old 07-13-2020, 11:17 AM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

So that means:

1) You render all tracks out.
2) the rendered file is inserted into a new track
3) All other tracks are muted?

It should be doable...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-13-2020, 11:50 AM   #3
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

Ok, you can try the following script. It requires Ultraschall-API(link in my signature) to work.
I could also add automatically switching on the add rendered file to project-setting, if you wish.

Code:
-- Meo-Ada Mespotine - 13th of July 2020 - licensed under an MIT-License
-- renders a project out, adds the rendered track to the project and mutes all tracks not added to the project

dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

Trackstring=ultraschall.CreateTrackString_AllTracks() -- get all tracks from current project
reaper.Main_OnCommand(40015,0)                           -- open Render to File-dialog


function main2()
  -- check, whether the project is still rendering. If the render is finished, and a track has been added, mute all the "unadded tracks"
  -- otherwise, just end the script
  if reaper.EnumProjects(0x40000000)==nil then 
    Trackstring2=ultraschall.CreateTrackString_AllTracks()
    if Trackstring~=Trackstring2 then 
      ultraschall.ApplyActionToTrack(Trackstring, 40730) 
      return
    else
      return
    end
  else 
    reaper.defer(main2) 
  end
end

function main()
  -- check, whether a project is rendering and if not, if the Render to File-dialog is closed.
  -- if a project is rendering, go to the function main2, otherwise end the script
  if reaper.EnumProjects(0x40000000)~=nil then 
      reaper.defer(main2)
  elseif ultraschall.GetRenderToFileHWND()==nil then
    return
  end
  reaper.defer(main)
end

main() -- run the first function
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 07-13-2020 at 11:57 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-13-2020, 01:03 PM   #4
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default

Hey Man , Thanks for the fast reply .
Yes , that's exactly what I need.
I know nothing about building action scripts but will try to integrate what you supplied.

cheers
permeke is offline   Reply With Quote
Old 07-13-2020, 01:23 PM   #5
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

Quote:
Originally Posted by permeke View Post
Hey Man , Thanks for the fast reply .
Yes , that's exactly what I need.
I know nothing about building action scripts but will try to integrate what you supplied.

cheers
No problem, but please do me a favor and don't call me man, as by my signature
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-13-2020, 01:27 PM   #6
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default

It works but the source tracks stay unmuted .
Also possible to close all 2 render popup windows ?

thanks
permeke is offline   Reply With Quote
Old 07-13-2020, 02:21 PM   #7
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
No problem, but please do me a favor and don't call me man, as by my signature
Sorry Meo-Ada
permeke is offline   Reply With Quote
Old 07-13-2020, 03:42 PM   #8
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default

or even better , after rendering and put on new track: freeze all source tracks and put in folder track.
permeke is offline   Reply With Quote
Old 07-14-2020, 01:47 AM   #9
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

Could you make a screenvideo of what it does and then you manually set the mutestates correctly as you wanted it?
And do the freezing as well so I see, what exactly you want.

You can use LiceCap for this, which is by the Reaper developers.

Closing the renderwindows automatically is possible.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-14-2020, 02:15 AM   #10
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default

ok, I will do a licecap.

Was playing with it last night and one time I hade the source tracks muted after rendering.
I don't know what I did differently.
By Freezing I mean there's a function in the track menu that does that . Render/freeze tracks


dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")-- Meo-Ada Mespotine - 13th of July 2020 - licensed under an MIT-License
-- renders a project out, adds the rendered track to the project and mutes all tracks not added to the project.

Here's what I have now.

dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

Trackstring=ultraschall.CreateTrackString_AllTrack s() -- get all tracks from current project
reaper.Main_OnCommand(40015,0) -- open Render to File-dialog


function main2()
-- check, whether the project is still rendering. If the render is finished, and a track has been added, mute all the "unadded tracks"
-- otherwise, just end the script
if reaper.EnumProjects(0x40000000)==nil then
Trackstring2=ultraschall.CreateTrackString_AllTrac ks()
if Trackstring~=Trackstring2 then
ultraschall.ApplyActionToTrack(Trackstring, 40730)
return
else
return
end
else
reaper.defer(main2)
end
end

function main()
-- check, whether a project is rendering and if not, if the Render to File-dialog is closed.
-- if a project is rendering, go to the function main2, otherwise end the script
if reaper.EnumProjects(0x40000000)~=nil then
reaper.defer(main2)
elseif ultraschall.GetRenderToFileHWND()==nil then
return
end
reaper.defer(main)
end

main() -- run the first function
permeke is offline   Reply With Quote
Old 07-14-2020, 04:39 AM   #11
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,628
Default

When posting code, it's best to wrap it in [code]-brackets(or select the code and click the #-button of this editor) so the code is readable and retains the formatting.

Otherwise parts of the code could get missing or replaced.

To clarify, what the code does:
It looks, which tracks are existing before the rendering and, after rendering is finished, it looks for the track, that has been added.
It will mute all(!) the former and keep unmuted the latter.

Maybe this isn't necessarily what you want, so maybe I need more an explanation what the source-tracks are. The selected ones? Or all existing?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-14-2020, 11:08 AM   #12
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 589
Default

[QUOTE=

Maybe this isn't necessarily what you want, so maybe I need more an explanation what the source-tracks are. The selected ones? Or all existing?[/QUOTE]


My Licecap doesn't seems to work. I shows my blank desktop.
It would be nice if the selected items are muted after rendering.

Last edited by permeke; 07-14-2020 at 11:32 AM.
permeke is offline   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 10:36 PM.


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