Page 1 of 3

Audacity getting confused about compressed projects?

Posted: Mon Aug 04, 2014 12:40 pm
by Tid
Audacity 2.0.3
Mac OS X 10.6.8

I've only recently discovered the option to Save Project As A Compressed Version.... I choose this because the imported audio is MP3, and each project is a mix of two MP3s, so a compressed Ogg Vorbis version is far preferable to having a full project which may be 150MB.

The steps I take are as follows :
  • Import 2 MP3 tracks, so there are two stereo tracks overlaid
    Do any editing required
    Save project as Compressed (i.e., 2 Ogg Vorbis tracks)
    Also, Export the project in AAC format
    Close project and ignore 'Save Changes?' message as I don't want a full size project
So far, so good. Audacity does everything I need from it and does it well.

The problem is when I open that project again. Whether I make any changes, or simply play the project, Audacity seems to ignore the fact that it's just opened a Compressed project (though I can see it physically open the 2 Ogg Vorbis tracks) - when I close it and go to the project data folder, I see that as well as the 2 Ogg Vorbis files, there is now a subfolder of all the many small full size Audacity "pieces", in other words the very data I tried to avoid when I first created the project.

How do I 'persuade' Audacity not to do this, in other words to open a compressed project and keep it compressed? :-
  • to simply OVERWRITE the Ogg Vorbis tracks if there have been changes
    do NOTHING at all if there have been no changes

Re: Audacity getting confused about compressed projects?

Posted: Mon Aug 04, 2014 2:20 pm
by Gale Andrews
Tid wrote:Audacity 2.0.3
Mac OS X 10.6.8

I've only recently discovered the option to Save Project As A Compressed Version...
Audacity supplied by us doesn't have that (it's Save Compressed Copy of Project). If it really says what you quoted you have an unofficial version of Audacity and we can't help you with that. I recommend you get the latest 2.0.5 from us: http://audacityteam.org/download/mac .
Tid wrote:The problem is when I open that project again. Whether I make any changes, or simply play the project, Audacity seems to ignore the fact that it's just opened a Compressed project (though I can see it physically open the 2 Ogg Vorbis tracks) - when I close it and go to the project data folder, I see that as well as the 2 Ogg Vorbis files, there is now a subfolder of all the many small full size Audacity "pieces", in other words the very data I tried to avoid when I first created the project.
Correct. The OGG files are decompressed to lossless PCM (maintaining but not improving their quality) when you reopen the compressed project. The OGG files thus become superfluous to the project which then functions essentially as a standard project with Undo and Redo as if you had launched Audacity and imported OGG files into it.

The reason is simple, that OGG is lossy and you cannot perform complex direct editing on it such as applying Equalisation or other filters. The audio has to be decompressed to PCM.
Tid wrote:How do I 'persuade' Audacity not to do this, in other words to open a compressed project and keep it compressed?
You don't. Just export OGG if you are happy to lose data which OGG does not support, like labels, track gain and pan settings or track positions on the Timeline.

If you are wanting to do direct cutting or splitting of OGG files so you don't have to lose quality by re-encoding them, you can so with mp3splt: http://wiki.audacityteam.org/wiki/Lame_ ... tion#lossy .
Tid wrote: OVERWRITE the Ogg Vorbis tracks if there have been changes
You can do that if you Save Compressed Copy of Project and overwrite the original compressed project. The OGG file(s) will be updated (overwritten). There will still be lossless PCM data in the "e*" folder(s).

Perhaps there should be an option to delete the PCM data when saving the reopened compressed project. Perhaps what we should really do is store unsaved changes for the compressed project in the Audacity temp folder instead of in the _data folder for the compressed project. Do you want to request that?

Or perhaps Audacity should at least delete the PCM data in the _data folder of the compressed project when you quit the project window that is holding the compressed project. As it is now, if you reopen a compressed project, make an edit, save and overwrite the compressed project, then reopen the compressed project again, there will be "orphan block files" that were for undo/redo the last time the project was open. I agree that is confusing and unsatisfactory.


Gale

Re: Audacity getting confused about compressed projects?

Posted: Mon Aug 04, 2014 3:18 pm
by Tid
Gale Andrews wrote:
Tid wrote:Audacity 2.0.3
Mac OS X 10.6.8

