[SOLVED] Wave Color Keyboard Shortcut

Questions, discussion and recipes for scripting and batch processing in Audacity.
See also the "Scripting" section of the Audacity manual.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
sagetyrtle
Posts: 56
Joined: Sat Aug 16, 2008 5:21 pm
Operating System: Please select

[SOLVED] Wave Color Keyboard Shortcut

Post by sagetyrtle » Tue Aug 27, 2019 1:22 pm

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
Last edited by sagetyrtle on Fri Aug 30, 2019 9:03 pm, edited 1 time in total.

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Wave Color Keyboard Shortcut

Post by steve » Tue Aug 27, 2019 1:30 pm

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/key ... ences.html)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

sagetyrtle
Posts: 56
Joined: Sat Aug 16, 2008 5:21 pm
Operating System: Please select

Re: Wave Color Keyboard Shortcut

Post by sagetyrtle » Wed Aug 28, 2019 12:35 pm

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

sagetyrtle
Posts: 56
Joined: Sat Aug 16, 2008 5:21 pm
Operating System: Please select

Re: Wave Color Keyboard Shortcut

Post by sagetyrtle » Wed Aug 28, 2019 1:22 pm

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?

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Wave Color Keyboard Shortcut

Post by steve » Wed Aug 28, 2019 1:39 pm

Here's the Scripting reference documentation in the Audacity manual: https://manual.audacityteam.org/man/scr ... rence.html
If you search that page for "color" (American spelling), you will find the command: "Set Track Visuals..."
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

sagetyrtle
Posts: 56
Joined: Sat Aug 16, 2008 5:21 pm
Operating System: Please select

Re: Wave Color Keyboard Shortcut

Post by sagetyrtle » Wed Aug 28, 2019 8:48 pm

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...

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Wave Color Keyboard Shortcut

Post by steve » Thu Aug 29, 2019 10:54 am

You can select one of the 4 preset colours:
track-colour.png
track-colour.png (40.82 KiB) Viewed 756 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

sagetyrtle
Posts: 56
Joined: Sat Aug 16, 2008 5:21 pm
Operating System: Please select

Re: Wave Color Keyboard Shortcut

Post by sagetyrtle » Thu Aug 29, 2019 8:57 pm

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?

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Wave Color Keyboard Shortcut

Post by steve » Thu Aug 29, 2019 9:46 pm

sagetyrtle wrote:
Thu Aug 29, 2019 8:57 pm
File | Chains | Edit Chains | Add | Insert
Your version of Audacity is too old. You need Audacity 2.3.2. You can get it via the Audacity website: https://www.audacityteam.org/download/

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: https://manual.audacityteam.org/man/macros.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

sagetyrtle
Posts: 56
Joined: Sat Aug 16, 2008 5:21 pm
Operating System: Please select

Re: Wave Color Keyboard Shortcut

Post by sagetyrtle » Fri Aug 30, 2019 9:03 pm

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.

Locked