Editing a lossy music file

This question does not apply to a specific OS version of Audacity, nor (possibly) to Audacity alone. I’m posting in the Windows forum because it seems like they will be more ‘viewers’ here.

I have an .m4a (lossy) music file, created in Audacity. It is about 90 minutes long. I am interested in only the middle 20 minutes or so. How can I ‘top’ and ‘tail’ the file without losing fidelity?

If my understanding is correct, when I load the .m4a file it is converted into an Audacity Project file format. If I then truncate this file I must save it in an accepted audio file format - such as .m4a. But I am concerned that this is directly analogous to editing and saving a jpeg photo - each save operation of a lossy jpeg files causes some small, additional, loss of fidelity.

Is there no way of editing a .m4a files and saving it again such that there is no loss of fidelity?

You are correct. Audacity (and all “regular” audio editors) decompress the audio when you load the file and if you re-export in a lossy format you are going through another generation of lossy compression.

However, MP4 (AAC) was designed to minimize the damage from multiple encodes and you should be fine. I can’t find the link at the moment, but I somebody did about 100 generations and there was little or no damage (not the case with MP3!).

Or, [u]mp3DirectCut[/u] can do limited edits on MP3 and MP4 files without decoding.

Thanks for this re-assuring confirmation.

Just out of interest are there any audio editors which can edit an MP4 (AAC) file directly, without the need for a decompression/recompression cycle?