|
|
|
02-13-2020, 11:36 AM
|
#1
|
Human being with feelings
Join Date: Dec 2019
Posts: 588
|
script for show/ hide peaks in items ? interest ?
Would it be possible to write a script to toggle peak view in items ?
|
|
|
02-13-2020, 12:08 PM
|
#2
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
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.
|
|
|
02-13-2020, 12:17 PM
|
#3
|
Human being with feelings
Join Date: Dec 2019
Posts: 588
|
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.
|
|
|
02-13-2020, 12:51 PM
|
#4
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
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()
|
|
|
02-13-2020, 12:59 PM
|
#5
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
hmm, the default configuration does not have the numbers that I have. It is probably more difficult here.
|
|
|
02-13-2020, 01:01 PM
|
#6
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
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()
Last edited by Yanick; 02-13-2020 at 01:08 PM.
|
|
|
02-13-2020, 01:16 PM
|
#7
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
"showpeaks" seems to be a bitmasked value (I have values >= 512)...maybe this would work:
Code:
local showpeaks = reaper.SNM_GetIntConfigVar("showpeaks", -1)
local display_peaks = showpeaks&1 == 1
if display_peaks then
reaper.SNM_SetIntConfigVar("showpeaks", showpeaks-1)
else
reaper.SNM_SetIntConfigVar("showpeaks", showpeaks+1)
end
reaper.UpdateArrange()
|
|
|
02-13-2020, 01:20 PM
|
#8
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
Here the number in reaper.ini depends on the type of peaks. The spectrogram, normal, etc. Now I look more closely
|
|
|
02-13-2020, 01:24 PM
|
#9
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
Quote:
Originally Posted by spk77
"showpeaks" seems to be a bitmask (I have values >= 512)...maybe this would work:
Code:
local showpeaks = reaper.SNM_GetIntConfigVar("showpeaks", -1)
local display_peaks = showpeaks&1 == 1
if display_peaks then
reaper.SNM_SetIntConfigVar("showpeaks", showpeaks-1)
else
reaper.SNM_SetIntConfigVar("showpeaks", showpeaks+1)
end
reaper.UpdateArrange()
|
Oh, hi! I want to ask about your script
Script: spk77_Copy stretch markers from selected item to other items in group.eel
There you need to add the GetTakeStretchMarkerSlope function. But I do not really understand eel
|
|
|
02-13-2020, 01:31 PM
|
#10
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
Quote:
Originally Posted by spk77
"showpeaks" seems to be a bitmasked value (I have values >= 512)...maybe this would work
|
Yes, right! You are ahead of me
|
|
|
02-13-2020, 01:34 PM
|
#11
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Yanick
Oh, hi! I want to ask about your script
Script: spk77_Copy stretch markers from selected item to other items in group.eel
There you need to add the GetTakeStretchMarkerSlope function. But I do not really understand eel
|
Hi!
That's a really old script...I haven't done anything with EEL for a while, but I can take a look. (GetTakeStretchMarkerSlope is also new for me )
|
|
|
02-13-2020, 01:39 PM
|
#12
|
Human being with feelings
Join Date: May 2018
Location: Moscow, Russia
Posts: 612
|
Quote:
Originally Posted by spk77
Hi!
That's a really old script...I haven't done anything with EEL for a while, but I can take a look. (GetTakeStretchMarkerSlope is also new for me )
|
I would be grateful It can be more accurately copy stretch markers
|
|
|
02-13-2020, 02:05 PM
|
#13
|
Human being with feelings
Join Date: Dec 2019
Posts: 588
|
Quote:
Originally Posted by Yanick
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()
|
hey Yanick. Thanks for that but what now ? I'm a simple musician not a programmer.
Should I make a text file of this ? and what .xt to use ?
thanks
|
|
|
02-13-2020, 02:21 PM
|
#15
|
Human being with feelings
Join Date: Dec 2019
Posts: 588
|
hey ! , thank you both for that lightning fast support.
Will try that out .
|
|
|
02-13-2020, 02:56 PM
|
#16
|
Human being with feelings
Join Date: Dec 2019
Posts: 588
|
It works !!!
Nice
|
|
|
02-14-2020, 12:40 AM
|
#17
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Here's another:
Toggle Display Peaks:
Code:
-- Toggle display peaks
reaper.SNM_SetIntConfigVar("showpeaks", reaper.SNM_GetIntConfigVar("showpeaks", -666)~1) --Peaks bitwise NOT, flip bit
reaper.UpdateArrange()
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
02-14-2020, 08:18 AM
|
#18
|
Human being with feelings
Join Date: Mar 2013
Posts: 181
|
What should I do to apply this script to only one selected item? Thank you very much..
|
|
|
02-14-2020, 09:12 AM
|
#19
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by PelF
What should I do to apply this script to only one selected item? Thank you very much..
|
I don't think you can. The script is turning ON/OFF a "Display Peaks" checkbox buried in the preferences. It's a global checkbox. I don't know of (or think there is) a way to do it per item.
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
02-14-2020, 09:21 AM
|
#20
|
Human being with feelings
Join Date: Dec 2019
Posts: 588
|
Quote:
Originally Posted by PelF
What should I do to apply this script to only one selected item? Thank you very much..
|
Why would you want it for just one item may I ask ?
|
|
|
02-14-2020, 10:25 AM
|
#21
|
Human being with feelings
Join Date: Mar 2013
Posts: 181
|
I use the "Set all selected video items to Ignore Audio" script from ReaPack, which turns off the audio in the video file. However, it cannot turn off display peaks. I would like to combine these two actions.
|
|
|
02-15-2020, 10:56 AM
|
#22
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Thonex
Here's another:
Toggle Display Peaks:
Code:
-- Toggle display peaks
reaper.SNM_SetIntConfigVar("showpeaks", reaper.SNM_GetIntConfigVar("showpeaks", -666)~1) --Peaks bitwise NOT, flip bit
reaper.UpdateArrange()
|
That's a better way to do it! I'm not good at manipulating bits
|
|
|
02-15-2020, 11:58 AM
|
#23
|
Human being with feelings
Join Date: Aug 2019
Location: beijing
Posts: 612
|
Quote:
Originally Posted by Thonex
Here's another:
Toggle Display Peaks:
Code:
-- Toggle display peaks
reaper.SNM_SetIntConfigVar("showpeaks", reaper.SNM_GetIntConfigVar("showpeaks", -666)~1) --Peaks bitwise NOT, flip bit
reaper.UpdateArrange()
|
Is it possible to toggle spectral peaks for selected item ?
|
|
|
02-15-2020, 04:16 PM
|
#24
|
Human being with feelings
Join Date: May 2018
Location: Los Angeles
Posts: 1,719
|
Quote:
Originally Posted by todoublez
Is it possible to toggle spectral peaks for selected item ?
|
I don’t think so. See my post 5 posts above.
__________________
Cheers... Andrew K
Reaper v6.80+dev0621 - June 21 2023 • Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
|
|
|
02-16-2020, 08:11 AM
|
#25
|
Human being with feelings
Join Date: Aug 2019
Location: beijing
Posts: 612
|
Quote:
Originally Posted by Thonex
I don’t think so. See my post 5 posts above.
|
:/ i see, thx for the info !
|
|
|
05-21-2022, 10:17 AM
|
#26
|
Human being with feelings
Join Date: May 2017
Posts: 186
|
Thanks a lot for this! Toggling peaks with a button is great.
|
|
|
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 03:17 PM.
|