Save Files (not Projects) without Exporting

A very simple question, to which I’m pretty sure the answer will be ‘hard luck’!

I use Audacity as an audio file editor, which means I don’t need to save Projects. I have to process hundreds of files, which are continually coming in, & the processing is very simple & quick. But it would greatly improve my workflow if I could simply Open the audio files, edit them, & then Save them in place in the traditional manner.

As far as I can tell (& I have looked around as best I can), the only way to do this is to Export the files. This adds at least one extra step to the process.

Am I mistaken? Is there, in fact, a way to edit files & re-Save them in situ, without having to involve Projects & without using Export?

Perhaps I’m overlooking something obvious; perhaps there’s some kind of workflow feature which could automate the processing for me…

Audacity has “Chains” which is its batch processor. You can assign filters and effects to a Chain, apply it to a pile of files and then come back after lunch and collect the finished files. We do not step on the original files. The corrected files are placed in a separate location. If you want to destroy the original work, that’s up to you.

http://manual.audacityteam.org/man/chains_for_batch_processing_and_effects_automation.html

Koz

Thank you — that’s interesting & helpful, & I’ll look into it tomorrow (it’s midnight here).

There’s no question of ‘destroying the original work’, though, since the files I process are back-ups of back-ups. I would indeed like to replace them with the edited versions, since that would save me the tedious (& otherwise unnecessary) step of throwing them away. Since this is the Mac OS X Forum, this method of managing files can hardly be completely alien! It would be useful if the chain would allow the final exported file to replace the original file without a dialogue interruption; this would be, in effect, the traditional Save command. I’ll see if this can be done tomorrow — although from what you say & the way you say it, I doubt this workaround will be doable. But let’s see! Thanks, at any rate.

(It occurs to me at the last moment that if the above can’t be done, it might be possible to get Automator to open the files in Audacity, have Audacity apply the Chain, delete the original file & have the Exported result saved to the same location with the same name. A bit more trouble, but perhaps this could be helpful for anyone else faced with a similar dilemma.)

I’ve never used Chains for anything, but I understand it creates a folder next to the original files and puts the corrected files in that folder.

I understand how “handy” it is to step on original work files, but it just makes my teeth hurt anticipating the posts from someone who doesn’t have backups of backups and destroyed years of original work by accident.

“I applied my chain wrong and closed Audacity. All my files sound funny. How do I UNDO and apply a better chain?”

Koz

What is the “extra step” that you are referring to?

The extra step is manually replacing the original file with the newly exported file. The original is in the right location, with the right filename, so the exported file must replace it, & this can’t be done automatically. However simple it is to do this, it is still an extra step, & it must be performed manually.

I quite understand the potential difficulties in facilitating the accidental loss of their work by inexperienced people, but I can’t help thinking there might be some way of allowing ‘Save’ as an advanced feature (even if it requires a warning message of some kind).

Anyway… I’ve looked into this now. Unfortunately, although I can export files manually as AIFF (the format I need), that is not among the options in ‘Edit Chain’. The nearest is “Export as WAV”. So I’ve skipped the Export step in my new Chain, & will just put up with the inconvenience; it isn’t the end of the World, although in an IDEAL World I could have made an Automator App which would have applied the Audacity Chain & saved the file — so all that would have been required by way of user input was dropping the files onto the App. — Hey presto!

Applying the Chain, Exporting each file (usually dozens each time) & replacing the old with the new is considerably more work than that!

In case you’re interested, the Chain I made is now called “Raise Pitch ¼ Tone (Speed Up)”. I receive a lot of audio files recorded from a piano which is ¼ tone flat, so they just need sharpening up a bit (2.93%, to be exact). “Change Speed” is better for this purpose than “Change Pitch”, since it produces fewer artefacts & the tempo is not significant. I looked everywhere for software that could change speed AND pitch together (like the varispeed on a tape recorder), but Audacity seems to be the only solution. There’s plenty of software that changes one or the other, but changing just one & not the other requires extra processing which is not ideal!

Export can overwrite the imported file (and yes there is a warning because it is inherently dangerous to overwrite your original data).
Or do you mean specifically “in a Chain” ?

In the event that you have overridden the default options and you are “reading audio data directly from the file”, (rather than copying the audio data on import), then the file cannot be directly overwritten because it is being used by the project, but in this case, Audacity will still (automatically) resolve this for you by first making a copy of the original file, naming that with “old” appended to the file name, and then write your file with the original file name.

Note that there is also the “Sliding Time Scale / Pitch Shift” (http://manual.audacityteam.org/man/sliding_time_scale_pitch_shift.html) effect which allows you to change pitch and tempo independently, and with fewer artefacts than the Change Tempo / Change Pitch effects. Also, the next version of Audacity provides a “high quality” option in the Change Tempo / Change Pitch effects so that these effects then use the same time-stretch algorithm as “Sliding Time Scale / Pitch Shift”.

I think you could use SoX http://sox.sourceforge.net/Docs/Features if you are willing to use a command-line application and work out the commands you need. There is a binary for Mac so you don’t need to compile SoX.


Gale

Lots to think about here.

Steve: good points. I had indeed chosen “reading audio data directly from the file”, because I didn’t want extra files all over the place (I have enough copies of everything already, & who needs more stuff to think about?). I had actually witnessed Audacity renaming original files, so I had known about that, but then forgotten it again. However, it still means two files in the end. Changing the ‘Open files’ preference… I might give that a go, to see if that means less work without the burden of unwanted side-effects. Otherwise I think I’ll leave the Chain I created as it is, for now at least, & put up with manually moving & deleting, since it’s more efficient to process lots of files with minimal steps & then tidy up everything at once.

Gale: many thanks for pointing me at SoX. I read what I could about it, & downloaded it, but then I got too bogged-down in the technical notes to be able to work out what I would need to do next! I’m happy with Automator, but that seems to be the limit of my technical ability. ‘Software like this’ requires too much previous knowledge of other ‘software like this’ to allow an easy way in for newbies. If you don’t know what “|w”* means, you can fake it for a few more paragraphs, but then it becomes clear that you also need to understand how to implement vrek* — whatever that is — & after a few more of those, the technical terms outweigh the plain English & the buffers get overloaded. Which is not good for people whose twenties were decades ago…

(*: made-up examples for illustrative purposes; no actual terms intended)

So many thanks to all for your truly useful & interesting help; for now I’ll carry on with my shiny new Chain & manually deleting files. If I’m still doing this in a year or two, I’ll check back & see if anything’s changed!

(P.S.: beware the obsolescence of technical terminology. I can talk for ages about the A-Rose extension & its incompatabilities; who now would want to learn about THAT?)

:laughing:

There is a users mailing list https://sourceforge.net/p/sox/mailman/ - you only want one effect so I think they may be willing to help.

Gale

Thanks, Gale. I love the description of the first mailing list on that page: “Tracks commits to git”… :smiley: