|
|
|
11-21-2017, 09:19 AM
|
#1
|
Human being with feelings
Join Date: Oct 2017
Posts: 27
|
Jump to next waveform start/end
Hi,
I'd like to move the cursor to the next waveforme start(red) or end(orange) on folder tracks like on the screenshot bellow.
https://imgur.com/a/IKRdp
Any function or action that can do that ? I still can't find it after a while.
Thanks!
|
|
|
11-24-2017, 01:18 AM
|
#2
|
Human being with feelings
Join Date: Sep 2014
Posts: 2,643
|
Type Transient in the Action search.
Try adjusting the Transient detection level.
|
|
|
11-24-2017, 09:56 AM
|
#3
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by modraw
Hi,
I'd like to move the cursor to the next waveforme start(red) or end(orange) on folder tracks like on the screenshot bellow.
|
The waveform on the folder track is just a visualization drawn on the fly, there are no actions or API functions related to navigating/manipulating that.
However if you mean the actual media items below the folder track, you might be able to do write a script to do what you want. (It could be tricky to write the algorithm to determine your desired time intervals, though...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Last edited by Xenakios; 11-24-2017 at 10:04 AM.
|
|
|
12-11-2017, 01:15 AM
|
#4
|
Human being with feelings
Join Date: Oct 2017
Posts: 27
|
Thanks guys, I was finally able to achieve this using a render and then the trim silence action.
|
|
|
12-11-2017, 07:37 PM
|
#5
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,875
|
Nice trick !
If you need a version which doesnt involve rendering, let me know, I already have the overlapping items on multitracks done for a region script :P
|
|
|
12-11-2017, 10:51 PM
|
#6
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Not sure about items in grouped tracks but this seems works for just selected items:
Code:
for key in pairs(reaper) do _G[key]=reaper[key] end
---------------------------------------------------
function spairs(t, order) --http://stackoverflow.com/questions/15706270/sort-a-table-in-lua
local keys = {}
for k in pairs(t) do keys[#keys+1] = k end
if order then table.sort(keys, function(a,b) return order(t, a, b) end) else table.sort(keys) end
local i = 0
return function()
i = i + 1
if keys[i] then return keys[i], t[keys[i]] end
end
end
---------------------------------------------------
function Modify(t)
local ret
-- sort t
local t0 = {}
for i = 1, #t do t0[t[i].pos] = t[i] end
local t={} for key in spairs(t0) do t [#t+1] = t0[key] end
-- mod
for i = #t, 2, -1 do
if t[i].pos and t[i-1].pos and t[i].pos < t[i-1].end_s and t[i].end_s > t[i-1].end_s then
t[i-1].end_s = t[i].end_s
t[i] = {}
ret = true
elseif t[i].pos > t[i-1].pos and t[i].end_s < t[i-1].end_s then
t[i] = {}
ret = true
end
end
-- clear empty
for i = #t, 1, -1 do if not t[i].pos then table.remove(t,i) end end
return t, ret
end
---------------------------------------------------
function NavEdges()
local cur_pos = GetCursorPositionEx( 0 )
-- gen table
local t = {}
for i = 1, CountSelectedMediaItems(0) do
it = GetSelectedMediaItem( 0, i-1 )
t[#t+1] = {pos = GetMediaItemInfo_Value( it , 'D_POSITION'),
end_s = GetMediaItemInfo_Value( it , 'D_POSITION')+GetMediaItemInfo_Value( it , 'D_LENGTH' )}
end
if #t < 2 then return end
-- modify t
repeat
local ret= false
t, ret = Modify(t)
until not ret
-- combine val
local edges = {}
for i = 1, #t do
edges[#edges+1] = t[i].pos
edges[#edges+1] = t[i].end_s
end
table.sort(edges, function(a,b) return a<b end)
-- seek next edge
for i = 1, #edges do
if edges[i] > cur_pos then SetEditCurPos( edges[i], true, false ) break end
end
end
---------------------------------------------------
NavEdges()
Last edited by mpl; 12-11-2017 at 11:00 PM.
|
|
|
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 08:47 AM.
|