Copy selection to new file

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
Post Reply
cantgetnosleep
Posts: 3
Joined: Fri Feb 05, 2021 12:35 am
Operating System: Linux *buntu

Copy selection to new file

Post by cantgetnosleep » Fri Feb 05, 2021 12:38 am

Hello,

I'm an trying to write a very simple script. It was working previously, but for some reason has stopped working. I am on PopOS (Ubuntu, more or less) 20.10. The script has three steps:

1. copy
2. new
3. paste

This script worked previously but now no longer works. It copies and creates a new file, but the paste doesn't do anything.

Any ideas?

Thanks,
Andrew

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

Re: Copy selection to new file

Post by steve » Fri Feb 05, 2021 1:07 am

"New" creates a new project, but macro scripts can only act on the current project.
If you intend to paste to a new track, try this:

Code: Select all

Copy:
NewMonoTrack:
Paste:

macro.png
macro.png (17.43 KiB) Viewed 915 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

cantgetnosleep
Posts: 3
Joined: Fri Feb 05, 2021 12:35 am
Operating System: Linux *buntu

Re: Copy selection to new file

Post by cantgetnosleep » Sat Feb 27, 2021 8:27 pm

Thanks. I don't want a new track. I want it in a different project or file. This used to work. Is there no way to copy the selection of a new project/file?

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

Re: Copy selection to new file

Post by steve » Sat Feb 27, 2021 9:35 pm

cantgetnosleep wrote:
Sat Feb 27, 2021 8:27 pm
Is there no way to copy the selection of a new project/file?
Not with a macro, and as far as I'm aware that has never been possible in Audacity. Why would you want to do that?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

cantgetnosleep
Posts: 3
Joined: Fri Feb 05, 2021 12:35 am
Operating System: Linux *buntu

Re: Copy selection to new file

Post by cantgetnosleep » Wed Mar 10, 2021 5:38 pm

I used it all the time. Every other audio editing software I've used had this as a built-in key command. This macro actually previously worked fine in Audacity. It stopped working in one of the more recent updates.

Andrew

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

Re: Copy selection to new file

Post by steve » Thu Mar 11, 2021 9:58 am

cantgetnosleep wrote:
Wed Mar 10, 2021 5:38 pm
I used it all the time. Every other audio editing software I've used had this as a built-in key command.
I must be misunderstanding what you mean, because Audacity has never had that ability and I've never seen it in any other audio software.

cantgetnosleep wrote:
Sat Feb 27, 2021 8:27 pm
I don't want a new track. I want it in a different project or file.
If you have three projects open, (let's call them "A, B, and C") and you run the macro in project "A", what exactly "should" happen?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply