Old 03-08-2018, 06:09 AM   #1601
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
Default

Quote:
Originally Posted by vanhaze View Post
Abit of a bummer that Reaper's native "reverse Item" Action doesn't work on a MIDI item (take).

Someone maybe knows if this is scriptable ?
Warm regards.
It is different things. Reverse item reverse source. Reversing MIDI messages is brake all the stuff (noteoff before noteon and such things).
mpl is offline   Reply With Quote
Old 03-08-2018, 07:04 AM   #1602
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Aha, thanks for the inside info mpl !
__________________
Macbook Pro INTEL | Reaper, always latest version | OSX Ventura | Presonus Studio 24c
My Reaper Tips&Tricks YouTube Channel: https://www.youtube.com/user/vanhaze2000/playlists
vanhaze is offline   Reply With Quote
Old 03-20-2018, 06:37 PM   #1603
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

As someone who likes to time his reverb (pre-delay and delay) as well as other fx (like the hz on a chorus) it would be amazing to have a script (or two individual ones) that tell you the value in ms or hz of the particular tempo it is actually in the song in the position you have the edit or time cursor in case the song has different tempo or time signature changes.

There are websites/apps that allow you to do this (i even made a excel file for the calculation) but it would be a lot faster and easier to just
click a button inside reaper

example:
120BPM 4/4
2 measures 4000.00 ms
1 measure 2000.00 ms
1/2• note 1500.00 ms
1/2 note 1000.00 ms
1/2T note 666.67 ms
1/4• note 750.00 ms
1/4 note 500.00 ms
1/4T note 333.33 ms
1/8• note 375.00 ms
1/8 note 250.00 ms
1/8T note 166.67 ms
1/16• note 187.50 ms
1/16 note 125.00 ms
1/16T note 83.33 ms
1/32• note 93.75 ms
1/32 note 62.50 ms
1/32T note 41.67 ms
1/64• note 46.88 ms
1/64 note 31.25 ms
1/64T note 20.83 ms

LFO rate calculator:
120 bpm 4/4
2 measures 0.25 Hz
1 measure 0.50 Hz
1/2• note 0.67 Hz
1/2 note 1.00 Hz
1/2T note 1.50 Hz
1/4• note 1.33 Hz
1/4 note 2.00 Hz
1/4T note 3.00 Hz
1/8• note 2.67 Hz
1/8 note 4.00 Hz
1/8T note 6.00 Hz
1/16• note 5.33 Hz
1/16 note 8.00 Hz
1/16T note 12.00 Hz
1/32• note 10.67 Hz
1/32 note 16.00 Hz
1/32T note 24.00 Hz
1/64• note 21.33 Hz
1/64 note 32.00 Hz
1/64T note 48.00 Hz
The-Zeronaut is offline   Reply With Quote
Old 03-21-2018, 03:45 AM   #1604
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

What about this ?

Https://stash.reaper.fm/v/7838/BPM%20Calculator
X-Raym is offline   Reply With Quote
Old 03-21-2018, 01:59 PM   #1605
The-Zeronaut
Human being with feelings
 
Join Date: Mar 2009
Posts: 308
Default

Quote:
Originally Posted by X-Raym View Post
Thanks!! i never even thought about the stash

I also found a script that is somehow incomplete but works
https://stash.reaper.fm/v/31651/getDelayFromBPM.lua

After a half hour of failed experiments i got it to also display 1/2, whole notes and two whole notes. (not bad for someone with absolute ZERO knowledge of this XD)

I wish i knew more about programming to make it also calculate according to the time signature
The-Zeronaut is offline   Reply With Quote
Old 03-27-2018, 03:07 AM   #1606
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 346
Default

Quote:
Originally Posted by geraintluff View Post
Hi - I've just started making tutorial videos for my JSFX, and there's one task I end up doing a lot, and I'd love to know if it's already an action (or if it could be).

