Numeric keypad keyboard reassignments

Comments

Marco. wrote on 6/29/2019, 1:37 PM

Ctrl+4/6 for time compress/stretch works fine here.

But again for your slipping issue: Do you mean Slip Trimming or Event Slipping? Slip Trimming works for me using keystrokes (in expanded edit mode). While Event Slipping is not defined for keystroke use.

Rednroll wrote on 6/29/2019, 1:48 PM

Ctrl+4/6 for time compress/stretch works fine here.

But again for your slipping issue: Do you mean Slip Trimming or Event Slipping? Slip Trimming works for me using keystrokes (in expanded edit mode). While Event Slipping is not defined for keystroke use.


Event slipping? Unsure....please try out the slip mouse tool as I suggested previously so you can see the intended behavior and we won't have any misunderstandings in terminology of naming conventions in regards to keyboard shortcut behavior.

--------------------------------------------------------------------------------

Someone please confirm on their setup.

First try out slip editing with the mouse "Slip" tool.

1. Split an audio event using the "S" key.

2. Select the "Slip" tool with your mouse,then click on the right side of the split audio event. and move your mouse to the Left or Right to visually see the audio waveform "Slip" inside of the event container while the event container remains the same length.

Now try to see that exact same type of behavior using keyboard shortcuts.

1. Split an audio event using the "S" key.

2. Ensure NUM LOCK is turned on the keypad

3. Click on the audio event to the right of the split.

4. Press and hold the ALT key.

5. Continuing to hold the ALT key, press the numeric pad keys 4 or 6 continuously to see if you witness the same type of slip edit function as you did when using your mouse.

Marco. wrote on 6/29/2019, 1:53 PM

Is this what you try to achieve using keystrokes?

Rednroll wrote on 6/29/2019, 2:03 PM

Is this what you try to achieve using keystrokes?

Yes, exactly!

Marco. wrote on 6/29/2019, 2:07 PM

This is Event Slipping and there is no keyboard shortcut available for it. Alt+4/6 is not Event Slipping but Slip Trimming.

I think only way to have Event Slipping done by keyboard shortcut is using AHK again.

Rednroll wrote on 6/29/2019, 2:17 PM

This is Event Slipping and there is no keyboard shortcut available for it. Alt+4/6 is not Event Slipping but Slip Trimming.

I think only way to have Event Slipping done by keyboard shortcut is using AHK again.

I don't have a problem with having to use AHK but what is the keyboard shortcut to start with?

And what the hell is Slip Trimming? By a name like that, Slip Trimming seems like it would mean you're in event Trim mode and I do see something happening there when I press ALT+NUM 4/6 and I'm in Event Trim mode. I'm guessing that is Slip Trimming.

What do you see when using ALT+NUM 4/6 when just in the timeline view with an event selected?

I just see the selected event being moved to the right or left along the timeline.

Former user wrote on 6/29/2019, 2:20 PM

From the help file SLIP TRIM:

As you drag the event edge, the opposite edge of the event will remain fixed, trimming the media from the edge you drag.

Tips:

Rednroll wrote on 6/29/2019, 2:31 PM

From the help file SLIP TRIM:

As you drag the event edge, the opposite edge of the event will remain fixed, trimming the media from the edge you drag.

Tips

:

Yes, and that's what I'm seeing when I'm in event Trim mode

 

From help:

Trimming events

1. Press the Event Trim button to enter event trimming mode.
2. Press the left or right arrow button to select the event edge you want to trim. A red bracket is displayed to indicate which event edge will be trimmed.

Rednroll wrote on 6/29/2019, 2:33 PM

What do you see when using ALT+NUM 4/6 when just in the timeline view with an event selected?

Anyone? Anyone?

I see the event being moved along the timeline....the same as if I hadn't pressed the ALT button.

Marco. wrote on 6/29/2019, 2:34 PM

