I want to build an intuitive interface for creating non-destructive cross-fades in Audacity.
Here is a link to the origin project suggestion on the Audacity GSoC ideas page. GSoC_Ideas#Intuitive_cross-fading
Proposal: First Development Stage
For the first stage of the project, I will implement the basic functionality implied by the the cross-fade mockup at http://limpet.net/mbrubeck/temp/cross-fade/.
Cross-fade functionality - For this stage of the project, the fade-in and fade-out shapes will be a single linked fade. Three fade shapes will be selectable.
- Linear - A constant-gain cross fade in which a linear envelope decreasing from 1 to 0 over the course of the fade is applied to the left-hand clip and a linear envelope increasing from 0 to 1 is applied to the right-hand clip.
- Logarithmic - A constant-power cross fade in which a logarithmically decreasing envelope is applied to the left-hand clip and the mirror image of this envelope is applied to the right-hand clip.
- S-Curve - A commonly discussed fade shape - see for instance http://transom.org/tools/editing_mixing/200309.stupidfadetricks.html. An envelope of 1/2+1/2 cos (2*pi*w/T) is applied to the left-hand clip where w is the number of samples from the start of the fade and T is the fade length in samples. The mirror image of this envelope is applied to the right-hand clip.
- Fade representation - A line will cut through the track display from the top at the fade start point to the bottom at the fade end point. Below the line, the left-hand clip will be rendered. Above the line, the right-hand clip will be rendered. For the linear and S-curve cross-fades, the two envelopes being applied to the clips sum to 1. This means that a single line shaped like the fade-out envelope is enough to completely visualize the cross-fade. In the logarithmic case, this is no longer true. More thought will need to be given to how to indicate that a logarithmic fade is being applied in a way that is consistent with what is actually being done. Dotted gray vertical lines will mark the start and end of the fade.
- Overlap extent - Since it will be possible for clips to overlap for longer than the actual duration of the fade, the total extent of the overlap needs to be displayed. I propose changing the track background to an unobtrusive light color inside overlapping regions. Waveform data for the (enveloped into silence) portion of a clip that extends past the fade boundary will be rendered in a different colour too. (Alternatively, if this turns out to be too obtrusive, this data could simply not be rendered.) To ensure that the existence of cross-fade is visible no matter how far out the user zooms, this background color change will have a minimum pixel width (possibly a single pixel).
- If there is time, a later refinement (second half) is to replace the color change used to indicate a fade with a small clickable icon. Clicking the icon could be used to select options such as 'locking in' the fade, so that the two clips are joined.
- In all of this colour choices will need discussion. Almost all new developers over-use red, because they want to draw attention to new features. We have found that shades of blue and grey tend to give a more restful interface than an overly colourful one, with colour for various 'modes' being used with great care. Often icons and shape changes give better visual cues than a colour-coding can.
- When a modifier is held down (I propose ctrl-shift), clips dragged into each other will no longer be forced to respect each others boundaries. Instead, an overlap region will be created and a cross-fade applied between the two clips. By default, the cross-fade will extend from the left-most point of the right-hand clip to the right-most point of the left-hand clip. Clicking and dragging the dotted lines that mark the fade boundaries will resize the fade so that the fade interval can be any continuous interval of the overlap region. Clicking and dragging a boundary of the overlap region (as marked by the background color change) will slide the clip that forms the opposite side of the overlap. Extending and overlap region in this way will be capped at the point where one clip would be completely contained in another. Right-clicking anywhere inside the overlap region will pop up a menu from which the user can choose between the three fade shapes.
A mock-up of this display and interface can be found at .
Proposal: Second Development Stage
The core features described above represent the planned first half of the development time and constitute the bare minimal deliverable. From this point on, a series of incremental features additions will be implemented as time allows.
- Default settings - The basic setup is geared towards artistic uses of cross-fades rather than utilitarian clean up procedures. To remedy this, an option will be added to the preferences menu to toggle automatic usage of a default set of parameters whenever a clip slide triggers cross-fade creation. In particular, default overlap and fade lengths will be set to allow rapid, repeated application of the same type of fade with a single mouse drag (for example, to apply a basic click removal fade to merge two clips).
- If time permits, a button will be added to the edit toolbar to allow quick selection of cross-fade mode. It will probably operate by popping up a dialog with the fade options, but the details are subject to discussion.
- (optional, if time permits) Envelope variation - The user will be given the ability to create arbitrary (single-linked) fade shapes by clicking and dragging points on the line that cuts through the cross-fade region.
- (optional, if time permits) Non-linked fade - A preference menu option will be provided to unlink the fade-in and fade-out envelopes from each other, allowing each one to be independently shaped and sized. Note that this option will dramatically change the way the cross-fade is displayed.
Some discussions of cross-fade uses, fade shapes, and glimpses of other programs' fading interfaces:
- This link shows a scenario very similar to the one described by james on the audacity-devel list and highlights the way that zooming in and zooming out interrupts the flow of editing work.
Insights From These Links
- The interface needs to cope with both crossfades that are within the clips and cases where the crossfade would go beyond the end of the clip.
- For artefact removal, being able to overlap the clips at high-resolution, so that the waves are in sync, and to then move the centre of the cross fade without moving the clips is a plus.
- ...other insights.
Summary From These Links
- ...How these affect/do-not-affect proposed interface.
- stereo track support
- display different from mono tracks
- picker for fade type
- files/classes affected
- planned changes to affected files
- files/classes affected
- possible optional extensions
- fade in/out with out another clip