I've only recently discovered the option to Save Project As A Compressed Version...
Audacity supplied by us doesn't have that (it's Save Compressed Copy of Project). If it really says what you quoted you have an unofficial version of Audacity and we can't help you with that. I recommend you get the latest 2.0.5 from us: http://audacityteam.org/download/mac .
Sorry - my mistake; I was paraphrasing the option as I hadn't bothered to open Audacity and look at the exact wording.
Gale Andrews wrote:
Tid wrote:The problem is when I open that project again. Whether I make any changes, or simply play the project, Audacity seems to ignore the fact that it's just opened a Compressed project (though I can see it physically open the 2 Ogg Vorbis tracks) - when I close it and go to the project data folder, I see that as well as the 2 Ogg Vorbis files, there is now a subfolder of all the many small full size Audacity "pieces", in other words the very data I tried to avoid when I first created the project.
Correct. The OGG files are decompressed to lossless PCM (maintaining but not improving their quality) when you reopen the compressed project. The OGG files thus become superfluous to the project which then functions essentially as a standard project with Undo and Redo as if you had launched Audacity and imported OGG files into it.

The reason is simple, that OGG is lossy and you cannot perform complex direct editing on it such as applying Equalisation or other filters. The audio has to be decompressed to PCM.
Yes, but the original imported data was lossy MP3. I had already accepted further compression to Ogg Vorbis, so I'd resigned myself to having a 'lossy' project (if I was interested in top quality audio, I wouldn't have used the Ogg Vorbis option to begin with!)
Gale Andrews wrote:
Tid wrote: OVERWRITE the Ogg Vorbis tracks if there have been changes
You can do that if you Save Compressed Copy of Project and overwrite the original compressed project. The OGG file(s) will be updated (overwritten). There will still be lossless PCM data in the "e*" folder(s).


Perhaps there should be an option to delete the PCM data when saving the reopened compressed project. Perhaps what we should really do is store unsaved changes for the compressed project in the Audacity temp folder instead of in the _data folder for the compressed project. Do you want to request that?
YES! What Audacity ought to allow for, is the creation of an overwritable version of a compressed project, especially if there is no PCM data present - in other words, where the user has deliberately created ONLY a compressed copy, it ought to be assumed that a full version wasn't wanted. But if the option Save Project as Uncompressed was added to the File menu, then a user who's created a compressed project could - if they chose - add the PCM data to the _data folder, as is being done unbidden at present.
Gale Andrews wrote:Or perhaps Audacity should at least delete the PCM data in the _data folder of the compressed project when you quit the project window that is holding the compressed project. As it is now, if you reopen a compressed project, make an edit, save and overwrite the compressed project, then reopen the compressed project again, there will be "orphan block files" that were for undo/redo the last time the project was open. I agree that is confusing and unsatisfactory.
Yes - even if I simply OPEN a compressed project then close without any editing, Audacity still creates the PCM data. So now, if I want to re-open a compressed project, I have to manually delete the PCM data. Then next time I open the project - even though the Ogg Vorbis files are still there - Audacity comes up with a message about not being able to find the data (which it found perfectly well the first time I re-opened it, by reading the Ogg Vorbis files in!!!) and offering options that include making 'silent' tracks. At that point, my head in a complete spin, all I can do is to create the project all over again from scratch, by deleting the .aup file, the _data folder, reading in the MP3 files, making the necessary edits, and saving as a Compressed Project. I can't be doing that every time I just want to look at waveforms and nothing else!!!

Re: Audacity getting confused about compressed projects?

Posted: Mon Aug 04, 2014 6:37 pm
by Tid
Ah, I now understand on the CAUSE of the problem, but not the fix!!

When I FIRST create the project I use the Save Compressed Copy option (which creates a _data folder with the Ogg Vorbis files, AND the .aup file. However, when I come to close the project I choose to NOT save it when prompted, thus I don't get the PCM data as well. All I get is the Ogg Vorbis and .aup files.

The SECOND time I open the project, by double clicking the .aup file, Audacity has no problems with this. It reads in the Ogg Vorbis files, and all appears to be just as I left it before. However, in the background, and unseen by me, Audacity has generated a whole set of PCM data. This is contrary to the first time, when it didn't save the PCM data after I rejected them at Close.

So Audacity is inconsistent : FIRST time it lets you create a Compressed project without the PCM data. SECOND time it will open the project ok (which has no PCM data), but then goes and creates the PCM data without asking if you want it. I'd have thought the absence of the PCM data and the presence of the .aup file, was an indication that the user wants a choice in the matter?

Allowing 'Compressed only' projects

Posted: Mon Aug 04, 2014 8:34 pm
by Tid
This arose out of a puzzle I had using Audacity (I'm not very experienced with it).

Basically, I had taken the option to Save my project as a Compressed copy, creating Ogg Vorbis files and an .aup file, then closing the project without saving a full quality version.

What I hadn't understood (I do now) is that Audacity needs a set of PCM files to work on whether the project is compressed or not. But - if there have been no changes made, why keep them? And if there have been changes - to a compressed project with no uncompressed version - shouldn't the user be allowed to re-save again, as a Compressed Copy with no PCM folder?

So this is what I propose :

IF Audacity has opened a compressed project by reading in its Ogg Vorbis files, then if no changes are made (apart from playing), jettison the PCM files without writing them out. But if there have been changes made, the user could be presented with the following dialogue / options on Save :
  • "Audacity has opened your Compressed Copy to which you have made changes. You can now..
    1. Overwrite the Compressed Copy without saving an uncompressed version
    2. Overwrite the Compressed Copy AND save an uncompressed version
    3. Do not save any changes and leave all files unchanged"
In 1. the Ogg Vorbis files would be overwritten with new compressed copies and any PCM data jettisoned; in 2. the Ogg Vorbis files would be overwritten plus a folder of PCM data; in 3. the files would be left intact and any PCM data jettisoned.

Re: Audacity getting confused about compressed projects?

Posted: Mon Aug 04, 2014 8:50 pm
by Gale Andrews
I am going to merge this into your Adding Features topic, or it will get too confusing.
Tid wrote:Audacity is inconsistent : FIRST time it lets you create a Compressed project without the PCM data. SECOND time it will open the project ok (which has no PCM data), but then goes and creates the PCM data without asking if you want it.
I think you are still not fully understanding. Audacity will not directly edit OGG files (or any other format). You could not for example run a High Pass filter directly on OGG files. Audacity must decompress imported files to PCM (with the bit depth specified in Quality Preferences).

The only choice is where it stores that PCM data when it reopens the compressed project.


Gale

Re: Audacity getting confused about compressed projects?

Posted: Mon Aug 04, 2014 9:16 pm
by Gale Andrews
Tid wrote:
Gale Andrews wrote:
Tid wrote:The problem is when I open that project again. Whether I make any changes, or simply play the project, Audacity seems to ignore the fact that it's just opened a Compressed project (though I can see it physically open the 2 Ogg Vorbis tracks) - when I close it and go to the project data folder, I see that as well as the 2 Ogg Vorbis files, there is now a subfolder of all the many small full size Audacity "pieces", in other words the very data I tried to avoid when I first created the project.
Correct. The OGG files are decompressed to lossless PCM (maintaining but not improving their quality) when you reopen the compressed project. The OGG files thus become superfluous to the project which then functions essentially as a standard project with Undo and Redo as if you had launched Audacity and imported OGG files into it.

The reason is simple, that OGG is lossy and you cannot perform complex direct editing on it such as applying Equalisation or other filters. The audio has to be decompressed to PCM.
Yes, but the original imported data was lossy MP3. I had already accepted further compression to Ogg Vorbis, so I'd resigned myself to having a 'lossy' project
Audacity is an editor, not a converter. You cannot do complex edits on lossy compressed files.
Tid wrote:What Audacity ought to allow for, is the creation of an overwritable version of a compressed project, especially if there is no PCM data present - in other words, where the user has deliberately created ONLY a compressed copy, it ought to be assumed that a full version wasn't wanted.
There will always be PCM data present when you reopen the project.
Tid wrote:If I want to re-open a compressed project, I have to manually delete the PCM data.
The only thing you can safely delete is the OGG files, once you have reopened the project.
Tid wrote:Then next time I open the project - even though the Ogg Vorbis files are still there - Audacity comes up with a message about not being able to find the data (which it found perfectly well the first time I re-opened it, by reading the Ogg Vorbis files in!!!)
Yes, because Audacity must copy in the OGG files as PCM data. That PCM data is what it is looking for. It is no longer looking for the OGG file. The OGG file no longer exists in the AUP file.

If we had the option I suggested to delete the PCM data when saving the reopened compressed project, you would lose the ability to undo anything you had done in that project before saving.

Contrast that to the first time you create the compressed project. Then the PCM data is in the Audacity temp folder. You don't have the compressed project you saved open at that point.
Tid wrote:ll I can do is to create the project all over again from scratch, by deleting the .aup file, the _data folder, reading in the MP3 files, making the necessary edits, and saving as a Compressed Project. I can't be doing that every time I just want to look at waveforms and nothing else!!!
If you don't need labels, Timeline position and other project metadata, you don't need Audacity projects (standard or compressed). File > Export as OGG and import the OGG files if you want to edit them later. But there will still be PCM data from the OGG imports in the Audacity temp folder.


Gale

Re: Allowing 'Compressed only' projects

Posted: Mon Aug 04, 2014 9:40 pm
by Gale Andrews
Tid wrote:IF Audacity has opened a compressed project by reading in its Ogg Vorbis files, then if no changes are made (apart from playing), jettison the PCM files without writing them out.
Can't be done (without an option to directly play a file like a media player would). Deleting the PCM files would destroy the project.
Tid wrote:if there have been changes made, the user could be presented with the following dialogue / options on Save :
  • "Audacity has opened your Compressed Copy to which you have made changes. You can now..
    1. Overwrite the Compressed Copy without saving an uncompressed version
    2. Overwrite the Compressed Copy AND save an uncompressed version
    3. Do not save any changes and leave all files unchanged"
In 1. the Ogg Vorbis files would be overwritten with new compressed copies and any PCM data jettisoned; in 2. the Ogg Vorbis files would be overwritten plus a folder of PCM data; in 3. the files would be left intact and any PCM data jettisoned.
So we already do 2) and 3).

