• SONAR
  • Stop and backup 2 bars
2015/08/14 08:17:40
dougalex
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?
2015/08/14 09:17:05
bitman
Is this pub crawling question?
 
Sorry.
 
I'll get my coat.
2015/08/14 09:59:58
scook
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


2015/08/14 10:09:40
Brando
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. 
2015/08/14 10:36:51
scook
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
2015/08/14 11:03:58
scook
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.
2015/08/14 21:13:45
dougalex
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?
2015/08/14 21:36:53
scook
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.
2015/08/14 21:50:03
dougalex
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)
2015/08/14 21:56:43
dougalex
I have to download/install AutoHotKey, right?
 
(Sorry, guess I need more step-by-step instruction)
 
12
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account