Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 12-01-2017, 07:28 AM   #1
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default Completely Automate the Recording Process?

I've searched the forums and Google on this topic, but it was loosely covered in varying aspects with nothing directly and completely answering my request, so I thought that I would take a stab at posting it here and see what happens of it.

Due to potential life-changing circumstances, I am needing to see about automating the recording process of our church sermons from the USB input from our Behringer X32 Sound Mixer... Three times on Sundays, and once on Wednesdays. One of the Sunday's recording generally is limited to just two vocal mics and a piano. The others have about 20 tracks of inputs.

Question: Is there a way for Windows 10 Scheduler to call up a Project Template (or something else) in such a fashion so that Reaper will automatically ARM all of the tracks in that template (there will be two different templates at least), start recording for a specified amount of time, stop the recording, automatically save the tracks, and close down Reaper when finished? (I will be using a different software after each recording ends at a predefined time to bundle and upload these recordings via the internet to my server for processing and archiving.)

I've seen one type of scheduler LUA plugin script here on the Forum, but that still looked like you had to manually initiate it each recording (and it was based on UTC without offset), which defeats the purpose of my post.

Is this possible?

Last edited by tXShooter; 12-01-2017 at 07:48 AM.
tXShooter is offline   Reply With Quote
Old 12-02-2017, 12:05 PM   #2
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default Is it possible on an older Windows 7 / 8 laptop?

Well, I tried to revive this laptop to Windows 10 and it had some serious latency issues, so now I'm reverting it to the factory OS of Windows 7 to move forward. Will Reaper still work for what I'm asking it to do on 7, or will I need to upgrade to 8 / 8.1? (It's an Asus X54C)
tXShooter is offline   Reply With Quote
Old 12-02-2017, 03:56 PM   #3
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,377
Default

Quote:
Originally Posted by tXShooter View Post
Question: Is there a way for Windows 10 Scheduler to call up a Project Template (or something else) in such a fashion so that Reaper will automatically ARM all of the tracks in that template (there will be two different templates at least), start recording for a specified amount of time, stop the recording, automatically save the tracks, and close down Reaper when finished?
If you have SWS Extensions installed, you can define per-project and global startup actions. These actions will run upon launching REAPER.

Get it if you don't have it. It's awesome for too many reasons to list. http://www.sws-extension.org/

Once installed go to 'Extensions > Startup actions' then 'Set startup global action...' and/or 'Set project startup action...'

There are Actions available for everything you listed. For recording for a specified amount of time, I think you'll want to create a time selection of the desired start and end position and disable the [repeat] button in the Transport controls.

Additionally using SWS Extensions, you can use project markers to run any Action(s) you'd like as the play cursor passes over them during playback and recording. This opens up the floodgates regarding automating REAPER. Info on it can be found here:
http://www.sws-extension.org/markeractions.php

REAPER will work fine on Windows 7 which is all I use. Windows 8, 8.1 and 10 can go die in a hole as far as I'm concerned.
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.

Last edited by mikeroephonics; 12-02-2017 at 04:04 PM.
mikeroephonics is online now   Reply With Quote
Old 12-02-2017, 06:13 PM   #4
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

I already had SWS Extensions, but didn't know about using it to automate. (See? This is why I come here... y'all give great answers!)

I will need to play with these over the next several weeks, and that may lead to more posts / questions. Unfortunately I only get access to this soundboard a few hours a week, and just about all of that time is 'getting down to business'... hardly any time to mess with the settings and experiment.

Quote:
Originally Posted by mikeroephonics View Post

Additionally using SWS Extensions, you can use project markers to run any Action(s) you'd like as the play cursor passes over them during playback and recording. This opens up the floodgates regarding automating REAPER. Info on it can be found here:
http://www.sws-extension.org/markeractions.php
Opening your link I came across something that I've been meaning to ask... what exactly does it mean to 'punch' in Reaper?
tXShooter is offline   Reply With Quote
Old 12-02-2017, 06:49 PM   #5
Fergler
Human being with feelings
 
Fergler's Avatar
 
Join Date: Jan 2014
Posts: 3,461
Default

It means recording into an area of time where audio already exists.

In tape days, it meant recording over existing material, destructively (erasing the magnetized tape, while recording to it).

In Reaper it means recording to a new take within the time selection, or from the cursor until stop, depending on what type of punch you are using. Right click the transport record arm button.
__________________
Check out my hip-hop, funk-rock band Theatre Crisp
Fergler is offline   Reply With Quote
Old 12-02-2017, 07:06 PM   #6
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by Fergler View Post
It means recording into an area of time where audio already exists.

In tape days, it meant recording over existing material, destructively (erasing the magnetized tape, while recording to it).

In Reaper it means recording to a new take within the time selection, or from the cursor until stop, depending on what type of punch you are using. Right click the transport record arm button.
So in my case I probably wouldn't need it since I'm just interested in obtaining a recording from start to finish in a single take for 32 tracks. Right?
tXShooter is offline   Reply With Quote
Old 12-03-2017, 01:22 AM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,645
Default

I do hope that this turns out to be easy with the means provided out of the box by Reaper and SWS, but just for the record, if other ways fail:

A friend of mine did a completely automated setup using Reaper and a program he did in Python, which is communicating with Reaper via "Beyond Python". Here you just
- push a (Hardware-Midi) button to start a multi-track recording in a new project created from a template
- push another hardware button to stop the recording. The project is then automatically mixed and rendered to an mp3 file, and same is uploaded to a website that can instantly be used by the friend of the contributors to the song-contest.

-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 12-03-2017, 06:28 AM   #8
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by mschnell View Post

A friend of mine did a completely automated setup using Reaper and a program he did in Python, which is communicating with Reaper via "Beyond Python". Here you just
- push a (Hardware-Midi) button to start a multi-track recording in a new project created from a template
- push another hardware button to stop the recording. The project is then automatically mixed and rendered to an mp3 file, and same is uploaded to a website that can instantly be used by the friend of the contributors to the song-contest.

-Michael
I don't know Python, but this is right up my ally! By any chance did your friend publish their works for others to use, or at least examine?
tXShooter is offline   Reply With Quote
Old 12-03-2017, 08:43 AM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,645
Default

Quote:
Originally Posted by tXShooter View Post
I don't know Python, but this is right up my ally! By any chance did your friend publish their works for others to use, or at least examine?
He runs a software and hardware consultant company and so I doubt he is inclined to give this away for free. But if you have specific questions, I might be able to answer. I also just started to do some Python. While he uses a commercial IDE for Python, I installed Eclipse (because I already know how to work with same from other languages) and did some tiny testing programs to get accustomed with the Python syntax.

-Michael
__________________
www.boa-sorte.de
mschnell is online now   Reply With Quote
Old 12-03-2017, 08:57 AM   #10
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 6,336
Default

Is using the web-interface on a smartphone an option?
For start and stop.
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is online now   Reply With Quote
Old 12-03-2017, 10:22 AM   #11
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 2,528
Default

Is there a good reason you need multiple templates? You're not actually using Reaper to mix the show, are you? You just need to record whatever sources they're using at a given time? Why not just record all possible sources every time and sort it out in the mix?

This way you just put Reaper in your startup folder and it'll load up every time the computer boots. Make your default project template have everything armed and ready to go and use a startup action to immediately start recording when it loads, and then set a marker action out so far that stops and saves.

You will have to have somebody there to turn the computer on, but if you've got some master power strip near the actual mixer, you could plug in there. Set your bios to always start when power comes on. That's how my live machine works. Plug in and turn on the power strip in the rack and it just boots and is ready to rock.

