Skip to content

Commit

Permalink
Add color to item when using time-stretch glue
Browse files Browse the repository at this point in the history
  • Loading branch information
chmaha committed Oct 13, 2023
1 parent 30eaf54 commit f4d3f1b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Binary file modified PDF_Guide/ReaClassical User Guide.pdf
Binary file not shown.
6 changes: 4 additions & 2 deletions ReaClassical/ReaClassical.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@description ReaClassical
@author chmaha
@version 23.22pre5
@version 23.22
@changelog
Fix time-stretching by unlocking pasted items before the main operation.
Revert time sig/tempo removal due to REAPER fix
Fix time-stretching by unlocking pasted items before the main operation
Use color of original items when using time-stretch glue
@metapackage
@provides
[main] ReaClassical_Add Destination IN marker.lua
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function sync_routing_and_fx()
remove_track_groups()
local ret = add_track_groups()
if not ret then return end


local first_track = GetTrack(0, 0)
SetOnlyTrackSelected(first_track)
Expand All @@ -157,7 +158,7 @@ function sync_routing_and_fx()
local select_children = NamedCommandLookup("_SWS_SELCHILDREN2")
Main_OnCommand(select_children, 0) --SWS_SELCHILDREN2
local copy_folder_routing = NamedCommandLookup("_S&M_COPYSNDRCV2")
Main_OnCommand(copy_folder_routing, 0) -- copy folder track routing
Main_OnCommand(copy_folder_routing, 0) -- copy folder track routinga
Main_OnCommand(42579, 0) -- Track: Remove selected tracks from all track media/razor editing groups
local copy = NamedCommandLookup("_S&M_COPYSNDRCV1") -- SWS/S&M: Copy selected tracks (with routing)
Main_OnCommand(copy, 0)
Expand Down
11 changes: 11 additions & 0 deletions ReaClassical/ReaClassical_Insert with timestretching.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function main()
end
Main_OnCommand(40289, 0) -- Item: Unselect all items
local first_item = selected_items[0]

local item_color = GetMediaItemInfo_Value(first_item, "I_CUSTOMCOLOR")


SetMediaItemSelected(first_item, true)
Main_OnCommand(40034, 0) -- Item grouping: Select all items in groups
Main_OnCommand(41305, 0) -- Item edit: Trim left edge of item to edit cursor
Expand All @@ -73,6 +77,13 @@ function main()
Main_OnCommand(40362, 0) -- glue items
end
Main_OnCommand(41206, 0) -- Item: Move and stretch items to fit time selection

local num_of_items = CountSelectedMediaItems()
for i = 0, num_of_items -1, 1 do
local item = GetSelectedMediaItem(0, i)
SetMediaItemInfo_Value(item, "I_CUSTOMCOLOR", item_color)
end

state = GetToggleCommandState(1156)
if state == 0 then
Main_OnCommand(1156, 0) -- Options: Toggle item grouping and track media/razor edit grouping
Expand Down

0 comments on commit f4d3f1b

Please sign in to comment.