Problems with Macros (PT, Mac)

Post here requests for new features about any Aida Sound product
Post Reply
Holger
Posts: 18
Joined: 03 Mar 2016 15:53
Location: Germany

Problems with Macros (PT, Mac)

Post by Holger » 06 Mar 2016 12:49

I'm on a demo version of Dtouch as I don't have a touchscreen yet, but I wanted to try some of its features.

I tried to create some macros, but there seems to be a problem with the German keyboard layout. I can't add some key commands, as DTouch tells me "Invalid Key!".

This might be related to how PT handles localized keyboards, as some shortcuts "move with the key", for example CMD+Z is also on the Z key on the German keyboard, but in a different position. Some other commands stay on the same physical key, no matter what is printed on it.

I'd like to do a shortcut for "Move selection down one track". On the US keyboard it is on the key below "P". It is also there on the German keyboard. But we have there the letter "Ö". And if I try to use this in a macro, it tells me it is an "Invalid Key".

So, I tried different keys and all the punctuation signs, German umlauts and some others aren't allowed.

For example, I also use quite often CMD+. to abort and discard a recording take. But same here. Impossible to put this key command, as DTouch considers it to be "invalid".

Did I miss there anything? Is it possible to change this behaviour?
 MBPr 15" (Mid 2015) i7, Pro Tools 12.4, Studio One 3, UA Apollo Quad Firewire, DTouch (Hanns.G HT273HPB)

DT_bettinzana
Posts: 772
Joined: 21 Feb 2016 12:05

Re: Problems with Macros (PT, Mac)

Post by DT_bettinzana » 06 Mar 2016 16:06

Holger wrote:I'm on a demo version of Dtouch as I don't have a touchscreen yet, but I wanted to try some of its features.

I tried to create some macros, but there seems to be a problem with the German keyboard layout. I can't add some key commands, as DTouch tells me "Invalid Key!".

This might be related to how PT handles localized keyboards, as some shortcuts "move with the key", for example CMD+Z is also on the Z key on the German keyboard, but in a different position. Some other commands stay on the same physical key, no matter what is printed on it.

I'd like to do a shortcut for "Move selection down one track". On the US keyboard it is on the key below "P". It is also there on the German keyboard. But we have there the letter "Ö". And if I try to use this in a macro, it tells me it is an "Invalid Key".

So, I tried different keys and all the punctuation signs, German umlauts and some others aren't allowed.

For example, I also use quite often CMD+. to abort and discard a recording take. But same here. Impossible to put this key command, as DTouch considers it to be "invalid".

Did I miss there anything? Is it possible to change this behaviour?
Hello Holger, I will ask for help to our developers and we should have an answer tomorrow.
I am not an expert, but I remember that we spent a lot of time to deal with the chaos of different international keyboard layouts, so I think that we should have a solution for you. Please, be patient till tomorrow.
Silvano Bettinzana
Devil Technologies

Support Team
Posts: 120
Joined: 17 Feb 2016 14:23

Re: Problems with Macros (PT, Mac)

Post by Support Team » 07 Mar 2016 14:01

Hi Holger,

You are correct, Pro Tools is somewhat "strange" about keyboard shortcuts for non-US keyboard layouts.

The DTouch "Keyboard Shortcut" Macro Command is meant to send a keyboard shortcut to any app.
Since it must be compatible with any language and keyboard layout, it forbids some keys which cannot be found on some keyboards.
You should always use that Macro Command in order to send a keyboard shortcut, even to Pro Tools.

But, if and only if a very special keyboard shortcut is needed to be sent to Pro Tools, you need to use a special Python function in the Macro Engine:

Code: Select all

pt_shortcut
This function is described in the DTouch User Guide 1.3.0 at Chapter A.1.138
Its task is to send a keyboard shortcut to Pro Tools, using the US keyboard layout.

We already prepared the "Move Selection Down One Track" Macro for you, which sends "CTRL ;" using the US keyboard layout.
You can find it attached here:
Move Selection Down One Track.dat
(662 Bytes) Downloaded 367 times
For the "CMD+" Macro that aborts and deletes last take, you could use the same pt_shortcut Python function.
However, we suggest you an alternative Macro that:
  • Stop playback
  • Send CMD Z
