Old 04-21-2016, 09:07 AM   #1
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default Take Commenter - a way to mark audio files during recording (DONE!)

Hey everyone,
While I'm recording, I like to insert markers to specify mistakes or potential mistakes that might need checking once the artist has finished their take. Sometimes I want to take notes about really nice phrases in vocal takes. You get the idea, I'm sure.
I can insert markers, but what happens when I record the next take? Those markers refer to a different take and can get confused easily.

I was thinking about a potential way to solve this. The idea is a 'take commenter panel', a floating window with user-defined buttons that you press while recording to insert markers. Then once record has stopped, those project markers are written as markers into all of the audio files that were just recorded.


================================================== ==========================================

UPDATE: IT'S ALIVE!! Download here: TakeCommenter.lua

(note: newest code automaticaly removes all markers created during record mode.)


UPDATE: Thanks to Eugen2777's GUI code I've put together the interface for this script. It is just an empty shell at the moment and needs someone to write the guts and give it life.
UPDATE: Thanks to spk77, the script now writes markers to project.
UPDATE: HeDa has contributed code that allows the script to work during play/rec and stop modes.
UPDATE: HeDa has contributed code to automatically remove markers created (only) in record mode.
UPDATE: The window is now a 3x3 array of buttons instead of 4x3. (You can change this with a little work.)
UPDATE: HeDa has contributed code to auto-toggle show media cues in items if it's not already enabled.

Possible future idea:
-Write markers to source WAV files' Cue chunk - Eugen has code, but wants to make sure it's stable (i.e. safe).

Here's a toolbar icon I made:


NOTE: For marker writing during record mode, you must go to Project Settings->Media and ensure Write BWF ('bext') chunk is enabled and "Do not include markers or regions" is changed to something that includes markers.



P.S. The REAPER community f*&king rocks.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]

Last edited by daxliniere; 05-24-2019 at 12:49 PM.
daxliniere is offline   Reply With Quote
Old 04-21-2016, 09:11 AM   #2
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,808
Default

I've asked about this a long time ago,and got general answers like use empty items and bla bla bla.
I'm doing exactly the same thing with vocals,drums etc.Heda implemented track notes in Track Inspector,which is the closes thing to this,maybe an seperate script just for that and modified to work with takes also
Sexan is offline   Reply With Quote
Old 04-21-2016, 09:17 AM   #3
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

So there is a need for it, then, and I'm not the only one.

Can markers be written to a take at specific times? This would be a far safer option than writing to the files themselves.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 04-21-2016, 12:25 PM   #4
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

Try the "Item Marker Tool" in my sig, Dax (beta 17, NOT beta18).

It might do what you're after -the markers get associated with the take and track it around through moves, etc. It doesn't like variable-rate stretch markers though -it needs a rewrite.



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.

Last edited by planetnine; 04-21-2016 at 12:36 PM.
planetnine is offline   Reply With Quote
Old 04-21-2016, 12:31 PM   #5
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,298
Default

Ideally those edit-markers could be view per-track
and per project, and in their manager, when clicked,
it would lead us to that spot

Maybe a marker tag that binds to project, track, item or take.
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is offline   Reply With Quote
Old 04-21-2016, 03:23 PM   #6
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

I'd love native item or take markers.

Ideally they'd sit within the media item rectangle, and a mouseover tooltip would show the name if you were too zoomed out to read it directly. Take markers would stick to the position of the source audio, so any move, playrate change, stretch-marker warping, source-dragging, etc would still have the marker attached to the same source sample position, whatever you did to the item or take.

Actions to move to next/prev take marker, create a project marker at take marker position, snap to marker position, etc would be useful too.

I wrote the item marker script to give myself source-marking functionality for a couple of tasks I do with REAPER, but also to try and demonstrate how useful they'd be. I should knuckle down and write a proper FR for them.




The script is fine, but native markers attached to the media item only would be much better...





>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is offline   Reply With Quote
Old 04-21-2016, 07:48 PM   #7
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 1,758
Default

we almost have item markers. really all we need is to have a variant of stretch markers that, obviously, don't stretch anything but do carry a name and might be a different color and sit in a different place within the item, maybe top or bottom. i sort of can't believe this hasn't been picked up on until now. hopefully this conversation might spark some action.

