Old 02-13-2020, 11:36 AM   #1
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 74
Default script for show/ hide peaks in items ? interest ?

Would it be possible to write a script to toggle peak view in items ?
permeke is offline   Reply With Quote
Old 02-13-2020, 12:08 PM   #2
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 171
Default

No script needed here. You can use Cycle action from SWS
Then through "step" put two action:

Peaks: Remove all peak cache files
----- Step -----
Peaks: Rebuild all peaks

This will work for all items.
__________________
My scripts for rendering
Yanick is offline   Reply With Quote
Old 02-13-2020, 12:17 PM   #3
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 74
Default

well yes it works but much slower than prefs >"display peaks for media items" which is logical as they need to be rebuild. Besides the midi notes in items are still visible.

So a script that toggles that pref would be needed I guess.
permeke is offline   Reply With Quote
Old 02-13-2020, 12:51 PM   #4
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 171
Default

Here try
PHP Code:
if reaper.SNM_GetIntConfigVar('showpeaks',0) == 19 then
  reaper
.SNM_SetIntConfigVar('showpeaks'18)
else
  
reaper.SNM_SetIntConfigVar('showpeaks'19)
end

  
reaper
.UpdateArrange() 
__________________
My scripts for rendering
Yanick is offline   Reply With Quote
Old 02-13-2020, 12:59 PM   #5
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 171
Default

hmm, the default configuration does not have the numbers that I have. It is probably more difficult here.
__________________
My scripts for rendering
Yanick is offline   Reply With Quote
Old 02-13-2020, 01:01 PM   #6
Yanick
Human being with feelings
 
Yanick's Avatar
 
Join Date: May 2018
Location: Moscow, Russia
Posts: 171
Default

Another option
PHP Code:
if reaper.SNM_GetIntConfigVar('showpeaks'0) == 3 then
  reaper
.SNM_SetIntConfigVar('showpeaks'0)
else
  
reaper.SNM_SetIntConfigVar('showpeaks'3)
end

  
reaper
.UpdateArrange() 
__________________
My scripts for rendering

Last edited by Yanick; 02-13-2020 at 01:08 PM.
Yanick 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 12:46 PM.


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