which is more compatible with any keyboard language and layout.
That macro is attached here:
Stop and delete last take.dat
(998 Bytes) Downloaded 360 times

Holger
Posts: 18
Joined: 03 Mar 2016 15:53
Location: Germany

Re: Problems with Macros (PT, Mac)

Post by Holger » 07 Mar 2016 20:40

Thanks a lot for your help.

The two macros you provided work fine, but I try to understand them.

In the "Move selection down" macro, you use:

Code: Select all

dtmacro.pt_shortcut("CTRL ;")
But why CTRL, when PT only expects ";" from the US keyboard?

The second solution I don't like. Stop transport and apply CMD+Z might also delete something else if pressed accidentaly.

So I played around with the pt_shortcut and found:

Code: Select all

dtmacro.pt_shortcut("CMD .")
This does exactly what I want. 8-)

Anyway, I found out DTouch urgently needs the Macro Library for PT/Mac, as nearly everything I try to do doesn't work with the few possibilities provided (or I'm too stupid for this).
 MBPr 15" (Mid 2015) i7, Pro Tools 12.4, Studio One 3, UA Apollo Quad Firewire, DTouch (Hanns.G HT273HPB)

Support Team
Posts: 120
Joined: 17 Feb 2016 14:23

Post by Support Team » 08 Mar 2016 11:25

Holger wrote:The two macros you provided work fine, but I try to understand them.
That's our mission: provide sample Macros so that you learn how to program your ones independently.
Holger wrote:In the "Move selection down" macro, you use:

Code: Select all

dtmacro.pt_shortcut("CTRL ;")
But why CTRL, when PT only expects ";" from the US keyboard?
You activated "Command Keyboard Focus" in Pro Tools. That's described in the "Pro Tools Shortcuts Guide".
Not all users work with this mode active.
So, we provided a Macro that will work for all users, regardless of this setting.
Holger wrote:The second solution I don't like. Stop transport and apply CMD+Z might also delete something else if pressed accidentaly.

So I played around with the pt_shortcut and found:

Code: Select all

dtmacro.pt_shortcut("CMD .")
This does exactly what I want. 8-)
Great. This is the power of DTouch and its Macro Engine: it can adapt to everyone's unique workflow.
So, I see that you made a little progress learning how to program Macros ;)
Holger wrote:Anyway, I found out DTouch urgently needs the Macro Library for PT/Mac, as nearly everything I try to do doesn't work with the few possibilities provided (or I'm too stupid for this).
Please note that the Macro Library simply adds some useful and/or complex Macros, programmed correctly so you can directly use them, without the hassle of crafting them.
Please take a look at the DTouch Macro Library User Guide, that you can find here: http://www.deviltechnologies.com/index. ... umentation.
That's a preview of the Macros that you will find included in the Macro Library for Mac.

Extremely simple Macros that only fire a shortcut won't be included in the Macro Library.

Holger
Posts: 18
Joined: 03 Mar 2016 15:53
Location: Germany

Re:

Post by Holger » 08 Mar 2016 11:50

DT_support wrote:You activated "Command Keyboard Focus" in Pro Tools. That's described in the "Pro Tools Shortcuts Guide".
Not all users work with this mode active.
So, we provided a Macro that will work for all users, regardless of this setting.
Ooops, you're right. Didn't think of that. :roll:
DT_support wrote:Please note that the Macro Library simply adds some useful and/or complex Macros, programmed correctly so you can directly use them, without the hassle of crafting them.
Please take a look at the DTouch Macro Library User Guide, that you can find here: http://www.deviltechnologies.com/index. ... umentation.
That's a preview of the Macros that you will find included in the Macro Library for Mac.
I already read this guide yesterday evening and I found there some macros that would be quite handy to have.

For example:

Code: Select all

DT_Show_Only_Selected_Tracks
DT_Hide_Selected_Tracks
DT_Make_Selected_Tracks_(in)active
But what I didn't find: Duplicate Selected Tracks