The task is: split all items at the start and end of the current time selection, shrink all items in this range by some fixed factor (e.g. 3x), and move all future items back by an appropriate amount so that there's no longer a gap.
Bumping this - it would be really useful for me, and enable me to make more video guides/demos for my effects.

Last edited by geraintluff; 03-27-2018 at 03:26 AM.
geraintluff is offline   Reply With Quote
Old 03-27-2018, 06:06 AM   #1607
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by geraintluff View Post
Bumping this - it would be really useful for me, and enable me to make more video guides/demos for my effects.
I could try to do this, but how should items be shrank? I didn't quite get that
spk77 is offline   Reply With Quote
Old 03-28-2018, 01:16 AM   #1608
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 346
Default

Quote:
Originally Posted by spk77 View Post
I could try to do this, but how should items be shrank? I didn't quite get that
Here's a screen capture of me doing the edit by hand:
https://www.youtube.com/watch?v=S3AkC2iJMCY

I have a bunch of presets and project templates which make everything else pretty smooth, so this editing is now the most time-consuming part (aside from writing the script), and having it as a keyboard shortcut would be a life-saver!
geraintluff is offline   Reply With Quote
Old 03-28-2018, 07:21 AM   #1609
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by geraintluff View Post
Here's a screen capture of me doing the edit by hand:
https://www.youtube.com/watch?v=S3AkC2iJMCY

I have a bunch of presets and project templates which make everything else pretty smooth, so this editing is now the most time-consuming part (aside from writing the script), and having it as a keyboard shortcut would be a life-saver!
Thanks for the video!

I still have one question:
Is it necessary to time-stretch items (by changing playrates) instead of just setting their lengths to "1/3 of the time selection length"?
spk77 is offline   Reply With Quote
Old 03-28-2018, 08:36 AM   #1610
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 346
Default

Quote:
Originally Posted by spk77 View Post
Is it necessary to time-stretch items (by changing playrates) instead of just setting their lengths to "1/3 of the time selection length"?
Ideally, yeah - if I say something like "we can use these dials to get the sound we want" and then twiddle multiple things around or click between screens, it's good to show the changes I make in fast-motion, instead of just BAM ten dials jump at once.

If that's a load of work, fair enough. I can muddle through doing it by hand as before, it's just fiddly and time-consuming which doesn't make me excited about making more videos.
geraintluff is offline   Reply With Quote
Old 03-28-2018, 09:09 AM   #1611
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by geraintluff View Post
Ideally, yeah - if I say something like "we can use these dials to get the sound we want" and then twiddle multiple things around or click between screens, it's good to show the changes I make in fast-motion, instead of just BAM ten dials jump at once.

If that's a load of work, fair enough. I can muddle through doing it by hand as before, it's just fiddly and time-consuming which doesn't make me excited about making more videos.
That shouldn't be too much work

