Undo, Redo and History

From Audacity Development Manual
Revision as of 15:17, 21 November 2016 by PeterSampson (talk | contribs) (History Window: marked this section update as done - removed the P1)
Jump to: navigation, search

Rückgängig machen, Wiederherstellen und Verlauf Deshacer, rehacer e historia

Undo and Redo

Audacity is a forgiving application. If you're afraid of messing up, you can relax, because Audacity is designed to let you try something and then undo it if you don't like it. This is really the only way to work with audio because it can be so unpredictable. It's hard to imagine what it would sound like to mix two sounds together until you do it, so it is useful to have a way to "Undo".

Audacity has unlimited undo back to the last time you opened a project or audio file. That means you can make a hundred changes, then change your mind and undo them all. Undo and redo are very fast, so even if you applied an effect that took five minutes, undoing it will take just a second or two, and just a second to redo as well. Use it to listen to "before" and "after" versions of a project.

There are four ways to Undo or Redo:

  • The options in the "Edit" menu
  • Two buttons in the Edit Toolbar: The Undo button Undo and The Redo button Redo
  • Select "History..." from the View menu and click on an action
  • Use the Keyboard shortcuts:
Windows Linux Mac
Undo CTRL+Z CTRL+Z CmdKey12Transparent.png+Z
Redo CTRL+Y CTRL+SHIFT+Z CmdKey12Transparent.png+SHIFT+Z

Only changes that modify the project can be undone. Changes that cannot be undone include:

  • Saving or exporting
  • Changing the selection (the selection is saved with the action)

Once you undo, if you then choose a new action, you've lost the original path; you can't undo the undo! Here's another way to look at it - suppose you made ten edits, numbered 1 through 10. Now you undo your way back to step 5, and then perform a new edit, which we'll call 6b because it's different from the original 6. At this point you can undo back to step 5 or all the way back to 1, but you can't get back to the original 6 through 10 anymore. Once you make a change in step 5, you lose whatever edits you had made after that step.

Saving does not erase your undo history, closing a project does; only the last saved version is remembered, you can't save multiple versions all at once.

History Window

Peter 07Nov16: we will need to update this with Paul's new button for clearing the clipboard.
  • Peter 21Nov16: Done

The History dialog lets you view and manage all of the actions you've taken since you opened a project. You can open it by selecting View > History...

UndoHistory.png
  • History list: This shows a list of all the editing actions that have taken place in the project since it was opened or created. Next to each action in the History list is a number telling you how much disk space is used to store the undo information for that action.
    • Click on an action in the history list to Undo or Redo back to that action. It's the same as choosing Edit > Undo or Edit > Redo multiple times.
  • Total space used: This displays the total disk space currently used by the project.
  • Undo Levels Available: This displays how many actions are available to Undo. It changes depending on the highlighted line in the history list. You cannot edit this value or use this dialg to effect Undos.
  • Levels to Discard: Indicates the number of Undo levels that will be discarded from the top of the history list when you click the Discard button.
  • Discard: Removes the number of actions specified in the Levels to Discard text box. This action is immediate and cannot be undone. Discarding undo levels will free up the disk space taken by the undo information associated with those actions.
  • Clipboard space used: Indicates the amount of space currently used by the Audacity Clipboard.
  • Discard: Frees up disk space by deleting all the data on the Audacity Clipboard.
  • OK: Accepts the changes made in the Undo History window and closes the window.

Example of Use of the History Window

Gale 19Nov16: ToDo-1 The example images below of the History window are wrong too, and the page is too wide even for 1280 px width (it fits in 1366px width). Given we are redoing the images, I suggest moving the Undo window partially over the waveform. All we need to see is the difference between the waveform amplified to 0 dB and not.
  • Peter 19Nov16: Thanks Gale, yes I'd realized later that these were Mac images and I was planning to redo this example set. I'd forgotten about the over-sized width - I'll fix that when I get around to redoing these. Useful P1 reminder though, thanks.

In the image below we see the Undo History window positioned beside a stereo file that has been imported into a project. The file size was 67.7 MB, and at the moment that amount of space is taken up on the hard drive for the Undo information.

History01.png

In the next image the user has performed a number of editing actions: she has repaired two clicks and amplified the entire track. These edits have double the disk size used by the project to 139.5 MB.

History02.png

Here we see how the user could quickly undo the "Amplify" step and the two "Repair" steps, returning to the project to the state it was in immediately after the file was imported. This is equivalent to selecting Edit > Undo three times. The project still uses 139.5 MB of disk space because it is still possible to Redo those editing actions.

Note that the project reflects the change selected in the Undo History window: the amplification has been removed and the clicks are back.

History03.png

Instead of undoing back to the import of the audio file the user may decide that everything done up to this point is perfect. In order to save hard disk space she could Discard unneeded Undo levels. In the image below she has chosen to discard 4 undo levels.

History04.png

After clicking the Discard button 4 Undo levels are discarded starting from the top of the "Manage History" list. The total disk space used by the project has been reduced to 67.7 MB.

History05.png

Note the difference between Undo and Discard

  • Undo removes steps from the bottom of the Undo History list.
    • When you Undo, you still have the option to Redo (as shown by the gray list items in the third image above) until you perform another editing action, at which point you will lose the ability to Redo.
  • Discard removes steps from the top of the Undo History list. This action is immediate and cannot be Undone.
    • Note that the Undo information is removed and the hard disk space it uses is freed up when you close an Audacity project. Thus you should only need to discard Undo levels if you are working on a very large project and are running short of hard disk space.