Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 11-18-2022, 10:07 AM   #41
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Just in case, I wrote this small script, that shows the maximum RecPass-value in the project.

Code:
X=tonumber(reaper.GetExtState("mespotine_show_recpass", "X", X, true))
Y=tonumber(reaper.GetExtState("mespotine_show_recpass", "Y", Y, true))
W=tonumber(reaper.GetExtState("mespotine_show_recpass", "W", W, true))
H=tonumber(reaper.GetExtState("mespotine_show_recpass", "H", H, true))
Dock=tonumber(reaper.GetExtState("mespotine_show_recpass", "Dock", Dock, true))

if X==nil then X=0 end
if Y==nil then Y=0 end
if W==nil then W=300 end
if H==nil then H=100 end
if Dock==nil then Dock=0 end

gfx.init("Display RecPass-State", W, H, Dock, X, Y)
gfx.setfont(1, "Arial", 20, 0)

function GetItemRecPass(MediaItem)
  -- check parameters and prepare statechunk-variable
  local retval
  if reaper.ValidatePtr2(0, MediaItem, "MediaItem*")==true then 
    retval, statechunk=reaper.GetItemStateChunk(MediaItem,"",false) 
  else 
    return 
  end
  
  -- get value and return it
  statechunk=statechunk:match("RECPASS( .-)%c")
  if statechunk==nil then return nil end
  statechunk=statechunk.." "
  local O=statechunk
    
  return tonumber(statechunk:match(" (.-) ")), 
         tonumber(statechunk:match(" .- (.-) ")),
         tonumber(statechunk:match(" .- .- (.-) ")),
         tonumber(statechunk:match(" .- .- .- (.-) ")),
         tonumber(statechunk:match(" .- .- .- .- (.-) ")),
         tonumber(statechunk:match(" .- .- .- .- .- (.-) ")),
         tonumber(statechunk:match(" .- .- .- .- .- .- (.-) ")),
         tonumber(statechunk:match(" .- .- .- .- .- .- .- (.-) "))
end

function GetRecPassNumber()
  local RecPass=0
  for i=0, reaper.CountMediaItems(0)-1 do
    local item=reaper.GetMediaItem(0,i)
    local val=GetItemRecPass(item)
    if val>RecPass then RecPass=val end
  end
  return RecPass
end

function SetFontSize(text)
  for i=0, 200, 2 do
    gfx.setfont(1, "Arial", i)
    w,h=gfx.measurestr("Current RecPass: "..GetRecPassNumber())
    if w>gfx.w-40 then break end
  end
end

function main()
  newRecState=reaper.GetPlayState()&4
  if oldproject~=reaper.EnumProjects(-1) then
    gfx.x=0
    gfx.y=0
    SetFontSize(text)
    Text="Current RecPass: "..GetRecPassNumber()
    gfx.drawstr(Text)
    A=reaper.time_precise()
    oldproject=reaper.EnumProjects(-1)
  end
  if oldw~=gfx.w or oldh~=gfx.h then
    gfx.x=0
    gfx.y=0
    SetFontSize(text)
    Text="Current RecPass: "..GetRecPassNumber()
    gfx.drawstr(Text)
    A=reaper.time_precise()
    oldw=gfx.w
    oldh=gfx.h
  end
  if oldRecState&4==4 and newRecState&4==0 then
    gfx.x=0
    gfx.y=0
    SetFontSize(text)
    Text="Current RecPass: "..GetRecPassNumber()
    gfx.drawstr(Text)
    A=reaper.time_precise()
  end
  oldRecState=newRecState
  key=gfx.getchar()
  if key~=-1 then reaper.defer(main) end
end

oldRecState=reaper.GetPlayState()
main()

function exit()
  Dock=gfx.dock(-1)
  A,X,Y,W,H=gfx.dock(1,1,1,1,1)
  reaper.SetExtState("mespotine_show_recpass", "X", X, true)
  reaper.SetExtState("mespotine_show_recpass", "Y", Y, true)
  reaper.SetExtState("mespotine_show_recpass", "W", W, true)
  reaper.SetExtState("mespotine_show_recpass", "H", H, true)
  reaper.SetExtState("mespotine_show_recpass", "Dock", Dock, true)
end

reaper.atexit(exit)
It updates the counter every time a recording has stopped.
It's quick and dirty and when you use the reset-action, it will not show the reset counter, until you either delete all items(with recpasses already in place) or record enough items until you cross the highest rec-pass-number available.

Haven't tested, if it works, when recording a take into an existing item, so as I said, it's quick n dirty...

Edit:
supports now changing the project as well
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 11-18-2022 at 10:13 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 12-20-2022, 06:41 PM   #42
benmiller
Human being with feelings
 
benmiller's Avatar
 
Join Date: Dec 2015
Posts: 324
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Just in case, I wrote this small script, that shows the maximum RecPass-value in the project.
Great!! Thanks for this! will be using this tomorow
benmiller is offline   Reply With Quote
Old 12-20-2022, 07:08 PM   #43
benmiller
Human being with feelings
 