BabaG
babag is offline   Reply With Quote
Old 04-22-2016, 04:50 AM   #8
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by planetnine View Post
Try the "Item Marker Tool" in my sig, Dax (beta 17, NOT beta18).

It might do what you're after
Not quite, unfortunately, it's item-related, not take-related and the whole point was to be able to mark differences/problems in different takes of the same part.

Quote:
Originally Posted by G-Sun View Post
Maybe a marker tag that binds to project, track, item or take.
Quote:
Originally Posted by planetnine View Post
I'd love native item or take markers.
See above.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 04-22-2016, 06:01 AM   #9
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

My script is take-anchored, not item-anchored, Dax.

It doesn't show which take it's attached to though, there is a modifier in the script gfx to highlight the pairing, but it's limited by what's available in REAPER.

Or did you mean your requirement is item-based?


You moved then?



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is offline   Reply With Quote
Old 04-22-2016, 06:33 AM   #10
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by planetnine View Post
My script is take-anchored, not item-anchored
Ahh okay, cool. Your example only showed one take.
Are the visible markers removed and replaced instantaneously when switching takes?
When I get back, I'll take some screen shots of the kind of thing I'm talking about.


Quote:
You moved then?
I have indeed, mate.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 04-22-2016, 06:46 AM   #11
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,298
Default

Quote:
Originally Posted by planetnine View Post
I wrote the item marker script to give myself source-marking functionality for a couple of tasks I do with REAPER
Looks nice.

There's also sws project/track/item notes
and the option for takeFx notepad.
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is offline   Reply With Quote
Old 04-22-2016, 07:11 AM   #12
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

Quote:
Originally Posted by daxliniere View Post
Ahh okay, cool. Your example only showed one take.
Are the visible markers removed and replaced instantaneously when switching takes?
When I get back, I'll take some screen shots of the kind of thing I'm talking about.

...


Not as it stands, it doesn't take any heed of take visibility, it just tracks the position of the takels source within the timeline...

I could possibly grey out markers for non visible takes?



Edit: it's actually source-audio anchored, if you move the audio within the take or warp it, the associated markers will track their audio points.




>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.

Last edited by planetnine; 04-22-2016 at 07:20 AM.
planetnine is offline   Reply With Quote
Old 04-22-2016, 11:16 AM   #13
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

Something like this, Dax?





Three takes in one item, item markers are locked to various of these three. Locked markers for non-active takes in an item are greyed-out.

It's not ideal, it needs to be native. Think of it as a tool to lock a few markers to takes to mark audio/ a workaround/ a demo for take or item markers (how to do and not to do it) The code is hideous (it took me over an hour to work out what I originally did) and seriously needs to be rewritten in Lua if Justin can't or is disinclined to help us with item markers.

Most of clunkiness and complication here is making project markers pretend to be item markers, and various methods of locking/unkocking them. With proper native item markers (take markers/source audio markers) you would just select the active take of an item and add the damn thing at the cursor, maybe selecting what it locks to (item/take/source/beat position) in its edit dialogue when you name it. A few actions to jump between them and place project markers at item markers/vice versa and they'll be immediately useful. You won't worry about confusing them with project markers because they won't be on the ruler with them, they'll be on the media items themselves.

Mouseover info for the title and the source position/BWF position and you're sorted. Time for an FR?

Link to beta17a01 in the Stash.




>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.

Last edited by planetnine; 05-23-2016 at 01:40 PM.
planetnine is offline   Reply With Quote
Old 04-22-2016, 12:38 PM   #14
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,298
Default

Quote:
Originally Posted by planetnine View Post
Something like this, Dax?
Wow.
I'd love to get this integrated with Hedas Track Inspector.
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is offline   Reply With Quote
Old 04-23-2016, 05:35 AM   #15
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Yes, I think it would normally be time for a feature request, but I do worry that we/I will spend lots of time on it to absolutely no avail. The FR system seems mostly ignored these days.

This is (half of) what I originally had in mind, using the existing ability to read markers from audio files:


The other half is a floating window with a user-definable grid of buttons with text of the user's choosing. You click one of the buttons (with labels like Good, Great, Okay, Bad, Flat, Sharp, Late, Early, etc) and a marker of that name is inserted at that play-cursor point in all takes that are being recorded.

Note: We would also need a theme setting to move marker text higher (if that doesn't already exist).
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]

Last edited by daxliniere; 05-24-2019 at 12:51 PM.
daxliniere is offline   Reply With Quote
Old 05-04-2016, 10:55 PM   #16
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,066
Default

you can actually do it natively

right click on the rec arm button of any track

-> track recroding settings
-> check set recording format and set to wave
-> check write BWF and choose markers only


https://www.dropbox.com/s/br9am217g71fxxz/demo.gif?dl=0

https://www.dropbox.com/s/3nxdzywcfu...demo2.gif?dl=0

Last edited by Reno.thestraws; 05-04-2016 at 11:06 PM.
Reno.thestraws is offline   Reply With Quote
Old 05-05-2016, 12:59 AM   #17
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,827
Default

Quote:
Originally Posted by Reno.thestraws View Post
you can actually do it natively
Thanks. it's good. It would also be good to export current markers added after recording, into the selected take. How could it be possible? Because it is not always possible to add markers when recording. You can add them after it, reviewing the takes.
heda is offline   Reply With Quote
Old 05-05-2016, 01:48 AM   #18
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,298
Default

Quote:
Originally Posted by Reno.thestraws View Post
you can actually do it natively

right click on the rec arm button of any track

-> track recroding settings
-> check set recording format and set to wave
-> check write BWF and choose markers only


https://www.dropbox.com/s/br9am217g71fxxz/demo.gif?dl=0

https://www.dropbox.com/s/3nxdzywcfu...demo2.gif?dl=0
Nice
__________________
Reaper x64, win 8.1
My music on Bandcamp
G-Sun is offline   Reply With Quote
Old 05-05-2016, 03:56 AM   #19
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by Reno.thestraws View Post
you can actually do it natively...
Wow, this is a superb find. Excellent job, Reno!!

Quote:
Originally Posted by heda View Post
Thanks. it's good. It would also be good to export current markers added after recording, into the selected take. How could it be possible? Because it is not always possible to add markers when recording. You can add them after it, reviewing the takes.
Two options here:
1) Wait for REAPER to implement an action to write markers to audio files (or even just take metadata), the reverse of 40692 (which would be Item: export project markers as take media cues)
2) Use part of the code that Eugen2777 wrote for Simple Sample Editor to write to the Cue Chunk of WAV as per this: http://www.blitter.com/~russtopia/MI.../tech/wave.htm

Regarding #2, I PM'd Eugen2777 2 days ago asking about this. Hopefully we hear back.


I guess the script could detect if recording is active and if not, it would write the marker instantly, otherwise it uses the method Reno found?


I have some ideas on how the guts of the Take Commenter script would work:

Method A)
During recording mode, button is pressed by user,
Marker with the name of the button is inserted (and REAPER automatically writes them to the audio files as cue markers)
When recording finishes, all project markers inserted by the Take Commenter are removed

Method B)
At any time, button is pressed by user,
Check if recording
if no, write marker to selected item's active take at play cursor position
else store in memory: play cursor time, button name (and armed track(s) number to detect most recently recorded audio?)
Wait until recording stops
Write cue marker at stored play cursor time to takes that were just recorded

Method B could have problems if rec-arm is toggled during record, maybe?


Incidentally, I have created the GUI for this script using Eugen2777's Simple GUI creator. (This guy is genius, BTW)


(code in next post, forum char limit reached)
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]

Last edited by daxliniere; 05-24-2019 at 12:51 PM.
daxliniere is offline   Reply With Quote
Old 05-05-2016, 04:15 AM   #20
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

(redundant post, script found in post #1)
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]

Last edited by daxliniere; 05-09-2016 at 09:33 AM.
daxliniere is offline   Reply With Quote
Old 05-05-2016, 05:51 AM   #21
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Here's a mod:


