generated from cfillion/reapack-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added DoomSquirrel_Re-record bad take
- Loading branch information
1 parent
da03d72
commit 45363ef
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
-- @description DoomSquirrel_Re-record bad take | ||
-- @author DoomSquirrel | ||
-- @license GPL v3 | ||
-- @about | ||
-- # Re-record bad take | ||
-- Deletes last recording & re-records. This script is meant for quick re-recording of a take with just one hotkey. | ||
-- | ||
-- ### Does 2 different things, depending on the play state: | ||
-- #### If recording: | ||
-- - Stops recording, deletes the recorded media, starts recording again. | ||
-- #### If NOT recording: | ||
-- - Deletes current take from item, starts recording again. | ||
-- | ||
-- **Default Hotkey:** Backspace / F12 | ||
-- @repository | ||
-- https://github.com/tuomiorava/REAPER-ReaScripts | ||
-- @links | ||
-- Personal Website http://iki.fi/atolonen | ||
-- @donation | ||
-- Donate via PayPal https://www.paypal.com/donate/?hosted_button_id=2BEA2GHZMAW9A | ||
-- @version 1.0 | ||
-- @changelog | ||
-- Initial release | ||
|
||
local pstate = reaper.GetPlayState() | ||
|
||
if (pstate == 5) then | ||
-- if recording | ||
|
||
-- Transport: Stop (DELETE all recorded media) | ||
reaper.Main_OnCommand(40668, 0) | ||
|
||
-- Transport: Record | ||
reaper.Main_OnCommand(1013, 0) | ||
else | ||
-- if NOT recording | ||
|
||
-- -- Take: Delete current take from items | ||
-- reaper.Main_OnCommand(40129, 0) | ||
-- Take: Delete current take from items (prompt to confirm) | ||
reaper.Main_OnCommand(40130, 0) | ||
|
||
-- Transport: Record | ||
reaper.Main_OnCommand(1013, 0) | ||
end |