Jump to content

KEYBOARD MACRO


Milton Sica

Recommended Posts

I'm looking for suggestions for a keyboard macro generator program to use concurrently with Cakewalk.

In several projects, I need to do many operations that would be much more automated and faster if I could use a keyboard macro generator program to perform, in principle, these operations in sequence:

1-Insert a STEREO BUS in the MASTER channel;
2-Rename this created channel to FINAL;
3-Move it to the left of the MASTER channel;
4-Change your volume to -6 Db.
5-Change the identification icon.

 

Or even a CAL script that would perform such operations, because in keyboard macro generator programs there is a positional handling of the mouse.

Maybe Cakewalk itself will provide an OWN MACRO Cal RECORDER.

Edited by Milton Sica
Add information
Link to comment
Share on other sites

If

5 hours ago, Milton Sica said:

1-Insert a STEREO BUS in the MASTER channel;
2-Rename this created channel to FINAL;
3-Move it to the left of the MASTER channel;
4-Change your volume to -6 Db.
5-Change the identification icon.

was not already part of my project templates, I would add it.

I have been using something similar for years. 

 

Adding a bus after the master to existing projects is a reasonable task for autohotkey. 

There is nothing Cakewalk specific in autohotkey.

Autohotkey is a general-purpose scripting language for Windows. As its name implies, there is an emphasis on keyboard binding.

There are quite a few threads about it on this and the old forum.

A few have examples.

  • Like 1
Link to comment
Share on other sites

43 minutes ago, scook said:

If

was not already part of my project templates, I would add it.

I have been using something similar for years. 

 

Adding a bus after the master to existing projects is a reasonable task for autohotkey. 

There is nothing Cakewalk specific in autohotkey.

Autohotkey is a general-purpose scripting language for Windows. As its name implies, there is an emphasis on keyboard binding.

There are quite a few threads about it on this and the old forum.

A few have examples.

Thank you very much.
Would you have the url of the old forum so I can try looking for some examples?

Link to comment
Share on other sites

3 hours ago, scook said:

forum.cakewalk.com

You may recall the forum search was not very good.

Search Google for

site:forum.cakewalk.com autohotkey 

In fact, there aren't many examples and I ventured to develop some code from programming experience and AutoHotKey's own help.

I managed to evolve using existing shortcut keys in Cakewalk, but there are some things that are positional or I don't know how to do it:

1) How to focus on the Master channel?
2) How to focus on +(Send) to insert a new Bus or direct to another Bus?

Anyway....Several things to study. Here is a piece of code that worked.

 

/*=======================================================
  Verifica se o Cakewalk está aberto, ativa e maximiza e faz o envio de Alt+b, Alt+D e Alt+c
  =======================================================
*/
Result := MsgBox("Atenção, você quer continuar ? (pressione SIM ou NÃO)",, "YesNo")
if Result = "Yes"    
    {
        if WinExist("Cakewalk")
           {                     
              WinActivate "Cakewalk"
               WinMaximize "A"    
                      Send "!b"   
                      Send "!D"                    
                      Send "!c"
                               
           }

        else
                MsgBox "Cakewalk não está carregado !"
      }

Link to comment
Share on other sites

27 minutes ago, Milton Sica said:

1) How to focus on the Master channel?
2) How to focus on +(Send) to insert a new Bus or direct to another Bus?

The easiest way to create the script is assume Master already has focus.

IOW, click the master track before running the script.

This also setups up the script to use the context menu to add a new bus. 

In addition to the "Send" command in ahk (I am not going to type autohotkey anymore) are commands to move the mouse cursor and click mouse buttons.

Ahk has extensive help that is installed locally. It is also available on their website.

Link to comment
Share on other sites

20 minutes ago, scook said:

The easiest way to create the script is assume Master already has focus.

IOW, click the master track before running the script.

This also setups up the script to use the context menu to add a new bus. 

In addition to the "Send" command in ahk (I am not going to type autohotkey anymore) are commands to move the mouse cursor and click mouse buttons.

Ahk has extensive help that is installed locally. It is also available on their website.

