A big question, so I’ll try and break it down into points.
Also, see here for an overview of the technology:
in particular, this section: Audacity Manual
Audacity will recalculate the waveform whenever the audio data is changed.
Many people don’t notice but this is a significant difference between Audacity and most DAW applications. If, for example, you apply Equalization to a track in Audacity, the audio data is changed and the waveform redrawn. In most DAWs, applying Equalization makes no difference to the drawn waveform.
The “background drawing” effect in “On Demand” only applies when initially loading the audio. During later operations the waveform and redrawing is done when required whether “OD” is enabled or not.
It looks like the background calculations don’t apply to spectrograms.
Correct. The “OD” waveform calculation applies only to the waveform view.
It seems like it has to finish calculating the waveform first before I can change to spectrogram view, although it’s great that I can zoom in while it’s still calculating, and it then quickly calculates for that section and then lets me change the view. Are there any plans to allow the view to be changed before the waveform is calculated?
There is already quite a lot that you can do while the “OD stripes” are displayed.
Try opening a large file with OD, and immediately click in the middle of the track and start playing. Provided that the computer is fast enough, the track will start playing and OD will prioritise this part of the waveform to draw first.
I rarely use OD myself as most of my projects are quite short, but it is quite impressive just how much OD will allow you to do while “waiting” for the waveform.
- When I save the project, the data folder is much smaller than if I hadn’t used On Demand Loading, but there are still a lot of files in the data folder. What are they?
Probably not technically precise, but I think of them as “place holders”.
Each of those files represents a “block” of audio data. With “normal” loading, a file is copied into the project as a load of “blocks” of audio and each block is a short section of one audio channel. With OD, the audio data is not copied during loading, but Audacity still needs its “block files”, so small “place holder” files are created to represent each audio data block. When you process the audio, these blocks are replaced by real audio data.
- If I reopen the project, it displays the waveforms very quickly. Does that mean the waveform has been saved?
Audacity uses several optimisations to reduce the time taken to draw the waveform. The project data file include a kind of “snapshot” of the waveform. The details of the optimisations are quite complicated. Is it enough to just say that it is “clever”?
- The initial saving of the project takes a long time, presumably because it’s saving the waveform. Is there a way to skip that so that the initial save is quick?
On saving, there is a lot of data that needs to be moved.
Temporary data in RAM is deleted. Temporary files are deleted (there can be several GB of temporary files for big projects). Much of the time spent saving projects is spent on cleaning up old temporary data.
- If I check dependencies, it gives me the option to save some or all of the wav files. If I save them all, is my project now identical to the project I would have had if I had initially imported and copied the audio?
If I save just some of them, does that mean On Demand Loading only applies to the other tracks?
- What happens if I want to move the project and all its files to another drive? Is there any solution other than editing the aup file to fix the aliasfile locations? Is there a way for these to be relative paths?
I would highly recommend that you “resolve all dependencies” (copy all dependencies into the project) before moving the project.
I would highly recommend that you do not manually edit the AUP file or the _data folder in any way. Always use Audacity for modifying projects. It is extremely easy to turn hours of work into trash by manually editing any part of the project structure.
See here for how to safely move a project: Audacity Manual
- Is there anything else about On Demand Loading that I need to know? I understand that I have to be careful not to move the wav files, and I also assume any edits I do will be performed on the original files.
The original files are never changed in any way. Audacity does not work on files at all. Audacity copies audio data from the files and works with the copied data. What you are doing with “On Demand” is deferring the copying of the audio data until it needs to be copied.
Audacity can accomplish simple “cut/copy/delete/trim” type edits without copying data, Simple edits are just a matter of juggling the “block files” into the correct order and taking care of the “end bits” (an edit point is unlikely to line up exactly with a block boundary).
“Processing” tasks (where the audio sample values are changed) requires that Audacity has a copy of the audio data to work with. So, for example, if you import a large file with “On Demand” loading and then amplify the entire track, Audacity will “load” the file without copying the data, but to create the amplified version it will copy the data (from the original file), amplify it a block at a time, and write the amplified data into the _data folder. If you only amplify part of the track, then only the part that is being processed is copied. “On Demand” loading means that Audacity only copies the audio data from the file when it needs to.