Code:
--------------------------------------------------------------------------------
---   Live Take Commenter   ---------------------------------------------------
---   GUI code by Eugen2777 ---------------------------------------------------
---   Cue writing code by ????? ---------------------------------------------------
---   Concept by Dax Liniere  ------------------------------------------------
--------------------------------------------------------------------------------
local Element = {}
function Element:new(x,y,w,h, r,g,b,a, lbl,fnt,fnt_sz, norm_val)
    local elm = {}
    elm.def_xywh = {x,y,w,h,fnt_sz} -- its default coord,used for Zoom etc
    elm.x, elm.y, elm.w, elm.h = x, y, w, h
    elm.r, elm.g, elm.b, elm.a = r, g, b, a
    elm.lbl, elm.fnt, elm.fnt_sz  = lbl, fnt, fnt_sz
    elm.norm_val = norm_val
    ------
    setmetatable(elm, self)
    self.__index = self 
    return elm
end
--------------------------------------------------------------
--- Function for Child Classes(args = Child,Parent Class) ----
--------------------------------------------------------------
function extended(Child, Parent)
  setmetatable(Child,{__index = Parent}) 
end
--------------------------------------------------------------
---   Element Class Methods(Main Methods)   ------------------
--------------------------------------------------------------
function Element:update_xywh()
  if not Z_w or not Z_h then return end -- return if zoom not defined
  if Z_w>0.5 and Z_w<3 then  
   self.x, self.w = math.ceil(self.def_xywh[1]* Z_w) , math.ceil(self.def_xywh[3]* Z_w) --upd x,w
  end
  if Z_h>0.5 and Z_h<3 then
   self.y, self.h = math.ceil(self.def_xywh[2]* Z_h) , math.ceil(self.def_xywh[4]* Z_h) --upd y,h
  end
  if Z_w>0.5 or Z_h>0.5  then --fix it!--
     self.fnt_sz = math.max(9,self.def_xywh[5]* (Z_w+Z_h)/2)
     self.fnt_sz = math.min(22,self.fnt_sz)
  end       
end
--------
function Element:pointIN(p_x, p_y)
  return p_x >= self.x and p_x <= self.x + self.w and p_y >= self.y and p_y <= self.y + self.h
end
--------
function Element:mouseIN()
  return gfx.mouse_cap&1==0 and self:pointIN(gfx.mouse_x,gfx.mouse_y)
end
--------
function Element:mouseDown()
  return gfx.mouse_cap&1==1 and self:pointIN(mouse_ox,mouse_oy)
end
--------
function Element:mouseClick()
  return gfx.mouse_cap&1==0 and last_mouse_cap&1==1 and
  self:pointIN(gfx.mouse_x,gfx.mouse_y) and self:pointIN(mouse_ox,mouse_oy)         
end
--------
function Element:draw_frame()
  local x,y,w,h  = self.x,self.y,self.w,self.h
  gfx.rect(x, y, w, h, 0)--frame1
  gfx.roundrect(x, y, w-1, h-1, 3, true)--frame2         
end
--------------------------------------------------------------------------------
---   Create Element Child Classes(Button,Slider,Knob)   -----------------------
--------------------------------------------------------------------------------
local Button ={}; local Knob ={}; local Slider ={}; 
  extended(Button, Element)
  extended(Knob,   Element)
  extended(Slider, Element)
---Create Slider Child Classes(V_Slider,H_Slider)----
local H_Slider ={}; local V_Slider ={};
  extended(H_Slider, Slider)
  extended(V_Slider, Slider)

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---   Button Class Methods   ---------------------------------------------------
--------------------------------------------------------------------------------
function Button:draw_lbl()
    local x,y,w,h  = self.x,self.y,self.w,self.h
    local fnt,fnt_sz = self.fnt, self.fnt_sz
    --Draw btn lbl(text)--
      gfx.set(0.7, 1, 0, 1)--set label color
      gfx.setfont(1, fnt, fnt_sz);--set label fnt
        local lbl_w, lbl_h = gfx.measurestr(self.lbl)
        gfx.x = x+(w-lbl_w)/2; gfx.y = y+(h-lbl_h)/2
        gfx.drawstr(self.lbl)