1) is about deleting the PCM data that already exists.

A possibly simpler option would be store the PCM data for the reopened compressed project in the Audacity temp folder. Then you can still Undo/Redo in that project, instead of losing that ability if you save compressed project but leave it open.


Gale

Re: Allowing 'Compressed only' projects

Posted: Mon Aug 04, 2014 10:22 pm
by Tid
Gale Andrews wrote:
Tid wrote:IF Audacity has opened a compressed project by reading in its Ogg Vorbis files, then if no changes are made (apart from playing), jettison the PCM files without writing them out.
Can't be done (without an option to directly play a file like a media player would). Deleting the PCM files would destroy the project.

Gale
But no! the FIRST time I create a Compressed Copy I choose NOT to save changes when I close the project. At that point, I have what I want : Ogg Vorbis files and the project .aup file. There are no PCM files and yet I can reopen the project by double clicking the .aup file at which point the Ogg Vorbis files (rather than PCM data) are read in.

To reiterate - when I reopen I don't necessarily want to make any changes, maybe I just want to examine the waveform or play the tracks. Or having made changes, I just want to re-save like the first time : i.e. Ogg Vorbis + .aup but no PCM. How come I can do that the first time - quite legitimately - but no other time?

Re: Allowing 'Compressed only' projects

Posted: Mon Aug 04, 2014 11:13 pm
by Gale Andrews
Tid wrote:
Gale Andrews wrote:
Tid wrote:IF Audacity has opened a compressed project by reading in its Ogg Vorbis files, then if no changes are made (apart from playing), jettison the PCM files without writing them out.
Can't be done (without an option to directly play a file like a media player would). Deleting the PCM files would destroy the project.

Gale
But no! the FIRST time I create a Compressed Copy I choose NOT to save changes when I close the project. At that point, I have what I want : Ogg Vorbis files and the project .aup file.
I have explained that several times now. When you first save that compressed project, the PCM data relating to that OGG file is not in the compressed project. It is already in the temp folder or the _data folder for the project from which you saved the compressed project.

When you reopen the compressed project Audacity must decompress the PCM files. It cannot play OGG files like a media player.
Tid wrote:when I reopen I don't necessarily want to make any changes, maybe I just want to examine the waveform or play the tracks.
Then do not save any projects. File > Export as OGG and import the OGG files (but there will still be PCM data for those imports in the Audacity temp file).

Sorry but I won't repeat my answers about this any more. I agree it's not entirely intuitive, but Compressed Copy is a hybrid format, more like a project than an OGG file.

You are very welcome to vote for any of:
  1. Opening files directly like a media player, perhaps with a waveform, but no editing possible.
  2. Reopened compressed projects store their PCM data in the Audacity temp folder. Only OGG files are in the _data folder for the compressed project. When you save the project, the OGG files are overwritten. When you close the project, the PCM data is deleted. Reopening that project repeats the process on first re-open, reading the OGG files and writing the PCM data for the imported OGG files to the temp folder.
  3. Reopened compressed projects store OGG files plus their PCM data in the _data folder for the compressed project, as now, but unused PCM data that was for Undo/Redo is deleted when you save the project (or perhaps when you close it). Reopening the project reads not from the OGG files but the PCM data.
1) probably won't happen .

3) should probably be done.

2) is probably more work than 3) but is closest to what you are asking for. I think at the moment 2) makes most sense. Otherwise you can't send identically named iterations of the same compressed project to others - to send version 2 of the compressed project to someone else containing only an OGG, you have to save it as a new compressed project.

Differently named iterations are a good practice for safety, but not so convenient.

The choice between 2) and 3) could be a preference, but probably not needed.

Gale