I still have to add code to reposition items (I'll post the script soon):
spk77 is offline   Reply With Quote
Old 03-28-2018, 09:30 AM   #1612
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,568
Default

Quote:
Originally Posted by geraintluff View Post
Here's a screen capture of me doing the edit by hand:
https://www.youtube.com/watch?v=S3AkC2iJMCY
so slow that way! Group your items!

drag to make time selection - run action "Item: Split items at time selection" (I use alt-s)

Then Script: X-Raym_Multiply selected items rate by X and adjust length.lua

for filling that gap I have a custom action assigned to a double-click modifier
https://reaperblog.net/2017/06/select-time-between/

you might also like this one

https://reaperblog.net/2017/03/area_select_actions/
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 03-28-2018, 12:36 PM   #1613
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

@geraintluff

Here's the script:
Code:
local reaper = reaper

-- Settings ------------------------------
local new_playrate = 3
local new_volume = -6 -- new volume in dBs
local overlap = 0.005 -- in seconds (cross-fade length)
------------------------------------------

function main()
  local time_sel_start, time_sel_end = reaper.GetSet_LoopTimeRange(false, false, 0, 0, false)
  local time_sel_len = time_sel_end - time_sel_start
  if time_sel_len == 0 then
    return
  end
  reaper.Undo_BeginBlock()
  reaper.Main_OnCommand(40289, 0) -- Unselect all items
  -- Split items at time selection
  -- (this action also selects the split items)
  reaper.Main_OnCommand(40061, 0)
  local sel_item_count = reaper.CountSelectedMediaItems(0)
  for i=1, sel_item_count do
    local sel_item = reaper.GetSelectedMediaItem(0, i-1)
    if sel_item then
      local tr = reaper.GetMediaItemTrack(sel_item) -- Get item parent track
      if tr then
        local item_number = reaper.GetMediaItemInfo_Value(sel_item, "IP_ITEMNUMBER")
        reaper.SetMediaItemInfo_Value(sel_item, "D_VOL", 10^(new_volume / 20))
        reaper.SetMediaItemInfo_Value(sel_item, "D_LENGTH", time_sel_len/new_playrate)
        reaper.SetMediaItemInfo_Value(sel_item, "D_FADEOUTLEN_AUTO", overlap) -- fade out
        -- Set new values for split item (and for all takes it has)
        for t=1, reaper.CountTakes(sel_item) do
          local take = reaper.GetMediaItemTake(sel_item, t-1)
          if take then
            reaper.SetMediaItemTakeInfo_Value(take, "D_PLAYRATE", new_playrate)
          end
        end
        -- Move later items
        for j=item_number+1, reaper.CountTrackMediaItems(tr)-1 do
          local item = reaper.GetTrackMediaItem(tr, j)
          if item then
            local item_pos = reaper.GetMediaItemInfo_Value(item, "D_POSITION")
            reaper.SetMediaItemInfo_Value(item, "D_POSITION", item_pos - time_sel_len + time_sel_len/new_playrate - overlap)
            if j == item_number+1 then
              reaper.SetMediaItemInfo_Value(item, "D_FADEINLEN_AUTO", overlap) -- fade in
            end
          end
        end
      end
    end
  end
  reaper.UpdateArrange()
  reaper.Undo_EndBlock("Trim items in time selection", -1)
end

main()

Last edited by spk77; 03-28-2018 at 12:44 PM.
spk77 is offline   Reply With Quote
Old 03-29-2018, 10:24 AM   #1614
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

@geraintluff
I'll change the code so that it moves items on every track. Currently it doesn't do that (see the gif from 7s ->).

Also, envelope points are not moved with items. Calling "Time selection: Remove contents of time selection (moving later items)" from the script would fix that and would be the easiest way.

Last edited by spk77; 03-29-2018 at 10:37 AM.
spk77 is offline   Reply With Quote
Old 03-29-2018, 03:22 PM   #1615
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 346
Default

Quote:
Originally Posted by spk77 View Post
@geraintluff
I'll change the code so that it moves items on every track. Currently it doesn't do that (see the gif from 7s ->).
Ah, good catch, I hadn't noticed.

Even the current version is absolutely brilliant and is going to save me a lot of time - thank you so much!
geraintluff is offline   Reply With Quote
Old 03-29-2018, 04:26 PM   #1616
geraintluff
Human being with feelings
 
geraintluff's Avatar
 
Join Date: Nov 2009
Location: mostly inside my own head
Posts: 346
Default

Quote:
Originally Posted by spk77 View Post
@geraintluff
I'll change the code so that it moves items on every track. Currently it doesn't do that (see the gif from 7s ->).
I hadn't written any Lua or ReaScripts before, but your code was readable and nicely commented, so I had a go!

This seems to solve the problem:

Code:
local reaper = reaper

-- Settings ------------------------------
local shrink_factor = 3
local new_volume = -6 -- new volume in dBs
local overlap = 0.005 -- in seconds (cross-fade length)
------------------------------------------

function main()
  local time_sel_start, time_sel_end = reaper.GetSet_LoopTimeRange(false, false, 0, 0, false)
  local time_sel_len = time_sel_end - time_sel_start
  if time_sel_len == 0 then
    return
  end
  reaper.Undo_BeginBlock()
  reaper.Main_OnCommand(40289, 0) -- Unselect all items
  -- Split items at time selection
  -- (this action also selects the split items)
  reaper.Main_OnCommand(40061, 0)
  
  for item_index=1, reaper.CountMediaItems(0) do
    item = reaper.GetMediaItem(0, item_index-1)
    local start = reaper.GetMediaItemInfo_Value(item, "D_POSITION")
    local length = reaper.GetMediaItemInfo_Value(item, "D_LENGTH")
    
    -- Change the position and/or rate
    if start > time_sel_start - overlap then
      if (start + length < time_sel_end + overlap) then
        -- in the selection
        -- change the volume
        local vol = reaper.GetMediaItemInfo_Value(item, "D_VOL")
        reaper.SetMediaItemInfo_Value(item, "D_VOL", vol*10^(new_volume/20))
        -- move it backwards
        reaper.SetMediaItemInfo_Value(item, "D_POSITION", time_sel_start + (start - time_sel_start)/shrink_factor - overlap)
        reaper.SetMediaItemInfo_Value(item, "D_LENGTH", length/shrink_factor)
        -- shrink it
        for t=1, reaper.CountTakes(item) do
          local take = reaper.GetMediaItemTake(item, t-1)
          if take then
            local playrate = reaper.GetMediaItemTakeInfo_Value(take, "D_PLAYRATE")
            new_playrate = playrate;
            reaper.SetMediaItemTakeInfo_Value(take, "D_PLAYRATE", playrate*shrink_factor)
          end
        end
      else
        -- after the selection: move it backwards
        reaper.SetMediaItemInfo_Value(item, "D_POSITION", start - (time_sel_end - time_sel_start)*(1 - 1/shrink_factor) - overlap*2)
      end
    end

    -- Fade out items that (originally) finish at the start/end of selection
    if (start + length >= time_sel_start - overlap and start + length <= time_sel_start + overlap)
        or (start + length >= time_sel_end - overlap and start + length <= time_sel_end + overlap) then
      local fade = reaper.GetMediaItemInfo_Value(item, "D_FADEOUTLEN_AUTO")
      if (fade < overlap) then
        reaper.SetMediaItemInfo_Value(item, "D_FADEOUTLEN_AUTO", overlap)
      end        
    end
    -- Fade in items that (originally) start at the start/end of selection
    if (start >= time_sel_start - overlap and start <= time_sel_start + overlap)
        or (start >= time_sel_end - overlap and start <= time_sel_end + overlap) then
      local fade = reaper.GetMediaItemInfo_Value(item, "D_FADEINLEN_AUTO")
      if (fade < overlap) then
        reaper.SetMediaItemInfo_Value(item, "D_FADEINLEN_AUTO", overlap)
      end        
    end
  end

  reaper.UpdateArrange()
  reaper.Undo_EndBlock("Shrink items in time selection", -1)
end

main()


This version doesn't bother inspecting which items have been split, or which tracks they're on. Instead, it just knows that after the split, every item will be either before, after or inside the selection (not crossing either boundary) so it loops through and handles those three cases appropriately, then adds fades to anything that starts/ends at the selection boundaries.

(This is just an adaptation of your code - anything else like automation is still a mystery, but this is all I needed for my particular case.)

So thank you again - not only will this script save me a whole bunch of time, but it's also been a really clear and nice introduction to Lua and ReaScripting.

Last edited by geraintluff; 03-29-2018 at 04:47 PM.
geraintluff is offline   Reply With Quote
Old 03-30-2018, 03:32 AM   #1617
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by geraintluff View Post
So thank you again - not only will this script save me a whole bunch of time, but it's also been a really clear and nice introduction to Lua and ReaScripting.
I'm glad I could help and thanks for your JSFXs - really nice work!
spk77 is offline   Reply With Quote
Old 04-01-2018, 03:37 AM   #1618
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Hi all!

Hoping this is possible..

Willing to pay for a script that can change the value of the video delay compensation value in preferences via a toggle action from say 0 to 90 ms.

Is this possible? It'd fine that I'll have to stop and start for the change to occur but I wasn't sure if this was even accessible via scripting?

The reason for it is I now have speakers that have a normal low latency minimal phase mode but also have a linear phase mode with a delay of around 90 ms so need a action button I can click to adjust video playback latency so that it matches the speaker delay.

Happy to pay a bit for it and a bit more if it's a pain because maybe it's got to be written low level or something. (like sws stuff)

Fingers crossed that it's possible!

Thanks.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 04-01-2018, 05:01 AM   #1619
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by musicbynumbers View Post
Hi all!

Hoping this is possible..

Willing to pay for a script that can change the value of the video delay compensation value in preferences via a toggle action from say 0 to 90 ms.

Is this possible? It'd fine that I'll have to stop and start for the change to occur but I wasn't sure if this was even accessible via scripting?

The reason for it is I now have speakers that have a normal low latency minimal phase mode but also have a linear phase mode with a delay of around 90 ms so need a action button I can click to adjust video playback latency so that it matches the speaker delay.

Happy to pay a bit for it and a bit more if it's a pain because maybe it's got to be written low level or something. (like sws stuff)

Fingers crossed that it's possible!

Thanks.
Hi,
that seems to be possible (and it's really short script):
Code:
function main()
  local is_new_value ,filename, section_id, command_id, mode, resolution, val = reaper.get_action_context()
  local current_video_delay_compensation = reaper.SNM_GetIntConfigVar("video_delayms", -10000000)
  if current_video_delay_compensation ~= -10000000 then
    if current_video_delay_compensation >= 90 then
      reaper.SNM_SetIntConfigVar("video_delayms", 0)
      reaper.SetToggleCommandState(section_id, command_id, 0)
    else
      reaper.SNM_SetIntConfigVar("video_delayms", 90)
      reaper.SetToggleCommandState(section_id, command_id, 1)
    end
    reaper.RefreshToolbar2(section_id, command_id)
  end
end

reaper.defer(main)
...but it might need some adjustments:
It sets the delay compensation value to
  • 0 ms if the value is currently 90 ms or more.
  • 90 ms if the value is currently less than 90 ms

EDIT: value changes seem to be applied immediately

Last edited by spk77; 04-01-2018 at 05:59 AM.
spk77 is offline   Reply With Quote
Old 04-01-2018, 05:19 AM   #1620
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Wow spk77! You're my hero!

Will donate some money to you asap!

One question though would be, is there a way to to make it so a toolbar button will be active/lit up when it's in the 90ms mode and inactive/not lit when in the 9ms mode?

I've not dabbled much in this area before so I don't know if it can be queried like that or maybe I should put it into 2 actions and use sws custom actions to differentiate the active state?

Thanks.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 04-01-2018, 05:49 AM   #1621
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

@musicbynumbers
The code in post #1633 is updated...I hope it works

Note: The value in the preferences is updated when the window is closed and reopened, but that's just a cosmetic thing.

Edit: updated again -> now it doesn't add an undo point

Last edited by spk77; 04-01-2018 at 06:00 AM.
spk77 is offline   Reply With Quote
Old 04-01-2018, 09:43 AM   #1622
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Just donated to say thank you!

It works mostly fine.

One thing I wanted to ask is, is there a way for it to recall the last setting it was at when you quit reaper because now it defaults to the last setting in the actual preference but the button always starts off at "0"/off when it would be great if it knew which state it was still in.

No worries if that's not possible though. Small price to pay!

Again thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 04-01-2018, 09:53 AM   #1623
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Also, Just realised that I might as well compensate for the monitor/TVs lag/delay too which means in "0" mode I probably need to set it to a negative number.

If I just replace all the 0s in the script with say "-21" then it should still work right? Won't break it by using negative numbers?

EDIT: just tried the above and seems to work fine with negatives, woo hoo!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.

Last edited by musicbynumbers; 04-01-2018 at 10:03 AM.
musicbynumbers is offline   Reply With Quote
Old 04-02-2018, 03:41 AM   #1624
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Hi spk77.

Just wanted to make sure you got the donation as don't think I got a receipt from PayPal yetand don't want you to think I didn't appreciate it!

Thanks.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 04-02-2018, 04:13 AM   #1625
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by musicbynumbers View Post
Just donated to say thank you!

It works mostly fine.

One thing I wanted to ask is, is there a way for it to recall the last setting it was at when you quit reaper because now it defaults to the last setting in the actual preference but the button always starts off at "0"/off when it would be great if it knew which state it was still in.

No worries if that's not possible though. Small price to pay!

Again thanks!
Thank you for the donation!
I tried to figure this out last night, but didn't get it working yet. I'll try to do another script that refreshes the toolbar button that is assigned to the (main) script.
It should be run as "global startup action" (there's "SWS/S&M: Set global startup action")

Quote:
Originally Posted by musicbynumbers View Post
Also, Just realised that I might as well compensate for the monitor/TVs lag/delay too which means in "0" mode I probably need to set it to a negative number.

If I just replace all the 0s in the script with say "-21" then it should still work right? Won't break it by using negative numbers?

EDIT: just tried the above and seems to work fine with negatives, woo hoo!
Yes, that should work
spk77 is offline   Reply With Quote
Old 04-02-2018, 04:14 AM   #1626
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by musicbynumbers View Post
Hi spk77.

Just wanted to make sure you got the donation as don't think I got a receipt from PayPal yetand don't want you to think I didn't appreciate it!

Thanks.
Hi,
I received the donation, thank you very much
spk77 is offline   Reply With Quote
Old 04-02-2018, 05:01 AM   #1627
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
Default

Cool. Glad to hear that!

I could use the SWS global action thing as suggested. Thanks.

I'll give it a go.

Not too concerned with which state it starts in but more that the button reflects the actual state.

I guess it's hard to do for this since it's not a on/off state so you don't get any feedback from reaper itself.
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 04-02-2018, 08:04 AM   #1628
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
Default

is there is a way to insert pre-named markers?

for example say we have short movie and need to export dialog time codes according to player names ..

Mr x
Mrs y
Child 1
Child 2

create 4 pre-named markers and add them to time line via action(s)
and export full time code at once via using:
X-Raym_Export markers as YouTube timecode for video description.lua
timbralzoom is offline   Reply With Quote
Old 04-02-2018, 02:55 PM   #1629
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,874
Default

@timbralzoom

Script: Outboarder - Insert Marker at Edit cursor with custom Name and Color.lua

Edit the script to find the "User Config area" and set your own custom name.

Copy the script file for each action you need (here, 4 times).
X-Raym is offline   Reply With Quote
Old 04-02-2018, 03:12 PM   #1630
timbralzoom
Human being with feelings
 
timbralzoom's Avatar
 
Join Date: Apr 2010
Location: Turkey/Istanbul
Posts: 1,820
Default

Quote:
Originally Posted by X-Raym View Post
@timbralzoom

Script: Outboarder - Insert Marker at Edit cursor with custom Name and Color.lua

Edit the script to find the "User Config area" and set your own custom name.

Copy the script file for each action you need (here, 4 times).
X-Raym Thank you so much for your Script and this great help!
timbralzoom is offline   Reply With Quote
Old 04-02-2018, 04:09 PM   #1631
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default

Hi Coders

I have two interfaces connected to my laptop and frequently change between them.
Is it possible to make a script that switches between two interfaces with a key command?
That would be more convenient than repeatedly going to the prefs.
Cheers
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 04-03-2018, 04:33 AM   #1632
D Rocks
Human being with feelings
 
Join Date: Dec 2017
Location: Quebec, Canada
Posts: 550
Default

Hello guys


With the help of Spk77 Ive already acheived a massive improvement in my.workflow by having a Script to autonatically Insert show my favorite Pro Q2 on the condition that mouse is over track and keycommand is pressed.

Now my further enhancement question is how would you script that it automatically enable the ProQ2 option to toggle FULLSCREEN VIEW of the plugin?

Id like to press the keycommand and make ProQ2 insert or Show already in full screen view if possible?

Thanks for any help
__________________
Alex | www.drocksrecords.com | Thanks for REAPER
D Rocks is offline   Reply With Quote
Old 04-08-2018, 12:30 PM   #1633
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by musicbynumbers View Post
Cool. Glad to hear that!

I could use the SWS global action thing as suggested. Thanks.

I'll give it a go.

Not too concerned with which state it starts in but more that the button reflects the actual state.

I guess it's hard to do for this since it's not a on/off state so you don't get any feedback from reaper itself.
I think I finally got it working...set this as "global startup action" (this is needed for syncing)

Code:
local button_off_val = -21 -- This value is set when the button is "OFF"
local button_on_val = 90 -- This value is set when the button is "ON"

function main()
  local state = 0
  local delay = 0
  local is_new_value, filename, section_id, command_id, mode, resolution, val = reaper.get_action_context()
  local toggle_state = reaper.GetToggleCommandStateEx(section_id, command_id)
  if toggle_state == -1 then
    if reaper.HasExtState("musicbynumbers", "video output delay") then
      delay = tonumber(reaper.GetExtState("musicbynumbers", "video output delay"))
      if delay == button_on_val then
        state = 1
      else
        state = 0
      end
    else
      --reaper.ShowConsoleMsg("No ext state" .. "\n")
      state = 0
      delay = button_off_val
    end
  else
    if toggle_state == 1 then
      state = 0
      delay = button_off_val
    else
      state = 1
      delay = button_on_val
    end
  end
  reaper.SetToggleCommandState(section_id, command_id, state)
  reaper.RefreshToolbar2(section_id, command_id)
  reaper.SNM_SetIntConfigVar("video_delayms", delay)
  reaper.SetExtState("musicbynumbers", "video output delay", tostring(delay), true)
end

reaper.defer(main)
spk77 is offline   Reply With Quote
Old 04-10-2018, 03:51 AM   #1634
Csabb
Human being with feelings
 
Csabb's Avatar
 
Join Date: May 2016
Location: Budapest, Hungary
Posts: 143
Default

Hi there,

I have a batch process request, if someone would be so kind

I have a bunch of mp3-s with the same lenght of silence in them, and I have an mp3 I would like to insert that fits into that silence in lenght.

Can someone make this happen?

Thanks.
__________________
Castis Omnia Casta
Csabb is offline   Reply With Quote
Old 04-11-2018, 05:31 AM   #1635
Stroudy
Human being with feelings
 
Stroudy's Avatar
 
Join Date: Jul 2014
Location: London
Posts: 733
Default Cheat Sheet

CHEAT SHEET script idea/request

A cheat sheet window that lists user selected commands and modifiers.

Without the Cheatsheet...
Code:
What was that key command I'm trying to remember again?
Opens Action list
What was it called now? Something 'select item', maybe 'track' too? [253 results]
Scrolls
Scrolls
I think 'enable' was in the action name? [0 results]
vs with...
Code:
What was that key command I'm trying to remember again?
Presses the Cheat Sheet button
Oh there it is H+shift+ctrl+opt etc etc

This would be available on the Main page, MIDI editor and Media Explorer.
Commands could be added with Action ID, selecting from the Action list (a la cycle action editor), or with manual text input.
The script would automatically retrieve the key commands name and shortcut (e.g. shift+T)

The user would be able to:
re-order the commands
Add subheadings to organise the list

A key command would toggle the Cheatsheet visibility OR it would be Visible while pressed.[possible?]

Anyway, that's my idea!

Thanks for any consideration
Stroudy is offline   Reply With Quote
Old 04-21-2018, 04:13 PM   #1636
D Rocks
Human being with feelings
 
Join Date: Dec 2017
Location: Quebec, Canada
Posts: 550
Default

Hi guys,

I recently got into a conversation of a user who needs to go to markers 11 to lets say 30 (or 20 would also be enough).
He wants to press . Then enter marker number 11 and it goes there.

Ive tried to bypass Reaper using autohotkey for Windows and all I am able to do is hold . Plus press 1 or 2 or 3.... and it sends a complex and improbable keycommand to trigger the go to markers action.

Can any one of you do something like this in Eel script please I really want to solve this out and learn at the same time from your code

Thanks in advance,
__________________
Alex | www.drocksrecords.com | Thanks for REAPER
D Rocks is offline   Reply With Quote
Old 04-21-2018, 04:30 PM   #1637
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

View: Jump to time window
cfillion is offline   Reply With Quote
Old 04-21-2018, 06:17 PM   #1638
D Rocks
Human being with feelings
 
Join Date: Dec 2017
Location: Quebec, Canada
Posts: 550
Default

Thanks Cfillion,

Yes its a good feature I've seen it and it does what I need in the essence of it.

But is there a way to trick Reaper by doing something like "double tap Numpad1 to trigger marker 11" or "press . to open a tiny dialog that gets input 11 then closes itself". I'm looking for an instant method that would be as quick as triggering 1, 2, 3, 4...

Thanks for your reply already I appreciate
__________________
Alex | www.drocksrecords.com | Thanks for REAPER
D Rocks is offline   Reply With Quote
Old 04-27-2018, 12:41 AM   #1639
cool
Human being with feelings
 
Join Date: Dec 2017
Location: Sunny Siberian Islands
Posts: 957
Default

Smart Delete Script request.

In my workflow, I need a convenient adaptive deletion function. Is there an item? By pressing the "Delete" button, it is deleted. Is the area selected? By pressing the "Delete" button, the one that was selected is deleted. Is the track selected? When the button is pressed, it is deleted, etc.

The Reaper has its own action "Remove items / tracks / envelope points (depending on focus), 40697", it works fine, but has a big drawback - it ignores the selected area, removing the entire item. This makes it useless for me.

In search of a solution, I found a simple script that shares the action on the work area:

Code:
isSet = reaper.GetSet_LoopTimeRange( 0, 0, 0, 0, 0 )
focus = reaper.GetCursorContext() 

if isSet == 0 then
  reaper.Main_OnCommand(40697, 0)
else
  if focus == 1 then
    reaper.Main_OnCommand(reaper.NamedCommandLookup('40312'), 0)
  elseif focus == 2 then

    reaper.Main_OnCommand(40089, 0)

  end
end
But it also has drawbacks. If the selection is start from the zero position, the entire item is deleted, but not the area. Secondly, if an area is selected, I can not delete items and tracks, until I remove the selection. This makes it useless for me.

I tried to replace the action with "_XENAKIOS_TSADEL", but it solved only one problem - selection from the zero position. But now I can not delete tracks and any selection of the area still blocks the removal of items.

As a result, in this script I use the cut function instead of the delete: "Edit: Cut items / tracks / envelope points (depending on focus) within time selection, if any (smart cut), 41384". This is the lesser of evils. Selecting an area blocks only deleting tracks, but not items. And the second - I constantly have some unexpected things on the clipboard.

I'm not one to give up easily. But I'm not a programmer. And I would be glad if someone helped me to solve my problem.
Perhaps, I always went the wrong way, using this script as a basis.
cool is offline   Reply With Quote
Old 04-28-2018, 01:21 PM   #1640
Vampire TNA
Human being with feelings
 
Join Date: Nov 2009
Posts: 28
Default Move selected track to the end of tracklist (right side of mixer)

Hey guys, here's another request.
I would find it extremely useful if there was a command to move the selected track to the right side of the mixer. The only thing close i found was X-Raym script to move only one place "Script: X-Raym_Move selected tracks down on visible track list.lua".
I would be very much obliged if anyone could program an eel script like:

integer t= total number of tracks
integer s= track number of selected track
integer i= t-s
and the loop X-Raym's script for i times

it would do the trick!
Thanks in advance!
Vampire TNA 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:56 AM.


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