end
---------------------
function Button:draw()
    self:update_xywh()--Update xywh(if wind changed)
    local x,y,w,h  = self.x,self.y,self.w,self.h
    local r,g,b,a  = self.r,self.g,self.b,self.a
    ---Get L_mouse state--
          --in element--
          if self:mouseIN() then a=a+0.1 end
          --in elm L_down--
          if self:mouseDown() then a=a+0.2 end
          --in elm L_up(released and was previously pressed)--
          if self:mouseClick() then self.onClick() end
    --Draw btn(body,frame)--
    gfx.set(r,g,b,a)--set btn color
    gfx.rect(x,y,w,h,true)--body
    self:draw_frame()
    ------------------------
    self:draw_lbl()
end

 
----------------------------------------------------------------------------------------------------
---   START   --------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
---   good, great, PERFECT, not bad, bad, sharp, flat, out-of-time, early, late   ------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
local btn1 = Button:new(10,10,70,70, 0.2,0.2,1.0,0.5, "PERFECT","Arial",15, 0 )
local btn2 = Button:new(90,10,70,70, 0.0,1.0,0.0,0.5, "good","Arial",15, 0 )
local btn3 = Button:new(170,10,70,70, 0.0,1.0,0.0,0.5, "not bad","Arial",15, 0 )
local btn4 = Button:new(250,10,70,70, 0.0,1.0,0.0,0.5, "okay","Arial",15, 0 )
local btn5 = Button:new(10,90,70,70, 1.0,0.0,0.0,0.5, "sharp","Arial",15, 0 )
local btn6 = Button:new(90,90,70,70, 1.0,0.0,0.0,0.5, "flat","Arial",15, 0 )
local btn7 = Button:new(170,90,70,70, 1.0,0.0,0.0,0.5, "early","Arial",15, 0 )
local btn8 = Button:new(250,90,70,70, 1.0,0.0,0.0,0.5, "late","Arial",15, 0 )
local btn9 = Button:new(10,170,70,70, 1.0,0.0,0.0,0.5, "lumpy","Arial",15, 0 )
local btn10 = Button:new(90,170,70,70, 1.0,0.0,0.0,0.5, "no energy","Arial",15, 0 )
local btn11 = Button:new(170,170,70,70, 1.0,0.0,0.0,0.5, "squirrels?","Arial",15, 0 )
local btn12 = Button:new(250,170,70,70, 0.5,0.3,0.4,1.0, "double\n check","Arial",15, 0 )

local Button_TB = {btn1,btn2,btn3,btn4,btn5,btn6,btn7,btn8,btn9,btn10,btn11,btn12}


add_marker_to_play_pos =  function(name, r,g,b)
                            local play_state = reaper.GetPlayState()
                            if play_state == 0 or play_state&2 == 2 then return end
                            local floor = math.floor
                            r = floor(r*255+0.5)
                            g = floor(g*255+0.5)
                            b = floor(b*255+0.5)                            
                            local int_col=reaper.ColorToNative(r, g, b)|0x1000000
                            reaper.Undo_BeginBlock()
                            reaper.AddProjectMarker2(0, false, reaper.GetPlayPosition(), 0, name, -1, int_col)
                            reaper.Undo_EndBlock("Live Take Commenter - add marker", -1)
                          end 
                          
-- Add "on click function" for each button
for i=1, #Button_TB do
  local curr_btn = Button_TB[i]
  curr_btn.onClick =
                      function()
                        add_marker_to_play_pos(curr_btn.lbl, curr_btn.r, curr_btn.g, curr_btn.b)
                      end
end
----------------------------------------------------------------------------------------------------
---   Main DRAW function   -------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
function DRAW()
    for key,btn  in pairs(Button_TB) do btn:draw()  end 
end

--------------------------------------------------------------------------------
--   INIT   --------------------------------------------------------------------
--------------------------------------------------------------------------------
function Init()
    --Some gfx Wnd Default Values--------------
    local R,G,B = 20,20,20        --0..255 form
    Wnd_bgd = R + G*256 + B*65536 --red+green*256+blue*65536  
    Wnd_Title,Wnd_W,Wnd_H,Wnd_Dock,Wnd_X,Wnd_Y = "Live Take Commenter", 330,250, 0,100,320
    --Init window------------------------------
    gfx.clear = Wnd_bgd         
    gfx.init( Wnd_Title, Wnd_W,Wnd_H, Wnd_Dock, Wnd_X,Wnd_Y )
    --Mouse--------------
    last_mouse_cap = 0
    last_x, last_y = 0, 0