Thank you very much. I'm studying a lot.
It's a good idea to start from the focused MASTER, but I end up bumping into the "positional" question of the mouse.
I think I would have to create a View that would always position the MASTER channel in the same position on the screen.
I manage to add a new stereo BUS, but this BUS, thus created, is not visible to the SEND of the MASTER or of another BUS.
We evolve as we go.
Suddenly, it's more worthwhile, to avoid so much development effort, to create a TRACK MODEL that does this creation and only I do the directing.

Link to comment
Share on other sites

I am just saying this because I was thinking about making a program for my personal use, I am lazy so I could not finish making it for Cakewalk but I have thought about how I could automate things in a DAW.

My idea is not probably so efficient in terms the logic behind it because I am not a "real" programmer but with Python, I can make a small GUI program like a macro bar that has buttons that can run other scripts or any functions I code. And then I can trigger these buttons by assigning shortcut keys. by combining  autohotkey, I can, with just a single key stroke,  first activate the Macro Bar program so the program is focused can receive the shortcut and the press the button and that runs a python script which can do many kinds of things.

You can automatically send key input, you can move mouse ,click on a certain X Y position on the screen or you can also do image search/color search on the screen and then click the image etc.. Well I have to think about how exactly I can achieve certain things like selecting certain tracks or move faders, but in theory, many things are technically possible.  

I have made a macro bar for bitwig studio, which only can trigger a shortcut key of bitwig so it's not doing anything crazy but in theory, I can assign certain mouse movement or something.

http://g.recordit.co/ue0ad1co25.gif

 

  • Like 2
Link to comment
Share on other sites

9 hours ago, Quick Math said:

I am just saying this because I was thinking about making a program for my personal use, I am lazy so I could not finish making it for Cakewalk but I have thought about how I could automate things in a DAW.

My idea is not probably so efficient in terms the logic behind it because I am not a "real" programmer but with Python, I can make a small GUI program like a macro bar that has buttons that can run other scripts or any functions I code. And then I can trigger these buttons by assigning shortcut keys. by combining  autohotkey, I can, with just a single key stroke,  first activate the Macro Bar program so the program is focused can receive the shortcut and the press the button and that runs a python script which can do many kinds of things.

You can automatically send key input, you can move mouse ,click on a certain X Y position on the screen or you can also do image search/color search on the screen and then click the image etc.. Well I have to think about how exactly I can achieve certain things like selecting certain tracks or move faders, but in theory, many things are technically possible.  

I have made a macro bar for bitwig studio, which only can trigger a shortcut key of bitwig so it's not doing anything crazy but in theory, I can assign certain mouse movement or something.

http://g.recordit.co/ue0ad1co25.gif

 

Very good what you are doing.
Most of the problems to be addressed for the perfect performance of some tasks in programs like this is that you have to do a lot of preparation of the screen that will be manipulated, because if the application itself does not have a number of SHORTCUT KEYS that can facilitate this.

For years I worked as a developer in a financial institution in Brazil where I developed many keyboard macros, because the application that made the "emulation" of the IBM Terminal (EXTRA) has a very powerful language for that.

  • Like 1
Link to comment
Share on other sites

On 2/10/2023 at 12:37 AM, Milton Sica said:

Very good what you are doing.
Most of the problems to be addressed for the perfect performance of some tasks in programs like this is that you have to do a lot of preparation of the screen that will be manipulated, because if the application itself does not have a number of SHORTCUT KEYS that can facilitate this.

For years I worked as a developer in a financial institution in Brazil where I developed many keyboard macros, because the application that made the "emulation" of the IBM Terminal (EXTRA) has a very powerful language for that.

Thanks! I was testing a script.  With this macro,  it automatically sets selected tracks out puts to a new aux track.

It's slow and not so reliable...but it works!

http://g.recordit.co/S2jszdPsS7.gif

  • Like 1
Link to comment
Share on other sites

49 minutes ago, Quick Math said:

Thanks! I was testing a script.  With this macro,  it automatically sets selected tracks out puts to a new aux track.

It's slow and not so reliable...but it works!

http://g.recordit.co/S2jszdPsS7.gif

Very good job !
As I had already discussed. For the use of keyboard macros like this, there are several interdependencies that I think require a lot of individual effort to make the whole process, especially the "environment preparation" so that the program runs smoothly.
I still think it would be a great evolution for the tool if it added more power to the CAL scripts for direct manipulation of all DAW objects, just like EXTRA IBM does.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...