Slip Trimming is trimming an Event's edge while it does not change the first or the last frame but moving the content instead.

Slip Trimming using keystrokes only works in expanded edit mode.

I can't tell more about the AHK solution today. I'll see tomorrow. I think all it would need to code is

- mouse-click (to select the Event)

- Alt + mouse-drag left/right

"What do you see when using ALT+NUM 4/6 when just in the timeline view with an event selected"

Same as you see what I think is expected if you are not in expanded editing mode.

Rednroll wrote on 6/29/2019, 3:42 PM
 

"What do you see when using ALT+NUM 4/6 when just in the timeline view with an event selected"

Same as you see what I think is expected if you are not in expanded editing mode.

This is where I think the problem is. You now have 2 keyboard assignments doing the same function.

NUM 4/6 does the same as ALT+ NUM 4/6 (pixel)

NUM 1/3 does the same as ALT + NUM 1/3 (Frame)

Then for the Slip Trim function you're describing it's currently defined under the keyboard shortcuts as

ALT+ NUM 4/6 (pixel)

ALT+NUM 1/3 (frame)

but this currently does nothing different as you just mentioned if you hadn't pressed the ALT button. The Slip Trim function has a pre-action requirement where you either have to enter into Trim Mode, or into Expanded Editing Mode as you mentioned previously.

Once you're either in Trim Mode on the timeline, or Expanded Editing Mode, then YES "Slip Trim" is suppose to function when using the ALT+NUM 4/6 and ALT+NUM 1/3 keyboard shortcuts.

When NOT in those modes then ALT+NUM 4/6 and ALT+NUM 1/3 are suppose to function as the Slip function which it is not. THIS IS A BUG and the owner's manual has been changed incorrectly to follow this bug.

THE WAY IT is currently working is NOT the expected behavior I tested this function many times since it's original implementation. I can go back to older versions of Vegas and show you how it was intended to work. Why would you ever want ALT+NUM4/6 working the same as NUM 4/6 when no other keyboard shortcut using the ALT key modifier does?

As I described earlier, I was the person the folks from Sonic Foundry/Sony were working with when they originally implemented the Slip editing functionality and their associated keyboard shortcuts. I'm pretty certain I know how it's intended to work.

Here's the keyboard definitions with the important details pointed out.

It's F'ed up. I know how it's suppose to work but instead of it working like it's supposed to, we have 2 different keyboard shortcuts now doing the same thing and the Slip edit keyboard feature got lost, and then someone who didn't know how it was suppose to function updated the help and owner's manual and updated it incorrectly at that.

 

Marco. wrote on 6/29/2019, 4:16 PM

It's working differently in older versions of Vegas Pro? Which version?

At least for that Event Slipping — I think it never was available as keyboard shortcut.

Rednroll wrote on 6/29/2019, 4:32 PM

It's working differently in older versions of Vegas Pro? Which version?

At least for that Event Slipping — I think it never was available as keyboard shortcut.


Marco, come on now? Which part did you miss when I already described I was on the SF/Sony beta teams for versions 1-6 and I was working with the developers on describing the Neve audiofile editing features and I was testing it for them and providing them feedback as they were developing it? I believe the slip edit function was originally implemented in V2 or V3 and I was using it in my recording studio on a daily basis with those keyboard shortcuts. So which version do I know it was working like how I described? Anywhere between V2 to V6 but I'm going from memory.

Which version of Vegas did you 1st start using it? It may have been broken already by that time.

Marco. wrote on 6/29/2019, 4:55 PM

I started using Vegas Video 2 which was the first version capable of video editing. And I now tested Event Slipping back to version 11, not different from version 16.

I can't remember it's been different in any version since these features were introduced.

Rednroll wrote on 6/29/2019, 5:20 PM

I started using Vegas Video 2 which was the first version capable of video editing. And I now tested Event Slipping back to version 11, not different from version 16.

I can't remember it's been different in any version since these features were introduced.