benmiller's Avatar
 
Join Date: Dec 2015
Posts: 324
Default

Here's the script with a small modification.
When not recording it displays the upcoming recpass number.
While recording it displays the recpass number currently beeing recorded.
(with prefix "next:" and "now:" for clarity)
Attached Files
File Type: lua CLE Display Recpass.lua (3.2 KB, 76 views)
benmiller is offline   Reply With Quote
Old 12-28-2022, 04:04 PM   #44
DJS
Human being with feelings
 
Join Date: Apr 2008
Posts: 11
Default

https://forum.cockos.com/showthread....hlight=recpass
DJS is offline   Reply With Quote
Old 01-08-2023, 04:31 PM   #45
benmiller
Human being with feelings
 
benmiller's Avatar
 
Join Date: Dec 2015
Posts: 324
Default

in a projects with 20 tracks and 100+ takes (recpasses), the script takes a few seconds to spit out the new number. I guess having to go through the state chunks of every single item is really not ideal...

So having a native display window or at least a lua command to access the current recpass would still be very helpfull.
benmiller is offline   Reply With Quote
Old 01-25-2023, 02:37 AM   #46
slip_right
Human being with feelings
 
Join Date: Jan 2021
Posts: 9
Default Sadie RecPass display

Thanks everyone. If Reaper were able to copy the way Sadie handles metadata and recpass displays this would be exactly what we're all looking for I think. With Sadie you can choose to view the BWAV metadata while recording, and edit it right up until you stop recording. Useful for adding notes on takes for example.

It also has an incrementing, user editable, numeric take counter. Just like RecPass. The beauty of the Sadie implementation is that you can make this visible as shown in the screengrabs here at make it any size you want so everyone in the control room can see it. You can also edit the number whilst recording if required.

BWAV file names are then created based on this metadata - if required too.

TAKE001_TrackNumber_TrackName_ProjectName
Attached Images
File Type: png Sadie RecPass Options.png (25.0 KB, 57 views)
File Type: png Sadie RecPass.png (110.5 KB, 54 views)
slip_right is offline   Reply With Quote
Old 02-26-2023, 12:58 PM   #47
slip_right
Human being with feelings
 
Join Date: Jan 2021
Posts: 9
Default Recpass & BWAV Metadata

Bumping this feature request up. Thanks.

Quote:
Originally Posted by slip_right View Post
Thanks everyone. If Reaper were able to copy the way Sadie handles metadata and recpass displays this would be exactly what we're all looking for I think. With Sadie you can choose to view the BWAV metadata while recording, and edit it right up until you stop recording. Useful for adding notes on takes for example.

It also has an incrementing, user editable, numeric take counter. Just like RecPass. The beauty of the Sadie implementation is that you can make this visible as shown in the screengrabs here at make it any size you want so everyone in the control room can see it. You can also edit the number whilst recording if required.

BWAV file names are then created based on this metadata - if required too.

TAKE001_TrackNumber_TrackName_ProjectName
slip_right is offline   Reply With Quote
Old 03-21-2023, 04:00 PM   #48
slip_right
Human being with feelings
 
Join Date: Jan 2021
Posts: 9
Default Feature Request $recpass

Feature Request for viewing $recpass counter in a resizable window like Sadie and Pyramix

Quote:
Originally Posted by slip_right View Post
Thanks everyone. If Reaper were able to copy the way Sadie handles metadata and recpass displays this would be exactly what we're all looking for I think. With Sadie you can choose to view the BWAV metadata while recording, and edit it right up until you stop recording. Useful for adding notes on takes for example.

It also has an incrementing, user editable, numeric take counter. Just like RecPass. The beauty of the Sadie implementation is that you can make this visible as shown in the screengrabs here at make it any size you want so everyone in the control room can see it. You can also edit the number whilst recording if required.

BWAV file names are then created based on this metadata - if required too.

TAKE001_TrackNumber_TrackName_ProjectName
slip_right is offline   Reply With Quote
Old 01-28-2024, 08:57 AM   #49
slip_right
Human being with feelings
 
Join Date: Jan 2021
Posts: 9
Default

Bumping this up as a feature request again please

Quote:
Originally Posted by slip_right View Post
Feature Request for viewing $recpass counter in a resizable window like Sadie and Pyramix
slip_right is offline   Reply With Quote
Old 03-13-2024, 12:53 PM   #50
chmaha
Human being with feelings
 
chmaha's Avatar
 
Join Date: Feb 2021
Posts: 2,288
Default

As I just mentioned in another similar thread, adding the current global rec counter as an optional display on the Big Clock Window would also be great!
__________________
ReaClassical -- Open Source Classical Music Editing Tools for REAPER | Donate via PayPal, Liberapay or Stripe
airwindows JSFX ports | Debian & Arch Pro Audio Guides
chmaha 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:48 AM.


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