Helpful ReplyStop and backup 2 bars

Author
dougalex
Max Output Level: -86 dBFS
  • Total Posts : 244
  • Joined: 2003/11/18 14:22:24
  • Status: offline
2015/08/14 08:17:40 (permalink)

Stop and backup 2 bars

I want a key binding that gives me a customized "Pause"
 
When I press a key (Enter, for example) I want the transport to "stop and backup 2 bars"
 
Is that possible to create a key binding for that behavior?
#1
bitman
Max Output Level: -34 dBFS
  • Total Posts : 4105
  • Joined: 2003/11/06 14:11:54
  • Location: Keystone Colorado
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 09:17:05 (permalink)
Is this pub crawling question?
 
Sorry.
 
I'll get my coat.
#2
scook
Forum Host
  • Total Posts : 24146
  • Joined: 2005/07/27 13:43:57
  • Location: TX
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 09:59:58 (permalink) ☄ Helpfulby williamcopper 2015/08/14 20:49:02
SONAR has no way to stack command like that.
It could be done in two keystrokes: one to stop the transport and another to run a cal script. The cal script is:
(do
 (if (> Now (makeTime 3 1 0))
    (= Now (makeTime (- (meas Now) 2) 1 0))
    (= Now 0)
 )
)
 
I assumed you want to move Now by whole measures. If not, the CAL script is:
(do
 (dword offset (makeTime 3 1 0))
 (if (> Now offset)
    (-= Now offset)
    (= Now 0)
 )
}
 
It could be performed in a single AutoHotKey binding. This example binds the action to Windows+r and the cal script is called back2.cal.
#r::
  Send, {Space}!pc
  WinWait,Open
  Send, back2{Enter}
  Return


#3
Brando
Max Output Level: -47.5 dBFS
  • Total Posts : 2776
  • Joined: 2003/11/06 11:47:20
  • Location: Canada
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 10:09:40 (permalink)
Scook- you're a goldmine.  Thanks! I'll use this one myself.
(As an aside, maybe Mudgel would consider setting up a repository for your (and others') Autohotkey scripts from his Utilities page. Maybe updated Cals like this too? (I don't mean to volunteer busy people for more than they can do- but it seems a natural place to house them all)).
In any case, thanks again. 

Brando
Cakewalk, Studio One Pro, Reaper
Presonus Audiobox 1818VSL
ASUS Prime Z370-A LGA1151, 32GB DDR4, Intel 8700K i7, 500 GB SSD, 3 x 1TB HDD, Windows 10 Pro 64
#4
scook
Forum Host
  • Total Posts : 24146
  • Joined: 2005/07/27 13:43:57
  • Location: TX
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 10:36:51 (permalink)
I would add, the AutoHotKey script assumes the SPACE key is bound to "Stop At Now." This is the default when "On Stop, Rewind to Now Marker" is disabled. Otherwise, "Stop at Now" by default is bound to CTRL+SPACE. This changes the ahk script to:
#r::
  Send, ^{Space}!pc
  WinWait,Open
  Send, back2{Enter}
  Return
#5
scook
Forum Host
  • Total Posts : 24146
  • Joined: 2005/07/27 13:43:57
  • Location: TX
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 11:03:58 (permalink)
As far a maintaining a repository for this stuff, there is also two Tip of the week threads, one here and one in Techniques. Not sure if this is what Craig intends for those threads.
 
For now I have put this into a document called Stop Transport and Go Back Two Measures in a HowTo folder.
#6
dougalex
Max Output Level: -86 dBFS
  • Total Posts : 244
  • Joined: 2003/11/18 14:22:24
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 21:13:45 (permalink)
OK...Very clever (amazing!)
 