Setting the marker is a bit of a question. You'd have to leave some wiggle room so that they can turn everything on a while before the actual performance, and maybe allow for it to go a little long. OTOH, you don't want to roll for so long that they turn the machine back off before it gets that far.

Though with modern gear, that's not as bad as it sounds. You actually can just turn it off in the middle of recording, and you'll have the files for the tracks. The project won't get saved, but the audio files will. Then again a good UPS would come with utilities that can help with that. I've not actually tried it, but you might be able to get the UPS to tell Reaper that it needs to stop, save, and close before it shuts the machine down.

But also G-sun's idea is good. If the problem is just that you can't be there when you need to, the web interface could let you start and stop from about anywhere in the world.
ashcat_lt is offline   Reply With Quote
Old 12-03-2017, 12:46 PM   #12
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by G-Sun View Post
Is using the web-interface on a smartphone an option?
For start and stop.
I will be several states away and am currently unable to port to this computer due to the way they have their network set up, so I'm going to guess that I won't be able to use it.
tXShooter is offline   Reply With Quote
Old 12-03-2017, 04:16 PM   #13
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

For windows, you can use AutoHotkey, which can trigger any Reaper actions, plus opening and closing of programs, plus shutting down the computer.

You only need to find out first which actions are doing what you want exactly, then just using those in the AutoHotkey program. You would put this AutoHotkey program into 'Autostart' and it would run and do its job. The job could be conditional of day and time. You could define as many scenarios as you want. But get one simplest case working first, then you can extend to as many as you want.

1 minute of recording, autorecorded, rendered, renamed using date-time-hour prefix for example, moved to a directory. It also depends on Reaper command line features, the more command line Reaper supports the better. In worst case you would use the above suggestion with auto-custom-action trigger on Reaper startup. But doing the custom action triggering directly from AutoHotkey would give much more freedom and control, like depending on day and time, doing different things.
__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-05-2017, 06:31 AM   #14
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by TonE View Post
For windows, you can use AutoHotkey, which can trigger any Reaper actions, plus opening and closing of programs, plus shutting down the computer.
I'm checking into this. It seems like a simple solution, but is confounded by the complexity of understanding the key presses involved in arriving at the normal operating procedure to start and stop a recording session. This may take several sessions to experiment and get things right.

Thank you.
tXShooter is offline   Reply With Quote
Old 12-05-2017, 06:51 AM   #15
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

No, AutoHotkey can trigger any Reaper action directly, using this:

PHP Code:
ReaperLove(ID) ; function to send to reaper
{
     global
     
Postmessage,0x111,ID,,,ahk_class REAPERwnd
     
return


Example:
PHP Code:
e::  ; open reaconsoleadd action marker to load snapshotclose console
{
    
ReaperLove(53128); open reaconsole
    sendinput 53223  
type text in reaconsole
    send
, {enter}; send enter to set the marker with the re
    winclose
ahk_class #32770    ; close reaconsole
    
return

Here are more examples:
https://forum.cockos.com/showthread.php?t=135453
__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-05-2017, 06:55 AM   #16
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

Two hotstring examples for AutoHotkey, if you want to prevent retyping same stuff again and again, AutoHotkey can do it for you, you would just type the hotstring instead.

For the two examples below you would type: ..markbadsection
or: ..markgoodsection
plus ENTER I think. ..markgoodsection is crazily long.


PHP Code:
#IfWinActive, Edit Marker ahk_class #32770
{

::..
markbadsection:: ; Mark bad sectionthanks to Art Evans
(
Go to start of time selection 40630 MarkersAdd/move marker 1 to play/edit cursor 40657 Go to end of time selection 40631 MarkersAdd/move marker 2 to play/edit cursor 40658
)

::..
markgoodsection:: ; Mark good section for crossfade replacethanks to Art Evans
(
Go to start of time selection 40630 MarkersAdd/move marker 3 to play/edit cursor 40659 Go to end of time selection 40631 MarkersAdd/move marker 4 to play/edit cursor 40660 Time selectionRemove time selection 40635 MarkersGo to marker 1 40161 TransportRewind a little bit 40084 TransportPlay off 1007 ActionPrompt to continue (only valid within custom actions2000 TransportStop 1016 MarkersGo to marker 3 40163 Time selectionSet start point 40625 MarkersGo to marker 4 40164 Time selectionSet end point 40626 ItemSelect all items in current time selection 40717 ItemCopy selected area of items 40060 MarkersGo to marker 1 40161 OptionsRipple editingOff 40309 ItemPaste items/tracks 40058 Time selectionSet time selection to items 40290 ItemSelect all items in current time selection 40717 ItemRemove selected area of items 40312 ItemPaste items/tracks 40058 Item editGrow left edge of items 40225 Item editGrow right edge of items 40228 TransportGo to end of project 40043 MarkersAdd/move marker 1 to play/edit cursor 40657 MarkersAdd/move marker 4 to play/edit cursor 40660 Go to start of time selection 40630 TransportRewind a little bit 40084 Time selectionRemove time selection 40635 TransportPlay off 1007
)


__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-05-2017, 07:01 AM   #17
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

Hotstring example above as hotkeys:

PHP Code:
b:: ; time selectionpress b for selecting as badMark bad sectionthanks to Art Evans
{
    
;
TransportStop
ReaperLove
(1016)

;
Go to start of time selection 
ReaperLove
(40630)

;
MarkersAdd/move marker 1 to play/edit cursor
ReaperLove
(40657)

;
Go to end of time selection
ReaperLove
(40631)

;
MarkersAdd/move marker 2 to play/edit cursor
ReaperLove
(40658)

;
TransportPlay off
ReaperLove
(1007)

Return
}

g:: ; Mark good section for crossfade replacethanks to Art Evans
{
    ;
Go to start of time selection 
    ReaperLove
(40630)

;
MarkersAdd/move marker 3 to play/edit cursor 
ReaperLove
(40659)

;
Go to end of time selection
ReaperLove
(40631)

;
MarkersAdd/move marker 4 to play/edit cursor
ReaperLove
(40660)

;
Time selectionRemove time selection
ReaperLove
(40635)

;
MarkersGo to marker 1
ReaperLove
(40161)

;
TransportRewind a little bit
ReaperLove
(40084)

;
TransportPlay off
ReaperLove
(1007)

;
ActionPrompt to continue (only valid within custom actions)
ReaperLove(2000)

;
TransportStop
ReaperLove
(1016)

;
MarkersGo to marker 3
ReaperLove
(40163)

;
Time selectionSet start point
ReaperLove
(40625)

;
MarkersGo to marker 4
ReaperLove
(40164)

;
Time selectionSet end point
ReaperLove
(40626)

;
ItemSelect all items in current time selection
ReaperLove
(40717)

;
ItemCopy selected area of items
ReaperLove
(40060)

;
MarkersGo to marker 1
ReaperLove
(40161)

;
OptionsRipple editingOff
ReaperLove
(40309)

;
ItemPaste items/tracks
ReaperLove
(40058)

;
Time selectionSet time selection to items
ReaperLove
(40290)

;
ItemSelect all items in current time selection
ReaperLove
(40717)

;
ItemRemove selected area of items
ReaperLove
(40312)

;
ItemPaste items/tracks
ReaperLove
(40058)

;
Item editGrow left edge of items
ReaperLove
(40225)

;
Item editGrow right edge of items
ReaperLove
(40228)

;
TransportGo to end of project
ReaperLove
(40043)

;
MarkersAdd/move marker 1 to play/edit cursor
ReaperLove
(40657)

;
MarkersAdd/move marker 4 to play/edit cursor
ReaperLove
(40660)

;
Go to start of time selection
ReaperLove
(40630)

;
TransportRewind a little bit
ReaperLove
(40084)

;
Time selectionRemove time selection
ReaperLove
(40635)

;
TransportPlay off
ReaperLove
(1007)

Return
}

ReaperLove(ID)
{
    global
    
Postmessage,0x111,ID,,,ahk_class REAPERwnd
    
return

__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-05-2017, 07:09 AM   #18
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

You can do same things either using
-actions inside the marker, starting with ! always or
-actions triggered by key bindings, hitting on your qwerty

You can create markers, fill them with content=actions, based on day, time.
Now you need to find out the correct action sequences. Do not forget to report back your results here. What worked out, what not?
__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-05-2017, 07:15 AM   #19
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

Quote:
Originally Posted by tXShooter View Post
It seems like a simple solution, but is confounded by the complexity of understanding the key presses involved in arriving at the normal operating procedure to start and stop a recording session. This may take several sessions to experiment and get things right.
Assuming computer was started, .ahk program in Autostart. What should happen?

- starting Reaper via command line
- wait for 20 seconds, security reasons
- open track template or project
- wait for 20 seconds
- go to some position, if empty project, go to beginning
- wait for time, e.g. computer starts at 11:45, then waiting until 11:55
- start recording, time is 11:55
- wait for a given amount of time, e.g. 2 hours = 120 mins
- stop recording
- render project to a fixed directory, overwrite existing files
- when rendering finished, copy file to another directory using yyyyMMdd_hhmm.wav or mp3 or ogg
- wait 10 seconds
- delete all items from Reaper project
- wait 20 seconds
- close Reaper project
- wait 10 seconds
- close Reaper program
- wait 2 more minutes, just in case someone wants to do something more
- shutdown computer
__________________
PHP Code:
only mup has reaper style coolness

Last edited by TonE; 12-05-2017 at 07:25 AM.
TonE is offline   Reply With Quote
Old 12-05-2017, 07:31 AM   #20
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

After each step you can send notify messages using this at the top of your AutoHotkey program:
PHP Code:
#include Notify.ahk 
Example:
PHP Code:
    channel := 12 4
    Notify
("Info""channel set to " channel3
Here is Notify.ahk
PHP Code:
;;;;;;;
;;;;;  
Notify() 0.45                made by gwarble sept 09
;;;      multiple tray area notifications
;          thanks to Rhys/engunneer/HugoV/Forum Posters
;
;   
Notify([Title,Message,Duration,Options,Image])
;
;     
Title      [!!!]          "" to omit title line
;     Message      []           "" to omit message line
;     Duration    [15]          seconds to show notification
;                                 0  to flash until clicked
;                                <0  to ExitApp on click/timeout
;                               "-0" for permanent and exitOnClick
;     Options                   string of options... see function
;          [
SI=999 GC=Blue...]  most options are remembered (static)
;                               
"Reset" to restore default options
;                                 if you want to show as well, use NO=Reset
;                               "Wait" to wait for a notification  ***
;     
Image []                  Image file name/library or
;                               
number of icon in shell32.dll
;                               Gui Number to "Wait" for          ***
;
;     Return                    
Gui Number used                   ***
;                               
if failed (too many open)
;
Notify(Title="!!!",Message="",Duration=30,Options="",Image="")
{
 Static                ;
Options string"TS=12 GC=Blue..."
 
static GF := 50       ;    Gui First Number  ;= override Gui# used
 
static GL := 74       ;    Gui Last Number   ;= between GF and GL
 
static GC := "FFFFAA" ;    Gui Color         ;   iedon't use GF<=Gui#<=GL
 static GR := 9        ;    Gui Radius        ;       elsewhere in your script
 static GT := "Off"    ;    Gui Transparency
 static TS := 8        ;  Title Font Size
 static TW := 625      ;  Title Font Weight
 static TC := "Black"  ;  Title Font Color
 static TF := "Arial"  ;  Title Font Face
 static MS := 8        ;Message Font Size
 static MW := 550      ;Message Font Weight
 static MC := "Black"  ;Message Font Color
 static MF := "Roboto"  ;Message Font Face
 static BC := "000000"  ; Border Colors
 static BW := 2        ; Border Width/Thickness
 static BR := 13       ; Border Radius
 static BT := 105      ; Border Transpacency
 static BF := 150      ; Border Flash Speed
 static SI := 350      ;  Speed In (AnimateWindow)
 static SC := 100      ;  Speed Clicked (AnimateWindow)
 static ST := 450      ;  Speed TimeOut (AnimateWindow)
 static IW := 32       ;  Image Width
 static IH := 32       ;  Image Height
 static IN := 0        ;  Image Icon Number (from Image)
 static AX := 0        ; Action X Close Button (maybe add yes/no ok/cancel, etc...)
 local AC, AT          ;Actions Clicked/Timeout
 local _Notify_Action, ImageOptions, GY, OtherY

_Notify_:
 local NO := 0         ;NO is Notify Option [NO=Reset]
 If (Options)
 {
  IfInString, Options, =
  {
   Loop,Parse,Options,%A_Space%
    If (Option:= SubStr(A_LoopField,1,2))
     %Option%:= SubStr(A_LoopField,4)
   If NO = Reset
   {
    Options := "GF=50 GL=74 GC=FFFFAA GR=9 GT=Off "
     . "TS=8 TW=625 TC=Black TF=Arial MS=8 MW=550 MC=Black MF=Arial "
     . "BC=Black BW=2 BR=9 BT=105 BF=150 SC=300 SI=250 ST=100 "
     . "IW=32 IH=32 IN=0"
    Goto, _Notify_
   }
  }
  Else If Options = Wait
   Goto, _Notify_Wait_
 }


 GN := GF
 Loop
  IfNotInString, NotifyList, % "|" GN
   Break
  Else
  If (++GN > GL)
    Return 0              ;=== too many notifications open!
 NotifyList .= "|" GN
 GN2 := GN + GL - GF + 1
 If AC <>
  ActionList .= "|" GN "=" AC

 Prev_DetectHiddenWindows := A_DetectHiddenWindows
 Prev_TitleMatchMode := A_TitleMatchMode
 DetectHiddenWindows On
 SetTitleMatchMode 1
 If (WinExist("NotifyGui"))  ;=== find all Notifications from ALL scripts, for placement
  WinGetPos, OtherX, OtherY  ;=== change this to a loop for all open notifications?
 DetectHiddenWindows %Prev_DetectHiddenWindows%
 SetTitleMatchMode %Prev_TitleMatchMode%

 Gui, %GN%:-Caption +ToolWindow +AlwaysOnTop -Border
 Gui, %GN%:Color, %GC%
 Gui, %GN%:Font, w%TW% s%TS% c%TC%, %TF%
 If (Image)
 {
  If FileExist(Image)
   Gui, %GN%:Add, Picture, w%IW% h%IH% Icon%IN%, % Image
  Else
   Gui, %GN%:Add, Picture, w%IW% h%IH% Icon%Image%, c:\windows\system32\shell32.dll
  ImageOptions = x+10
 }
 If Title <>
  Gui, %GN%:Add, Text, % ImageOptions, % Title
 Gui, %GN%:Font, w%MW% s%MS% c%MC%, %MF%
 If ((Title) && (Message))
  Gui, %GN%:Margin, , -5
 If Message <>
  Gui, %GN%:Add, Text,, % Message
 If ((Title) && (Message))
  Gui, %GN%:Margin, , 8
 Gui, %GN%:Show, Hide, NotifyGui
 Gui  %GN%:+LastFound
 WinGetPos, GX, GY, GW, GH

 If AX =
 {
  GW += 10
  Gui, %GN%:Font, w800 s6 c%MC%
  Gui, %GN%:Add, Text, % "x" GW-11 " y-1 Border Center w12 h12 g_Notify_Kill_" GN - GF + 1, X
 }

 Gui, %GN%:Add, Text, x0 y0 w%GW% h%GH% g_Notify_Action BackgroundTrans
 If (GR)
  WinSet, Region, % "0-0 w" GW " h" GH " R" GR "-" GR
 If (GT)
  WinSet, Transparent, % GT

 SysGet, Workspace, MonitorWorkArea
 NewX := WorkSpaceRight-GW-5
 If (OtherY)
  NewY := OtherY-GH-5
 Else
  NewY := WorkspaceBottom-GH-5
 If NewY < % WorkspaceTop
  NewY := WorkspaceBottom-GH-5

 Gui, %GN2%:-Caption +ToolWindow +AlwaysOnTop -Border +E0x20
 Gui, %GN2%:Color, %BC%
 Gui  %GN2%:+LastFound
 If (BR)
  WinSet, Region, % "0-0 w" GW+(BW*2) " h" GH+(BW*2) " R" BR "-" BR
 If (BT)
  WinSet, Transparent, % BT

 Gui, %GN2%:Show, % "Hide x" NewX-BW " y" NewY-BW " w" GW+(BW*2) " h" GH+(BW*2)
 Gui, %GN%:Show,  % "Hide x" NewX " y" NewY " w" GW, NotifyGui
 Gui  %GN%:+LastFound
 If SI
  DllCall("AnimateWindow","UInt",WinExist(),"Int",SI,"UInt","0x00040008")
 Else
  Gui, %GN%:Show, NA, NotifyGui
 Gui, %GN2%:Show, NA
 WinSet, AlwaysOnTop, On

 If ((Duration < 0) OR (Duration = "-0"))
  Exit := GN
 If (Duration)
   SetTimer, % "_Notify_Kill_" GN - GF + 1, % - Abs(Duration) * 1000
 Else
  SetTimer, % "_Notify_Flash_" GN - GF + 1, % BF

Return % GN

;==========================================================================
;========================================== when a notification is clicked:
_Notify_Action:
 ;Critical
 SetTimer, % "_Notify_Kill_" A_Gui - GF + 1, Off
 Gui, % A_Gui + GL - GF + 1 ":Destroy"
 Gui  %A_Gui%:+LastFound
 If SC
  DllCall("AnimateWindow","UInt",WinExist(),"Int",SC,"UInt", "0x00050001")
 Gui, %A_Gui%:Destroy
 If (ActionList)
  Loop,Parse,ActionList,|
   If ((Action := SubStr(A_LoopField,1,2)) = A_Gui)
   {
    Temp_Notify_Action:= SubStr(A_LoopField,4)
    StringReplace, ActionList, ActionList, % "|" A_Gui "=" Temp_Notify_Action, , All
    If IsLabel(_Notify_Action := Temp_Notify_Action)
     Gosub, %_Notify_Action%
    _Notify_Action =
    Break
   }
 StringReplace, NotifyList, NotifyList, % "|" GN, , All
 SetTimer, % "_Notify_Flash_" A_Gui - GF + 1, Off
 If (Exit = A_Gui)
  ExitApp
Return

;==========================================================================
;=========================================== when a notification times out:
_Notify_Kill_1:
_Notify_Kill_2:
_Notify_Kill_3:
_Notify_Kill_4:
_Notify_Kill_5:
_Notify_Kill_6:
_Notify_Kill_7:
_Notify_Kill_8:
_Notify_Kill_9:
_Notify_Kill_10:
_Notify_Kill_11:
_Notify_Kill_12:
_Notify_Kill_13:
_Notify_Kill_14:
_Notify_Kill_15:
_Notify_Kill_16:
_Notify_Kill_17:
_Notify_Kill_18:
_Notify_Kill_19:
_Notify_Kill_20:
_Notify_Kill_21:
_Notify_Kill_22:
_Notify_Kill_23:
_Notify_Kill_24:
_Notify_Kill_25:
 ;Critical
 StringReplace, GK, A_ThisLabel, _Notify_Kill_
 SetTimer, _Notify_Flash_%GK%, Off
 GK += GF - 1
 Gui, % GK + GL - GF + 1 ":Destroy"
 Gui  %GK%:+LastFound
 If ST
  DllCall("AnimateWindow","UInt",WinExist(),"Int",ST,"UInt", "0x00050001")
 Gui, %GK%:Destroy
 StringReplace, NotifyList, NotifyList, % "|" GK
 If (Exit = GK)
  ExitApp
Return

;==========================================================================
;======================================== flashes a permanent notification:
_Notify_Flash_1:
_Notify_Flash_2:
_Notify_Flash_3:
_Notify_Flash_4:
_Notify_Flash_5:
_Notify_Flash_6:
_Notify_Flash_7:
_Notify_Flash_8:
_Notify_Flash_9:
_Notify_Flash_10:
_Notify_Flash_11:
_Notify_Flash_12:
_Notify_Flash_13:
_Notify_Flash_14:
_Notify_Flash_15:
_Notify_Flash_16:
_Notify_Flash_17:
_Notify_Flash_18:
_Notify_Flash_19:
_Notify_Flash_20:
_Notify_Flash_21:
_Notify_Flash_22:
_Notify_Flash_23:
_Notify_Flash_24:
_Notify_Flash_25:
 StringReplace, FlashGN, A_ThisLabel, _Notify_Flash_
 FlashGN += GF - 1
 FlashGN2 := FlashGN + GL - GF + 1
 If Flashed%FlashGN2% := !Flashed%FlashGN2%
  Gui, %FlashGN2%:Color, Silver
 Else
  Gui, %FlashGN2%:Color, % BC
Return

;==========================================================================
;============================= wait for (or force) a notification to close:
_Notify_Wait_:
 ;Critical
 If (Image)
 {
  Gui %Image%:+LastFound
  If NotifyGuiID := WinExist()
  {
   WinWaitClose, , , % Abs(Duration)
   If (ErrorLevel && Duration < 1)
   {
    Gui, % Image + GL - GF + 1 ":Destroy"
    DllCall("AnimateWindow","UInt",NotifyGuiID,"Int",ST,"UInt","0x00050001")
    Gui, %Image%:Destroy
   }
  }
 }
 Else
 Loop, % GL-GF
 {
  Image := A_Index + GF - 1
  Gui %Image%:+LastFound
  If NotifyGuiID := WinExist()
  {
   WinWaitClose, , , % Abs(Duration)
   If (ErrorLevel && Duration < 1)
   {
    Gui, % Image + GL - GF + 1 ":Destroy"
    DllCall("AnimateWindow","UInt",NotifyGuiID,"Int",ST,"UInt","0x00050001")
    Gui, %Image%:Destroy
   }
  }
 }
Return

__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-05-2017, 07:38 AM   #21
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 1,168
Default

You can do all above also in linux, in wine, as Reaper and AutoHotkey work perfectly there. Then you can even mix linux tools together with Windows tools like AutoHotkey above.
__________________
PHP Code:
only mup has reaper style coolness
TonE is offline   Reply With Quote
Old 12-07-2017, 06:42 PM   #22
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by TonE View Post
No, AutoHotkey can trigger any Reaper action directly, using this:

PHP Code:
ReaperLove(ID) ; function to send to reaper
{
     global
     
Postmessage,0x111,ID,,,ahk_class REAPERwnd
     
return


Example:
PHP Code:
e::  ; open reaconsoleadd action marker to load snapshotclose console
{
    
ReaperLove(53128); open reaconsole
    sendinput 53223  
type text in reaconsole
    send
, {enter}; send enter to set the marker with the re
    winclose
ahk_class #32770    ; close reaconsole
    
return

Here are more examples:
https://forum.cockos.com/showthread.php?t=135453


@TonE
I think that I did something wrong, but haven't a clue what to do about it.I am a total n00b to AutoHotKey.



Larger Screenshot

Last edited by tXShooter; 12-07-2017 at 07:25 PM. Reason: resized the embeded image
tXShooter is offline   Reply With Quote
Old 12-07-2017, 07:05 PM   #23
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

To the OP: If you really want to automate all of these things, AutoHotkey is the path I would recommend... BUT... You could alternatively remote into the machine and test it before recording and do the recording session from a remote machine.

So if your only issue is that you can't make it to the church, you could do it from home.
sumpm1 is offline   Reply With Quote
Old 12-07-2017, 07:27 PM   #24
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

And if going the AutoHotkey route, the following functions are your main ones, just google their examples:

Any key combination of course - simulates your keyboard strokes

Click, or MouseClick - simulates a mouse click.

Sleep x - waits x amount of milliseconds, ie sleep 60000 waits one minute.

WinWait or WinWaitActive or IfWinExist or IfWinActive - Script will pause until that program makes it's way to the front of the screen. There are a few similar functions to research. But just consider what you as a human would do if program you want to modify with your mouse takes a few seconds to load. You'd "wait for window x to exist." So there are these types of functions available.

WinActivate - Makes the requested program active to the mouse and keyboard.

Run - Runs a program or ahk script.

----

Scripting approach:

You can write functions. The functions needn't return anything, it may just be a set of mouse clicks or keyboard presses. So you can break your tasks down into subtasks like record(), stop(), save()... And define them And you can just call these functions like

WinActivate, Reaper.exe;
Sleep, 5000;
record();
Sleep, 60000;
stop();
Sleep, 10000;
save();
Sleep, 10000;
etc.....

Your functions would look like

record()
{
WinActivate, ...
Sleep...
MouseClick...
}

typing record() will perform all enclosed tasks.

----

the example above:

e::
{
command...
command...
command...
}

is to be used if you wanted 'e' to be a hotkey for the enclosed commands. In your case you needn't make any hotkeys, you just need functions as described above; triggered after sleep commands to wait the proper time.

----

You can create a single script that uses appropriate length sleep commands to do all of the scheduling. For example, sleep 60000*60 would wait an hour, and then

Or you can make individual scripts, one for each recording session of the day. Each of these will be a separate ahk file. Use any freeware scheduling software or windows task scheduler to run the ahk file at the appropriate time.

----

But as I mentioned, if I just couldn't physically get to the set, I'd remote into the machine from home, could even be done from phone or ipad.

And you could also just set your recording format to something more compressed, rarely would really affect mix quality, set to 0.9 quality ogg, file size is super small. Record the entire day to one long session. Download that day's folder and chop up the recording and place them in the right tracks and save each project and clean the whole thing up from your home machine. You could have Reaper work out of a google docs folder that will automatically sync the record folder you your google drive. You could have all the sessions available from home to work on.

So there are more options than just automation scripting.

Last edited by sumpm1; 12-07-2017 at 07:43 PM.
sumpm1 is offline   Reply With Quote
Old 12-07-2017, 07:33 PM   #25
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by sumpm1 View Post
To the OP: If you really want to automate all of these things, AutoHotkey is the path I would recommend... BUT... You could alternatively remote into the machine and test it before recording and do the recording session from a remote machine.

So if your only issue is that you can't make it to the church, you could do it from home.
I'm liking the idea of AutoHotKey, but it's something I've never even heard of before, let alone seen, so my learning curve is currently at the bottom of the gutter at the moment.

As to the other idea, I guess you didn't catch my comment before where I will be several states away and do not have access to the LAN setup in order to port to the recording laptop. I have at the very least tested my recording laptop rig via VPN WHILE I was onsite, so at least I know it works. (One major issue with VPN over the internet for me is that the bandwidth at this church is quite small on the upload due to live streaming to YouTube (and we believe that another VPN channel is currently open 24/7 by the LAN administrator from another city, which would explain some of the issues we're having with the live streaming... not my zoo, not my monkeys.)
tXShooter is offline   Reply With Quote
Old 12-07-2017, 08:05 PM   #26
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by sumpm1 View Post
You could have Reaper work out of a google docs folder that will automatically sync the record folder you your google drive. You could have all the sessions available from home to work on.
On that subject, won't there be a risk of the synchronizing service interfering with the recording because it's trying to upload a file that is currently open?

I'm already working on scheduling a batch file to move the recordings to an OneDrive cloud folder AFTER the session, but I'm doing it that way because I'm afraid it would mess up the recording to directly record into that cloud folder. Have you tried this idea? (I'm really interested in this approach as part of my automation solution.)
tXShooter is offline   Reply With Quote
Old 12-07-2017, 11:04 PM   #27
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

Quote:
Originally Posted by tXShooter View Post
Have you tried this idea?
Yes, I have used it. The windows program is now called "Backup and Sync." Once installed you tell it which of your Drive folders you want to sync to this machine. Start working out of one of those folders in Reaper at the church. Any files deleted or updated will work just fine on the local machine, and will appropriately disappear online or on other synced machines to reflect the local machine.

You may want to ensure the same folder location on both machines though, just in case Reaper doesn't handle that. For example, make the folder C:/Reaper/Projects on both machines be used by Reaper on each machine.

And you can try the lossy format. See if your ears really hear a difference. Most sources are mono and aren't nearly as complex as industry music; ogg files are so tiny for these tracks. Uploads would be quicker and more reliable.

I have attached the ahk script my machine runs at loadup, rename to .ahk if you wish to run, but you needn't run it, just read some of the functions. I have made hundreds of functions over the years in that file for various programs and tasks. It needn't make sense to you, but you can see hundreds of examples and get an idea for the available functions...
Attached Files
File Type: txt ahkExamples.txt (85.7 KB, 9 views)

Last edited by sumpm1; 12-07-2017 at 11:09 PM.
sumpm1 is offline   Reply With Quote
Old 12-08-2017, 09:39 AM   #28
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by sumpm1 View Post
Yes, I have used it. The windows program is now called "Backup and Sync." Once installed you tell it which of your Drive folders you want to sync to this machine. Start working out of one of those folders in Reaper at the church. Any files deleted or updated will work just fine on the local machine, and will appropriately disappear online or on other synced machines to reflect the local machine.
I'm using Windows 7 for the recording laptop, and I'm not seeing that "Backup and Sync". It does have a "Backup and Restore" and a "Sync Setup" in the Control Panel. I don't think it would be the Back up and Restore because if I remember correctly, that's just to keep the OS from losing data and settings if something goes wrong. The other "Sync Setup" isn't looking very friendly with "Before you can sync anything, you need to set up a sync partnership for it. If the item you want to syn with is not listed here, your computer might not be able to detect it or it might be incompatible with Sync Center." and there's not an option to create a sync partnership. Soooo.... I'm not sure what to do there. I did, however, install and set up MS OneDrive, but that goes back to my other question about syncing active files.

Quote:
Originally Posted by sumpm1 View Post
You may want to ensure the same folder location on both machines though, just in case Reaper doesn't handle that. For example, make the folder C:/Reaper/Projects on both machines be used by Reaper on each machine.
Good advice, and it makes sense.

Quote:
Originally Posted by sumpm1 View Post
And you can try the lossy format. See if your ears really hear a difference. Most sources are mono and aren't nearly as complex as industry music; ogg files are so tiny for these tracks. Uploads would be quicker and more reliable.
When you say 'ogg file', are you talking about rendering file format or the actual recording file format? Currently mine is setup to record to MP3 CBR 128, and for 32 channels for 2 hours, it's a lot of data storage (Some channels don't even get used about 90% of the time, but hey, if they decide to light up all of the inputs, I will need to be able to record them at any given time). I will be using my 'At Home' computer to perform the rendering, which for one thing it is MP3 and another it is WAV file.

{Keep in mind, when I record a session, there are about 8-10 'functions' getting recorded. Depending on the time of the service there can be up to 4 choir songs (that's about 8 channels there each song between vocals and instruments), up to 3 music specials (that ranges from 2 inputs (solo vocal plus piano) to 15 inputs (vocals and instruments), and up to 4 different mics for the preacher and other announcements... some of these overlap (piano and pulpit mic mostly) throughout the recording, and just about 90% of the rest are random from one service to the next.}

Quote:
Originally Posted by sumpm1 View Post
I have attached the ahk script my machine runs at loadup, rename to .ahk if you wish to run, but you needn't run it, just read some of the functions. I have made hundreds of functions over the years in that file for various programs and tasks. It needn't make sense to you, but you can see hundreds of examples and get an idea for the available functions...
That is a LOT of information to take in. WOW! However, not only am I not quite understanding how to start using AHK, I'm still stuck on how I will go about getting Windows task scheduler to auto-initiate something... or is there a mean to have AHK perform a task on a schedule without having to use the Windows scheduler? As it is now, I'm getting that error on line 10 in my image above, and I'm not sure what that's about.
tXShooter is offline   Reply With Quote
Old 12-08-2017, 01:08 PM   #29
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

Quote:
Originally Posted by tXShooter View Post
I'm not seeing that "Backup and Sync".
It is a google program you must download and install. It used to simply be called Google Drive for PC. Of course you must already have a gmail or google account.

Quote:
Originally Posted by tXShooter View Post
When you say 'ogg file', are you talking about rendering file format or the actual recording file format? Currently mine is setup to record to MP3 CBR 128
Yes, I am saying under project preferences (alt+enter) set recording format to ogg. If you are already using 128cbr mp3, then it is comparable or better in quality to that. And during silence on that track, since it is using vbr instead of cbr, barely any data will be used.

Quote:
Originally Posted by tXShooter View Post
not only am I not quite understanding how to start using AHK, I'm still stuck on how I will go about getting Windows task scheduler to auto-initiate something... or is there a mean to have AHK perform a task on a schedule without having to use the Windows scheduler?
Here is the main outline of the process:

1. Create a .ahk file. It contains functions or commands similar to my example functions. You can use a text editor, save as .ahk instead of .txt, and the .ahk file NOW ACTS LIKE AN EXECUTABLE EXE FILE. If you double click or run that .ahk file, all the commands inside will execute.

2. Test the .ahk file. Run it like you would any executable, and make sure it does what you programmed it to do. If that means opening a template project in reaper - saving it to a project name of todaysdate_andtime - hitting the record button - then hitting stop 2 hours later - then saving the project - then closing the project; then execute your written .ahk file and make sure it does that successfully.

3. Use windows task scheduler, or any freeware task scheduling software, to execute the .ahk (just as an exe would be executed) at your chosen time. Done.

Quote:
Originally Posted by tXShooter View Post
Keep in mind, when I record a session, there are about 8-10 'functions' getting recorded.
The way I would handle this:

Method A: Let's say choir is always recorded the same. Create a template project for the scenario recorded at whatever time. Create "ChoirTemplate.RPP" as your template project setup to your recording preference, save it as a project or project template, and open it prior to choir time, once the recording session is over, the project will be saved as "Choir TodaysDate CurrentTime.RPP." And make sure that you are saving the project to its own folder.

Create a choir.ahk file, execute this with task scheduler at the desired time to perform choir recording.
Create a sermon.ahk file, task schedule that.
Create a service.ah file, ...
One for each separate reaper project you would like.

Method B: Let's say specials are inconsistently recorded. If you are fine with creating a template or project file unique to each week's service, you can do that. But if you want this to be automated, you can instead create a "worst case scenario" project template that is prepared for all cases. If max tracks recording is 15, setup that scenario. If only 5 instruments play, you can delete the unused tracks on editing. And silent ogg files take up hardly any space (I tested it, one minute of silent ogg file uses 10Kb of space! That is 0.6mb per hour! Very small)

Method C: Least work. Create a reaper project that records every input on your interface. If that is 16, set that up. And just open that same project template file to record every session. Delete the unused tracks when editing at home. Again, 1MB of ogg file will hold over an hour of silence. So not much wasted disk space here.

Trigger recording.ahk with task scheduler however many times is needed for each service.

Your project will always have 16 recorded tracks, some will be silent if not used.

Method D: The easiest to setup and manage: Same as method c. But just record once each sunday, from church open to close. You will have for example 16 long recorded tracks, and again silence does not waste space. <-- This will be the easiest to trigger with task scheduler without errors.

Then just open the project from home. Split it up at the correct points, and edit however you want; create new project files if you want, or put it all in one giant project, your discretion.

If I were doing this, and didn't want to have to be a scripting pro to handle all these various scenarios, I WOULD CHOOSE METHOD D. Less chances that the scripting will screw up and ruin today's recordings. Less troubleshooting of scripts and task scheduler. Less testing. Very reliable setup. Just messier to edit. But the editing is at your full control, not really difficult IMO.

----

The hardest part is getting the .ahk file written and working, that is the time consuming part. The rest is no different from executing whatever.exe at 8am with task scheduler.

Let me know if you need more help. I'll be glad to help you get started. You can create these ahk files on your home machine, get them working there, and then modify them to fit the church machine.

I'd be willing to google chat with you. Then I could see your screen and you could see mine and we could discuss in realtime, get this setup quickly for you. My handle is capoman1@gmail.com

Last edited by sumpm1; 12-08-2017 at 02:04 PM.
sumpm1 is offline   Reply With Quote
Old 12-08-2017, 03:53 PM   #30
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default Stuck launching the program

I'm keen to start each session recording all 32 tracks at once for 2 hours each until I'm confident that I can create a more specific set of templates, but I am liking that idea of shortening up the filesize, but only if it doesn't compromise the quality. I'm running a risk of having it 128kb as it is (and yes, I can hear the difference between CBR and VBR at 128... kind of annoying to tell the truth).

As it is now, we get maybe 3 minutes heads up as to who is singing, choir vs special vs congregation, and in what order (people not showing up on time), and the preacher rarely ever starts at the same time. Add in announcement and baptisms, we average about 1 hour and 40 minutes per service but have had a few occasions of going nearly 2 full hours, so it can vary a lot.



I've downloaded AutoHotKey, and after watching about 20 different YouTube videos I finally managed to get it plus Notepad++ installed with some definitions and autofill plugin-type stuff... kinda neat IMO. Some of it works and some of it doesn't, compared to what was shown in some of the videos. (Btw, there was a serious disconnect in the knowledge that you have to create a script outside of the program before you can use AHK, and doing that much took a few lessons (UTF-8, extension, etc.).



Right now, for whatever reason, Windows 10 (64 Home) is not recognizing my hotkey combination of Ctl+Shft+R (^+R:: ) to launch the AHK script. It's not even putting an icon in the system tray. If I right-click and select "Run Script" on the .ahk file, it will launch Reaper just as though I double click on its desktop icon.

My script is this:
Code:
#SingleInstance Force
^+R::Run, C:\Program Files\REAPER (x64)\reaper.exe
	return
^+X::ExitApp
And I have to exit the script with the ^+X shortcut.

Got any ideas?

PS. I don't have Google Chat.
tXShooter is offline   Reply With Quote
Old 12-09-2017, 01:34 PM   #31
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

Well it would be so much quicker and simpler if you had a gmail account, we could talk and share screens. It is free, you can use this username to create one right now. You need one anyways to use google drive cloud storage.

But here is how your script could look using the F1key to reload script after changes, and F2 as the test function button. And you needn't run your script from a hotkey, you can double click it to start it, and then define hotkeys in the script that run each sub function you are trying to test at the moment, like I did for F1 and F2.

Code:
global projectLength = 60000; 60000ms = one minute, use 60*60000 for an hour

F1::
{
	reload; reloads the current script
}

F2:: ;test your script
{
	reaperStartup();
	Sleep, 1000
	reaperLoadTemplate()
	Sleep, 1000
	reaperRecord()
	Sleep, projectLenth
	reaperStop()
	Sleep, 1000
	reaperSave()
	return
}


reaperStartup() ;if reaper is open, just activate it. If not, run reaper
{
	IfWinExist, ahk_class REAPERwnd
	{
		WinActivate, ahk_class REAPERwnd; obtained from window spy, see screenshot
		Sleep, 1000
		WinWaitActive, ahk_class REAPERwnd; will make sure Reaper is not busy
	}

	Else
	{
		Run, C:\Program Files\REAPER (x64)\reaper.exe
		Sleep, 1000
		WinWaitActive, ahk_class REAPERwnd
		return
	}
}

reaperLoadTemplate()
{
	Run, C:/Reaper/Projects/ChoirTemplate.RPP
	Sleep, 10000; let the project load
	SendInput, ^!s; save project as
	WinWaitActive, ahk_class #32770; save as dialog
	Sleep, 1000
	FormatTime, CurrentDateTime,, yyMMddHHmm
	SendInput, %CurrentDateTime% ; will type the date as the project name
	Sleep, 1000
	Click, 180, 492; obtained from window spy, see screenshot, enables create subdirectory
	Sleep, 1000
	SendInput {ENTER}; completes the save as dialog
	Sleep, 3000; we are back in reaper now
	return
}

reaperRecord()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	Click, 238, 659; location of record button or alternatively
	SendInput, ^r ; reaper's record hotkey
}

reaperStop()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	Click, 160, 659; location of stop button or alternatively
	SendInput, {SPACE} ; reaper's stop hotkey
}

reaperSave()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	SendInput, ^s ; reaper's save hotkey
}
Now once you have finished testing, and the script is working to your liking, make these changes to the same script file or save as a new ahk file and make these changes. This new script file will do everything that worked in the F2 testing hotkey previously; so no more reliance on user hotkey presses.

All actions will be put into a main() function. And main() will be the first and only thing to run in this script.

Code:
global projectLength = 60000; variable, 60000ms = one minute, use 60*60000 for an hour

main(); note that main is the only thing executing

F1::
{
	reload; reloads the current script
}

F2::
{
	reaperStartup();
	Sleep, 1000
	reaperLoadTemplate()
	Sleep, 1000
	reaperRecord()
	Sleep, projectLenth
	reaperStop()
	Sleep, 1000
	reaperSave()
	return
}

main()
{
	reaperStartup();
	Sleep, 1000
	reaperLoadTemplate()
	Sleep, 1000
	reaperRecord()
	Sleep, projectLenth
	reaperStop()
	Sleep, 1000
	reaperSave()
	return
}

reaperStartup() ;if reaper is open, just activate it. If not, run reaper
{
	IfWinExist, ahk_class REAPERwnd
	{
		WinActivate, ahk_class REAPERwnd; obtained from window spy, see screenshot
		Sleep, 1000
		WinWaitActive, ahk_class REAPERwnd; will make sure Reaper is not busy
	}

	Else
	{
		Run, C:\Program Files\REAPER (x64)\reaper.exe
		Sleep, 1000
		WinWaitActive, ahk_class REAPERwnd
		return
	}
}

reaperLoadTemplate()
{
	Run, C:/Reaper/Projects/ChoirTemplate.RPP
	Sleep, 10000; let the project load
	SendInput, ^!s; save project as
	WinWaitActive, ahk_class #32770; save as dialog
	Sleep, 1000
	FormatTime, CurrentDateTime,, yyMMddHHmm
	SendInput, %CurrentDateTime% ; will type the date as the project name
	Sleep, 1000
	Click, 180, 492; obtained from window spy, see screenshot, enables create subdirectory
	Sleep, 1000
	SendInput {ENTER}; completes the save as dialog
	Sleep, 3000; we are back in reaper now
	return
}

reaperRecord()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	Click, 238, 659; location of record button or alternatively
	SendInput, ^r ; reaper's record hotkey
}

reaperStop()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	Click, 160, 659; location of stop button or alternatively
	SendInput, {SPACE} ; reaper's stop hotkey
}

reaperSave()
{
	WinActivate, ahk_class REAPERwnd
	Sleep, 1000
	SendInput, ^s ; reaper's save hotkey
}
So that is the main workflow. And use window spy program from Autohotkey's program folder to find click positions on screen and window names:



An example of finding the create subdirectory button position: Note the screen resolution of the intended machine must be used. If the church machine is 720p for example, make sure to use that resolution on your home machine while scripting. And all window sizes must stay consistent. Create a "click" command for a window, and if the window size is changed, that click command may not work as intended.



Anyways, if you wish for further help, create a gmail account and we can google hangout to share screens and talk. Doing this all in forum posts is making helping you extra annoying. If you want me to help, help me by opening a gmail account.

Last edited by sumpm1; 12-09-2017 at 01:54 PM.
sumpm1 is offline   Reply With Quote
Old 12-10-2017, 06:31 AM   #32
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by sumpm1 View Post
Doing this all in forum posts is making helping you extra annoying.
Didn't mean to be a bother, dude. My bad.
tXShooter is offline   Reply With Quote
Old 12-10-2017, 11:26 AM   #33
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

Not a bother, actually enjoy helping and sharing what I now. Just letting you know that it could be 10x easier to help brother. Forum posting will be the slowest, most difficult form of sharing info. So if you do value my help, just asking you to respect how slow forum posting is and that I could help you and have this done in one discussion.

Last edited by sumpm1; 12-10-2017 at 11:56 AM.
sumpm1 is offline   Reply With Quote
Old 12-10-2017, 11:39 AM   #34
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 6,502
Default

At the risk of having something thrown at me...

Just a sanity check (in a church? hmmm...)

When you compress files to FLAC, besides being fully lossless, sections of recorded tracks with zero or very low signal get compressed to almost zero size. FLAC sees the blank audio and reduces it to almost zero.

So if the concern is file size and not having to edit dead air, the FLAC format might be a simple solution right out of the box.
__________________
Mac Pro 8x3.33GHz i7, 16GB, 256GB SSD(OS, apps), 3x2TB 7200 HD(data); MacBook Pro 2.8GHz, 6GB, 128GB SSD HD(OS, apps), 750GB 7200 HD(data); 2xTrue Precision 8; Apogee AD-16; 2xMOTU 828mk3, Evolution UC-33e; Faderport; WiRanger, iPad & the analog mixer has retired
serr is offline   Reply With Quote
Old 12-11-2017, 08:28 PM   #35
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by serr View Post
When you compress files to FLAC, besides being fully lossless, sections of recorded tracks with zero or very low signal get compressed to almost zero size. FLAC sees the blank audio and reduces it to almost zero.
Which is better in Reaper? FLAC, Ogg Vorbis, or Ogg Opus?

SumPM1 mentioned Ogg, but I've never used that format before. My last session was set to FLAC, and it wasn't too bad. My next session I will be trying Ogg Vorbis VBR @ 1.0 quality.
tXShooter is offline   Reply With Quote
Old 12-11-2017, 08:49 PM   #36
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default

Quote:
Originally Posted by sumpm1 View Post
Not a bother, actually enjoy helping and sharing what I now. Just letting you know that it could be 10x easier to help brother. Forum posting will be the slowest, most difficult form of sharing info. So if you do value my help, just asking you to respect how slow forum posting is and that I could help you and have this done in one discussion.
As much as I do value and appreciate speedy responses, especially on this type of subject, I am not in any way able to predict my availability. I'm also very hesitant at letting someone into my computer without knowing how Google Chat works... never used it and don't know anyone else that does. I'm sorry. So, much in the vane of texting, me shooting messages here and there when I can get to them is about the best that I can do at the moment.

As it is, I am just now getting around to trying out some more AHK using your much appreciated example script from the other day. It's taken me a while to understand how to get started, but I am SLOOOOOWWWLY starting to see the light at the end of the tunnel. I am indeed very much liking how AHK works.

One more challenge that I'm facing (or adding to the fire?) is that when Reaper stops recording, it pops up a dialog box asking what to do with all of the files (Save All... not a problem to figure out using the Spy tool). My issue is that part of following that step will be to save the project and then shut down; however, saving all of the files at around 2.75 hours worth of recording (each, x 32) on a slower laptop running Windows 7 is a time consuming task... one that isn't very predictable and has at times taken close to 10 minutes to complete.

Is there a means (besides Sleep) of having AHK detect when the save function is complete and Reaper's main window focus is back to normal before taking the next two steps? I was trying to find something that detected this change on AHK's help site, but not sure what the script is actually looking at... the status of a window, or the transition states from Active to Inactive and back before setting an errorlevel.

Again... my ignorance is showing. Sorry.
tXShooter is offline   Reply With Quote
Old 12-12-2017, 09:30 AM   #37
serr
Human being with feelings
 
Join Date: Sep 2010
Posts: 6,502
Default

Quote:
Originally Posted by tXShooter View Post
Which is better in Reaper? FLAC, Ogg Vorbis, or Ogg Opus?

SumPM1 mentioned Ogg, but I've never used that format before. My last session was set to FLAC, and it wasn't too bad. My next session I will be trying Ogg Vorbis VBR @ 1.0 quality.
Ogg Vorbis is an obsolete format. Similar to AAC I suppose in that it had both lossless and lossy options. The lossless version will do the same thing as FLAC I believe. Perhaps not as efficiently? Not sure if it compresses blank space the same way. Reaper apparently still supports the format but you'd be dealing with converting those files to FLAC anyway at some point. This was an early format like shn that had some limitations (lack of support for higher resolutions, channel counts, etc) compared to FLAC that took over.
__________________
Mac Pro 8x3.33GHz i7, 16GB, 256GB SSD(OS, apps), 3x2TB 7200 HD(data); MacBook Pro 2.8GHz, 6GB, 128GB SSD HD(OS, apps), 750GB 7200 HD(data); 2xTrue Precision 8; Apogee AD-16; 2xMOTU 828mk3, Evolution UC-33e; Faderport; WiRanger, iPad & the analog mixer has retired
serr is offline   Reply With Quote
Old 12-12-2017, 04:58 PM   #38
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

I just recommended ogg because I have used it successfully for years. And I am recommending a lossy codec, not lossless. He is already using 128kb cbr mp3 which is lossy. But the bitrate will be even lower on ogg, and vbr, which I tested, uses nearly zero space for silence, and doesn't need to be converted. The lossy format is for small file size so that the project files will quickly upload for cloud use. I've not had any sync issues with 0.9 quality ogg. I used to have Reaper record my entire work day in the background.

As far as "what's best?" That is up to you and your tastes. Opus does not have good vbr support on Reaper at the moment I don't think. Flac lossless is still pretty large file sizes. Saving only around half the size of .wav. I've never noticed a quality loss with vorbis. And the file sizes are tiny.

Last edited by sumpm1; 12-12-2017 at 05:12 PM.
sumpm1 is offline   Reply With Quote
Old 12-12-2017, 06:54 PM   #39
tXShooter
Human being with feelings
 
Join Date: Aug 2017
Posts: 77
Default Can you remotely set the Markers during a live recording?

With the much appreciated help of sumpm1 I've managed to build an AHK script that will completely automate the recording sessions based on time and length of recording... I will be testing one session out tomorrow evening via the recording computer's Windows Task Scheduler feature.


A new challenge has propped up for my quest... how to set the markers remotely?

Is there any command that AHK can send via a computer already on the LAN that can tell the recording REAPER software to set a marker while recording live?

I thought about using VNC, which I've been able to achieve directly, but my laptop is fairly new and is capable of doing a lot of things without bogging down too much... there's very little latency between it using ReaStream to monitor the recording via the LAN. However, the other members who are using their computers and laptops for other various tasks... well... they're not quite up to the level of performance I have, and I'm not even sure high performance is required for using ReaStream, let alone this type of setup.

Another issue is that the other members don't have Reaper. I didn't know if maybe there might be a way to do this without having another instance of Reaper for some kind of Master / Slave setup.

Thoughts?
tXShooter is offline   Reply With Quote
Old 12-12-2017, 07:16 PM   #40
sumpm1
Human being with feelings
 
Join Date: Jan 2007
Posts: 569
Default

Quote:
Originally Posted by tXShooter View Post
I've managed to build an AHK script that will completely automate the recording
Good deal. Glad you made some progress. If you spend some time with AHK, it is damn easy to learn, very few commands and easy syntax, and easy to test with the method I described.

Quote:
Originally Posted by tXShooter View Post
how to set the markers remotely?
I'm not sure what you are using markers for. Please explain what you are trying to do with the markers.

If you go into Actions on Reaper and create a hotkey for the type of marker you want, you can trigger that hotkey with SendInput in the AHK script by Sleeping the appropriate time and then sending the keystroke. But not sure what your goal is.

Quote:
Originally Posted by tXShooter View Post
I thought about using VNC... ReaStream to monitor the recording via the LAN... other members don't have Reaper. I didn't know if maybe there might be a way to do this...
Again confusion on my part. I thought you wanted the church machine to record locally on the hard drive. And then access the project file later somehow, either through cloud like google drive or some other method.

Specifically let me what you have in mind in total so I can be of help. Oh and glad I could be of help and you are welcome.
sumpm1 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 03:47 AM.


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