Old 11-21-2017, 09:19 AM   #1
modraw
Human being with feelings
 
modraw's Avatar
 
Join Date: Oct 2017
Posts: 27
Default 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!
modraw is offline   Reply With Quote
Old 11-24-2017, 01:18 AM   #2
MusoBob
Human being with feelings
 
Join Date: Sep 2014
Posts: 385
Default

Type Transient in the Action search.
Try adjusting the Transient detection level.
MusoBob is offline   Reply With Quote
Old 11-24-2017, 09:56 AM   #3
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,408
Default

Quote:
Originally Posted by modraw View Post
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...)
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/

Last edited by Xenakios; 11-24-2017 at 10:04 AM.
Xenakios is offline   Reply With Quote
Old 12-11-2017, 01:15 AM   #4
modraw
Human being with feelings
 
modraw's Avatar
 
Join Date: Oct 2017
Posts: 27
Default

Thanks guys, I was finally able to achieve this using a render and then the trim silence action.
modraw is offline   Reply With Quote
Old 12-11-2017, 07:37 PM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,154
Default

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
X-Raym is offline   Reply With Quote
Old 12-11-2017, 10:51 PM   #6
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,139
Default

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()
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 12-11-2017 at 11:00 PM.
mpl 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 08:18 PM.


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