The keyboard modifier may not have been the ALT key, but I darn well remember there being a keyboard short-cut defined for that slip edit function. I'm digging through old manuals to see if I can find it.

Rednroll wrote on 6/29/2019, 6:38 PM

Regardless if bug or now a new/old feature request I think we've determined it doesn't exist.

Any ideas how to get this working with AHK?

It's currently defined as ALT + drag right/left over the selected event.

I would really like to be able to figure out a way to assign that ALT + Drag right to ALT + NUM 6, and ALT + Drag Left to ALT + NUM 4

Marco. wrote on 6/30/2019, 4:30 AM

Meanwhile I checked back until version 2. It's never been possible to do an Event Slipping by keyboard shortcuts in the "Video" versions of Vegas Pro, it's always been Alt+mouse-dragging only. Maybe it was possible in the early versions of Vegas Audio.
These are all the keyboard shortcuts available for Event editing in VV3:

Keyboard shortcuts for Slip Trimming were introduced in version 9 and it's been working same way in all the versions then – you'd always need to enter the trim-edit mode before you could use Alt+4/6 for Slip Trimming. As you see in the screenshot above - using Alt+4/6 in regular trim mode just moves the Event to not break the legacy mode it had before version 9.

The current list and description of keyboard shortcuts is correct though it just misses the Alt+4/6 command in regular mode. It isn't very clear but the given Alt+4/6 shortcut listed there is put under the main headline of the expanded edit mode.

I'll look for an AHK solution today.

Marco. wrote on 6/30/2019, 6:22 AM

Mmh, much better than a AHK script solution would be a Vegas Pro script which would simply shift the Takes offset of the selected Event.

Marco. wrote on 6/30/2019, 9:35 AM

Yes, Vegas scripting definitely was the better approach than using AHK. I made two JS scripts now (based on the trim script from Ed Troxel) – one script slips the selected Event's video or audio one frame to the left, the other script slips the selected Event's video or audio one frame to the right.

So all you need to do now is copying these JS scripts into the Vegas Pro scripting folder and customize your keyboard to set these scripts to the desired keyboard shortcut. I just did it and set Event Slipping to the keyboard shortcuts Shift+Left/Right and it works fine.

SlipLeft

import System;
import System.IO;
import System.Windows.Forms;
import ScriptPortal.Vegas;

var Slip = new Timecode("00:00:00:01"); //Change this to be slip amount

try {  
  var trackEnum = new Enumerator(Vegas.Project.Tracks);
  while (!trackEnum.atEnd()) {
    var track : Track = Track(trackEnum.item());    
    var eventEnum = new Enumerator(track.Events);
    while (!eventEnum.atEnd()) {
      var evnt : TrackEvent = TrackEvent(eventEnum.item());      if (evnt.Selected) {
          var tke = evnt.ActiveTake;
    var tkeoffset = tke.Offset;
        tkeoffset = tkeoffset + Slip;
               tke.Offset = tkeoffset;
      }
      eventEnum.moveNext();
    }
    trackEnum.moveNext();
  }
} catch (e) {
    MessageBox.Show(e);
}

SlipRight

import System;
import System.IO;
import System.Windows.Forms;
import ScriptPortal.Vegas;

var Slip = new Timecode("-00:00:00:01"); //Change this to be slip amount

try {  
  var trackEnum = new Enumerator(Vegas.Project.Tracks);
  while (!trackEnum.atEnd()) {
    var track : Track = Track(trackEnum.item());    
    var eventEnum = new Enumerator(track.Events);
    while (!eventEnum.atEnd()) {
      var evnt : TrackEvent = TrackEvent(eventEnum.item());      if (evnt.Selected) {
          var tke = evnt.ActiveTake;
    var tkeoffset = tke.Offset;
        tkeoffset = tkeoffset + Slip;
               tke.Offset = tkeoffset;
      }
      eventEnum.moveNext();
    }
    trackEnum.moveNext();
  }
} catch (e) {
    MessageBox.Show(e);
}

 