Do we have an estimated time frame for the Macro Library to arrive on the Mac?
DT_support wrote:That's our mission: provide sample Macros so that you learn how to program your ones independently.
Now, if we could have some with an If/Else in it?

I'm thinking right now of something like: if macro is initiated from Edit window, send me back to edit after Resync. Is this possible?
 MBPr 15" (Mid 2015) i7, Pro Tools 12.4, Studio One 3, UA Apollo Quad Firewire, DTouch (Hanns.G HT273HPB)

Support Team
Posts: 120
Joined: 17 Feb 2016 14:23

Re: Problems with Macros (PT, Mac)

Post by Support Team » 08 Mar 2016 14:39

Holger wrote:But what I didn't find: Duplicate Selected Tracks
I cannot say if this is even possible; but I'll make sure that Macro is on our to-do list.
Holger wrote:Do we have an estimated time frame for the Macro Library to arrive on the Mac?
I'm sorry but we don't have any ETA for that.
It will arrive when it's ready.
Holger wrote:Now, if we could have some with an If/Else in it?

I'm thinking right now of something like: if macro is initiated from Edit window, send me back to edit after Resync. Is this possible?
Oh yes; please look at this template Macro:
Template Resync then Go back to Edit.dat
(1.43 KiB) Downloaded 366 times
"if" and "else" statements are not available using regular Macro Commands, and so you need to write a bit of Python code in order to use them.

Holger
Posts: 18
Joined: 03 Mar 2016 15:53
Location: Germany

Re: Problems with Macros (PT, Mac)

Post by Holger » 08 Mar 2016 21:13

DT_support wrote:"if" and "else" statements are not available using regular Macro Commands, and so you need to write a bit of Python code in order to use them.
Found it in your supplied template. Thanks.

But here is already the next one I can't get to work:
Add new playlist to all selected tracks (German keyboard: opt+ctrl+shift+# | US keyboard: opt+ctrl+shift+\)

I tried to write it completely in Python, use your snippets, tried it with # and \ (also escaped \\) to no avail.
 MBPr 15" (Mid 2015) i7, Pro Tools 12.4, Studio One 3, UA Apollo Quad Firewire, DTouch (Hanns.G HT273HPB)

Support Team
Posts: 120
Joined: 17 Feb 2016 14:23

Post by Support Team » 09 Mar 2016 12:32

Holger wrote:But here is already the next one I can't get to work:
Add new playlist to all selected tracks (German keyboard: opt+ctrl+shift+# | US keyboard: opt+ctrl+shift+\)
Here you are:
Add new playlist to selected Tracks.dat
(694 Bytes) Downloaded 342 times
Holger wrote:I tried to write it completely in Python, use your snippets, tried it with # and \ (also escaped \\) to no avail.
For the

Code: Select all

pt_shortcut
function, we suggest you first add a similar keyboard shortcut using the "Keyboard Shortcut" Macro Command.
For example, I added a "OPT + CTRL + SHIFT + 1" keyboard shortcut using the "Keyboard Shortcut" Macro Command.
Then, I edited the added Macro Command using the "MODIFY CMD" button, and changed the

Code: Select all

1
to a

Code: Select all

\\
(escaped, as Python requires).

That's easier and less error-prone.
We may be adding a "PT Shortcut" Macro Command in the Macro Editor in the future, but we need to find a way to not confuse users about it.

Holger
Posts: 18
Joined: 03 Mar 2016 15:53
Location: Germany

Re:

Post by Holger » 05 Apr 2016 09:33

DT_support wrote: Oh yes; please look at this template Macro:
Template Resync then Go back to Edit.dat
This Macro seems to be broken in the El Capitan beta. It sends me back to the Edit window like it should, but then the DTouch Toolbar disappears and takes a long time to come back (or doesn't come back at all in some cases).
 MBPr 15" (Mid 2015) i7, Pro Tools 12.4, Studio One 3, UA Apollo Quad Firewire, DTouch (Hanns.G HT273HPB)

Post Reply