Do I now:
1] copy the CAL code to notepad and save it in the CAL Scripts directory named as "back2.cal" ?
Then,
2] create the key binding?
#7
scook
Forum Host
  • Total Posts : 24146
  • Joined: 2005/07/27 13:43:57
  • Location: TX
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 21:36:53 (permalink)
1. Yes, the CAL needs to be saved into your CAL script folder. The name only matters when creating a keyboard shortcut or calling it from AutoHotKey.
2. If you plan on using the CAL script directly in SONAR, it might be easiest to add a key binding for it. Then you can hit SPACE or CTRL+SPACE as needed and the shortcut for the CAL script.
#8
dougalex
Max Output Level: -86 dBFS
  • Total Posts : 244
  • Joined: 2003/11/18 14:22:24
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 21:50:03 (permalink)
I currently like:
 
SPACEBAR = Stop and go back to Nowtime
 
ENTER (numeric keypad) = Pause (i.e. stop here and create new Nowtime)
 
- (minus key numeric keypad) = Rewind
 
+ (plus key numeric keypad) = FastForward
 
But now I will bind ENTER (numeric keypad) to the CAL script "back2.cal".
 
(Going to try it now)
#9
dougalex
Max Output Level: -86 dBFS
  • Total Posts : 244
  • Joined: 2003/11/18 14:22:24
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 21:56:43 (permalink)
I have to download/install AutoHotKey, right?
 
(Sorry, guess I need more step-by-step instruction)
 
#10
dougalex
Max Output Level: -86 dBFS
  • Total Posts : 244
  • Joined: 2003/11/18 14:22:24
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 22:01:14 (permalink)
But then I guess I cannot use ENTER (numeric keypad) because a AutoHotKey would be "global" and "on all the time".
DOH!
 
(Maybe I should just tap my rewind after stop and succumb to that - even if not the ideal workflow I had in mind)
 
#11
scook
Forum Host
  • Total Posts : 24146
  • Joined: 2005/07/27 13:43:57
  • Location: TX
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 22:14:29 (permalink)
If you want a single key binding for the two operations in SONAR, you need some tool like AutoHotKey. AutoHotKey installs a default ahk script in the root of your "My Documents" directory. I have AutoHotKey setup to run at start up. When running. its icon resides in the notification area. Right-click on the "H" icon and "Edit This Script."" This will open the default script in notepad. Add the ahk script above and save the file then right-click on the "H" icon again "Reload this script." The binding is global and there are ways to guard it from firing outside of SONAR but it is unlikely you will be using the keybinding without SONAR running. I do not use a SONAR key binding in AutoHotKey. It is just as fast to run the CAL script from the SONAR menu and CAL open dialog.
 
The SONAR only solution would be to use two key bindings. One to stop the transport at Now and another to run the back2 CAL script.
#12
DRanck
Max Output Level: -78 dBFS
  • Total Posts : 608
  • Joined: 2013/05/31 18:35:32
  • Location: Sarasota, FL USA
  • Status: offline
Re: Stop and backup 2 bars 2015/08/14 23:51:43 (permalink)
Or if you are lazy like I am, you can spring for a programmable keyboard that allows you to record macros galore. I recently purchased one: http://www.amazon.com/Razer-BlackWidow-Chroma-Mechanical-Keyboard/dp/B00MTWV0II/ref=sr_1_2?ie=UTF8&qid=1439610200&sr=8-2&keywords=razer+blackwidow .
 
The keys are "clicky" which might not suit some. Other brands are quieter. This keyboard also lets me highlight individual keys in different colors, which helps me quickly see my common hotkeys. I set macros to go to the next / previous marker - 1 measure so I can pick up any keyswitches for the section.

My Sound Cloud
Website
Youtube Channel
The way that I've always gone about making music, the rule of thumb, has just been to make what I love.
Amy Lee
 
Sonar Pro 64 (Newburyport), Akai Pro MPK 88, i7-4770K, ASUS Z87-PRO V,  32GB SDRAM 1866, SAMSUNG 840 EVO 500GB SSD, 2 - WD BLACK 2TB, Samsung USB 3.0 SSD, Win 10 Pro 64, Radeon R9 270 Video 2GB, Dell P2314T 23" Touchscreen, Gateway 23" monitor, Presonus USB Audio Interface, Surface Pro 2 w/ Xotopad as a control surface
#13
Jump to:
© 2020 APG vNext Commercial Version 5.1