Rednroll wrote on 6/30/2019, 12:00 PM

Thanks! I'll definitely try these out. I spent a couple hours yesterday working on a AHK script, and while it was a good learning experience with AHK, I was struggling with getting my script to do the mouse Click+drag portion of the Alt+Drag portion of the slip function.

Here's what I had come up with, but doesn't work.

;Heading commands for a script
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
#InstallKeybdHook

;Drag Mouse LEFT when ALT is held down and pressing "k" key.
GetKeyState, Alt_state, Alt ; Get the status of the ALT key
    if Alt_state = D
; Execute following only if alt button is held down
MouseGetPos, MouseX, MouseY
k:
    MouseClickDrag, left, %MouseX%, %MouseY%, -200, %MouseY%
    Sleep 10
    ; MouseMove, -200, %MouseY%, 50, R ; Y-axis will not move verticle
    ; MouseMove, %MouseX%, %MouseY%
    Sleep 500
return

 

Marco. wrote on 7/1/2019, 2:03 AM

I doubt in this particular case AHK solutions will work fine. There are several quirks occuring. The AHK scripts I made worked, but always needed a mouse-pointer positioning first, then while the script is in action the mouse-pointer may move away again which will switch the editing mode. Some other quirks too.

Instead, the Vegas script solution above works very straight.

Rednroll wrote on 7/4/2019, 11:01 AM

Hi Marco,

Thanks again for the scripts. I was able to modify them and get very close to what I was after.

The only draw back to how I had originally envisioned it is that in the script you have to define a specific slip amount. Where what I had hoped is to get what Vegas provides in regards to it's differentiation between Slip [1 Frame] and Slip [1 Pixel]. Slip [1 Frame] works perfectly since you're able to define the slip amount to 1 Frame as you did. The Slip [1 pixel] amount is defined by your current zoom level. So if you're zoomed out on the event the slip defined amount will be greater, and if you're zoomed in on the event, then slip amount becomes a much more finer amount. I'm wondering if there's a way in a script to have the defined amount of slip be based upon the current horizontal zoom level. It seems like it may be complicated, so no biggie I've got work arounds by just creating multiple scripts.

One thing I found odd when trying this out in Vegas and comparing it to the Vegas ALT+Mouse drag slip editing function.

It's probably best to show this by example.

Audio event start (prior to performing slip edit)

ALT+Mouse Drag to LEFT slip edit performed

Script Slip Edit LEFT

Notice how the offset value on the event is displayed when performing slip edit with the script and not with the ALT+Mouse drag slip edit. Seems kind of odd that they're different. Looking at the script code, it seems the event offset display was added in the script. Do you happen to know which lines are causing the event offset to be displayed?

 

 

Marco. wrote on 7/4/2019, 12:39 PM

Strange, here it is different. If I have a video clip including audio this offset indication appears both using the legacy mouse control as well as the script solution. And if it is an audio only file there is no offset indication either with the legacy mouse control nor with the script.

Do you have a video event associated/grouped with the audio you slip-trim?

Edit:
I see there are several dependencies which could trigger this offset indication appearing or not even when mouse-controling the slip. But I have no idea how I could modify this one by the script code. If you use the Vegasaur Take offset feature same thing happens. So maybe it can't be avoided when using a script solution.

Rednroll wrote on 7/5/2019, 7:13 AM

Yes, I have a video event associated with the audio event and they are currently grouped. When I use the mouse method both the audio and video events slip but no offset displayed but when I use the script both the audio and video slip but there is an offset displayed.

Not fully understanding what each line of the script is doing, I just assumed these lines had something to do with it since they seemed to mention "offset".

var tkeoffset = tke.Offset;
        tkeoffset = tkeoffset + Slip;
               tke.Offset = tkeoffset;