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

Reply
 
Thread Tools Display Modes
Old 11-24-2021, 06:31 AM   #1
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default Perform Scene (like recording from Session View to Arrange View)

Here the idea I want to share with the Reaper community.

Model: Each time selection (and loop) can get a scene (as a new
project) and we want to perform on this scene, for a longer duration
and want to record our performance flow with all automation recorded.


Concept
1. Any time selection of any .RPP can be regarded as a scene of your current project.
2. Automated custom action so you can perform this time selection and write all automation in this performance as a new file. This is like recording from Session View of Ableton Live into the Arrange View, but better, as all automations are saved as well.
3. You can repeat this process as often as you want.


Current state and used techniques
1. File: Save new version of project (automatically increment project
name)
Good is each new scene simply gets a numbered variant of original project. A project name with a number behind it means scene x. Example: project.RPP would get project_1.RPP (first scene), project_2.RPP (second scene).
2. Time selection: Crop project to time selection
3. Transport: Go to end of project
4. Track: Select all tracks
5. Global automation override: All automation in latch mode.
6. Script: js_Area selection - Duplicate items and automation in time selection of selected tracks to edit cursor.lua (I mapped this step 6 to F10)
... (repeat as frequently as you want)





What can be improved is adding a way of specifying the length of the result. Like repeat until 8 minutes are reached. Or repeat until 64 bars are reached. Or repeat 32 times.
see https://forum.cockos.com/showpost.ph...12&postcount=4 thanks Poul!

Assigning this custom action to a key binding will allow you performing this scene, saved as a new file. Any project can have as many scenes as variants you will find on your hard disk. Later those could be reused, but this would be another story. Hope is useful to the interested. Improvement suggestions are always welcome. Thanks and have fun.

Last edited by TonE; 11-27-2021 at 04:14 PM. Reason: UPDATE: changed the order of actions, removed last action
TonE is offline   Reply With Quote
Old 11-28-2021, 10:44 AM   #2
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

If anyone wants to try it, there you go:

PHP Code:
--[[
@
description TonE perform scene
@author TonE
The idea of this script is creating your chorus 
or loop1bar or 8bars, as full as you likethen in one click copying into arrangement so you can perform on your hardware controllersgenerating a feeling based flowin real-timeNot using mouse and clicks in arrangeno copy paste thereThis the computer did already for us fullyWe want to add the feeling side. While playing the whole thing perform to your desireMuteunmutefade outfade inmomentary toggle your crazy real-time fx. Use boreg's fantastic switchable MIDI transpose jsfx, for real-time transposing your sequences on the fly. I am using four of those per track with the octave settings -2, -1, +1, +2. You never know which sound can sound coolest on which octave. Midi-map its internal bypass parameter to four momentary buttons. Beat-repeat, delay, reverb, chorus and what not. Have fun friends. Reaper as a feeling machine. 
--]]

local no_undo = false
pluginName = "Perform Scene"

function main()
    reaper.Undo_BeginBlock()
    local last_act = reaper.Undo_CanUndo2(0)

    reaper.Main_OnCommand(41895, 0) -- File: Save new version of project (automatically increment project name)
    reaper.Main_OnCommand(40049, 0) -- Time selection: Crop project to time selection
    reaper.Main_OnCommand(40043, 0) -- Transport: Go to end of project
    reaper.Main_OnCommand(40296, 0) -- Track: Select all tracks
    reaper.Main_OnCommand(40881, 0) -- Global automation override: All automation in latch mode
    reaper.Main_OnCommand(reaper.NamedCommandLookup("_RS046c3a9a2e621a1ea58e6aac40b563161ccf67bd"), 0) -- Script: js_Area selection - Duplicate items and automation in time selection of selected tracks to edit cursor.lua

    local repeats = 64  -- making 64 bars from 1bar time selection
    for i = 1, repeats do
       reaper.Main_OnCommand(reaper.NamedCommandLookup("_RS046c3a9a2e621a1ea58e6aac40b563161ccf67bd"), 0) -- Script: js_Area selection - Duplicate items and automation in time selection of selected tracks to edit cursor.lua
    end

    reaper.Undo_EndBlock("Yeah, now".." "..pluginName, 0)
end

reaper.PreventUIRefresh(1)
main()
reaper.PreventUIRefresh(-1)
reaper.UpdateArrange()
if no_undo then reaper.defer(function() end) end  -- Prevent undo if necessary 
TonE is offline   Reply With Quote
Old 03-17-2022, 04:29 PM   #3
Dave 2099
Human being with feelings
 
Join Date: Dec 2017
Location: Maryland, USA
Posts: 185
Default

Hey TonE, thanks for sharing your code. I'm intrigued by your idea but I'm having a hard time figuring out how I can fit this into my workflow. Can you share a little more about how you use it?

Also, it seems like it might be useful to open the new scene/projects in a new tab.

Thanks!
Dave 2099 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 04:32 AM.


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