end
----------------------------------------
--   Mainloop   ------------------------
----------------------------------------
function mainloop()
    Z_w,Z_h = gfx.w/Wnd_W, gfx.h/Wnd_H
    if gfx.mouse_cap&1==1 and last_mouse_cap&1==0 then 
       mouse_ox, mouse_oy = gfx.mouse_x, gfx.mouse_y 
    end
    Ctrl  = gfx.mouse_cap&4==4
    Shift = gfx.mouse_cap&8==8
    -----------------------
    --DRAW,MAIN functions--
      DRAW()--Main() 
    -----------------------
    -----------------------
    last_mouse_cap = gfx.mouse_cap
    last_x, last_y = gfx.mouse_x, gfx.mouse_y
    char = gfx.getchar() 
    if char~=-1 then reaper.defer(mainloop) end --defer
    -----------  
    gfx.update()
    -----------
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------
Init()
mainloop()
spk77 is offline   Reply With Quote
Old 05-05-2016, 05:55 AM   #22
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Woo hoo! Thanks spk77!! That's freaking excellent.
A solid step towards a finished solution.
(Can you tell I'm very excited? )

P.S. I think it's hilarious you refer to it simply as a 'mod'. You're too modest.

P.P.S. I've updated my script with your changes and crediting you.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]

Last edited by daxliniere; 05-05-2016 at 06:16 AM.
daxliniere is offline   Reply With Quote
Old 05-05-2016, 06:03 AM   #23
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by daxliniere View Post
Woo hoo! Thanks spk77!! That's freaking excellent.
A solid step towards a finished solution.
(Can you tell I'm very excited? )

P.S. I think it's hilarious you refer to it simply as a 'mod'. You're too modest.

Hopefully Cockos will implement item/take markers at some point.
spk77 is offline   Reply With Quote
Old 05-05-2016, 06:05 AM   #24
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,808
Default

awesome work!!this will be very helpful (for now I've just added markers to know something is wrong there,didn't have time to write during performance) Thank you
Sexan is offline   Reply With Quote
Old 05-05-2016, 06:16 AM   #25
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Great to hear!

We just need to get it to write/transfer those markers into the takes.
I think this should be possible using Eugen2777's Sample Editor script because it can already read/write to external audio files (while they are on-line!) so editing the Cue chunk shouldn't be too hard, I imagine.

Unfortunately, I know nothing about how to go about that.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 05-05-2016, 06:46 AM   #26
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

I've made a toolbar icon. (see first post for all updates)
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 05-05-2016, 08:32 AM   #27
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,827
Default

Very nice.. I could integrate this as a plugin for Track Inspector like a new panel.

this change adds the marker at play position when playing or recording and at cursor position when stopped.
Code:
add_marker_to_play_pos =  function(name, r,g,b)
                            local play_state = reaper.GetPlayState()
                            --if play_state == 0 or play_state&2 == 2 then return end
                            local floor = math.floor
                            r = floor(r*255+0.5)
                            g = floor(g*255+0.5)
                            b = floor(b*255+0.5)                            
                            local int_col=reaper.ColorToNative(r, g, b)|0x1000000
                            reaper.Undo_BeginBlock()
                            if play_state == 0 or play_state&2 == 2 then position=reaper.GetCursorPosition() else position=reaper.GetPlayPosition() end
                            reaper.AddProjectMarker2(0, false, position, 0, name, -1, int_col)
                            reaper.Undo_EndBlock("Live Take Commenter - add marker", -1)
                          end
heda is offline   Reply With Quote
Old 05-05-2016, 08:56 AM   #28
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,808
Default

That would be awesome! Heda I was meaning to ask you,would you consider integration Color Swatch tool to the inspector?
Sexan is offline   Reply With Quote
Old 05-05-2016, 09:18 AM   #29
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by heda View Post
Very nice.. I could integrate this as a plugin for Track Inspector like a new panel.

this change adds the marker at play position when playing or recording and at cursor position when stopped.
Awesome! I'll update it now.

Is there a way that keys can be passed through when this window is open?
Currently it hijacks the keyboard which is exactly what you DON'T want when you're recording.
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 05-05-2016, 09:30 AM   #30
Rogie
Human being with feelings
 
Rogie's Avatar
 
Join Date: Feb 2013
Posts: 138
Default

I don't even use this stuff to any effectiveness yet,I am still so green,and just a lowly guitar player.

But,I am gobsmacked,as always,at the way you guys go about it.

My brain bows humbly to your big,juicy,Overlord brains.
Rogie is offline   Reply With Quote
Old 05-05-2016, 09:33 AM   #31
Rogie
Human being with feelings
 
Rogie's Avatar
 
Join Date: Feb 2013
Posts: 138
Default

Just for my personal clarification,...this is a ReaScript file,correct?
Rogie is offline   Reply With Quote
Old 05-05-2016, 09:48 AM   #32
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by Rogie View Post
Just for my personal clarification,...this is a ReaScript file,correct?
Yep, thanks for reminding me to add that to the post.
It's written in LUA so extension is .LUA
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 05-05-2016, 10:14 AM   #33
Rogie
Human being with feelings
 
Rogie's Avatar
 
Join Date: Feb 2013
Posts: 138
Default

Thanks again,boys!
Rogie is offline   Reply With Quote
Old 05-05-2016, 10:20 AM   #34
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by Rogie View Post
Thanks again,boys!
No worries! Remember, if there's a script you use a lot, you can make a small donation to the scripter. These guys put a lot of effort in.
(Don't give anything to me, I'm more of a director for this script, pulling in all the major actors. )
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 05-05-2016, 11:08 AM   #35
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,519
Default

That is actually pretty nice ! Bravo !

and thanks for your contribution to the scripting community :P
X-Raym is offline   Reply With Quote
Old 05-05-2016, 11:22 AM   #36
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 1,969
Default

This is cool.
Thanks.
WyattRice is offline   Reply With Quote
Old 05-05-2016, 12:30 PM   #37
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 5,827
Default

example of plugin for Track Inspector
heda is offline   Reply With Quote
Old 05-05-2016, 01:53 PM   #38
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 1,982
Default

Quote:
Originally Posted by X-Raym View Post
That is actually pretty nice ! Bravo !
Thanks, I thought it was a good idea.

Quote:
and thanks for your contribution to the scripting community :P
Haha, you mean coming up with difficult ideas then asking someone to make them?
__________________
Dax Liniere
London's newest premium studio complex! (Facebook)
[i7-4790K, 12Gb RAM, Win8.1x64, NVidia GT710, UAD2-OCTO, FireFaceUFX, REAPER x64]
daxliniere is offline   Reply With Quote
Old 05-05-2016, 02:10 PM   #39
eugen2777
Human being with feelings
 
eugen2777's Avatar
 
Join Date: Aug 2012
Posts: 271
Default

Its item-wav


=============================================
=============================================
Its cue in wav-file



The task correctly calculate the position and the other.

In general, everything is possible. But the probability of errors.
I do not know whether the game is worth the candle.
============
In addition, we must also add the Associated Data List Chunk(List) and Label Chunk(labl).
This complicates the task.
However, if the names are known in advance, it is not so important.

Last edited by eugen2777; 05-05-2016 at 03:08 PM.
eugen2777 is offline   Reply With Quote
Old 05-06-2016, 02:20 AM   #40
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,629
Default

Quote:
Originally Posted by eugen2777 View Post
Its item-wav

...
Its cue in wav-file



The task correctly calculate the position and the other.

In general, everything is possible. But the probability of errors.
I do not know whether the game is worth the candle.
============
In addition, we must also add the Associated Data List Chunk(List) and Label Chunk(labl).
This complicates the task.
However, if the names are known in advance, it is not so important.

It's not completely straightforward with cue and list chunks, as regions as well as markers can be stored, and there is more than one method of doing this.

I think it then gets more complicated with 64-bit wavs. Justin indicated there were standards incompatibilities or ambiguities with cue markers in RF64 wav files, although I'm not sure about Sony wave64 wavs.



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine 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 09:23 PM.


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