[SOLVED] Wave Color Keyboard Shortcut

I’d love to have the ability to assign a keyboard shortcut to Wave Color. Ideally I’d be have one for:

instrument 1
instrument 2
instrument 3
instrument 4

Create a Macro to set the colour (https://manual.audacityteam.org/man/macros.html)
then assign a keyboard shortcut to run the Macro (https://manual.audacityteam.org/man/keyboard_preferences.html)

Oh, fantastic! I didn’t realize this was a possibility. Thanks, Steve.

Hmm, I’m stymied. Here’s what I’ve done so far (Audacity 2.2.1):

File | Chains | Edit Chains | Add | Insert

This window pops up:
https://imgur.com/Pey9qxe

But none of these commands are Track Menu or Wave Color or Instrument 1. I’m not sure what my next step should be. Any suggestions?

Here’s the Scripting reference documentation in the Audacity manual: https://manual.audacityteam.org/man/scripting_reference.html
If you search that page for “color” (American spelling), you will find the command: “Set Track Visuals…”

Hi Steve - I’m still floundering. I found the command Set Track Visuals, but I’m not able to see the connection between:

File | Chains | Edit Chains | Add | Insert

And “SetTrackVisuals” or “enum Color”.

Basically I’ve got the cake ingredients and I can see the cake all ready to eat, but the in-between part is escaping me…

You can select one of the 4 preset colours:
track-colour.png

I know the answer must be obvious, I really am trying to understand.

Once I’ve gotten to:

File | Chains | Edit Chains | Add | Insert

What is the very next step?

Your version of Audacity is too old. You need Audacity 2.3.2. You can get it via the Audacity website: Audacity ® | Downloads

In Audacity 2.3.2, the old “Chains” feature has been renamed “Macros”, and Macros can do a lot of things that Chains couldn’t.
How to use Macros: Macros - Audacity Manual

Aha! Thanks, Steve. That was the missing piece. For anyone else who comes across this post, here’s the step-by-step:

Audacity 2.3.2

CREATE MACRO:

Tools | Macros | New
enter name of macro [for example: red]
with name selected, click Insert
under Choose Command, choose Set Track Visuals
upper right hand corner, click Edit Parameters
third box down: Color - check the box, choose your color [I chose 1, for red]

SET KEYBOARD SHORTCUT:

Edit | Preferences | Keyboard
Key bindings: Tree
scroll down to Apply Macro
choose your new macro name
set keyboard shortcut, click Set, then OK

You should be all set.

Glad you’ve got it working, and thanks for posting the detailed steps. I’ll close this topic now.