
SAMPLING 2 / SAMPLE EDITORS
---------------------------

An easily expandable set of modular offline GUI sample editors, replacing the old Sample Modifier and with ways more functionalities.


COMMON BEHAVIOR
---------------

-All editors have a Sample2 I/O pin, to receive the sample to be modified, and from which the edited sample is also sent.

-An unlimited number of editors can be connected in parallel to a common Patch Memory Sample module.

-Triggering always occurs manually by setting the Trigger pin. *NO update occurs automatically by setting any other pins.*

-A valid sample range for the required operation must be specified (ideally, by connecting the Range pins together with the Sample Display Editor range pins). Start is clipped at zero and End is clipped at the physical sample end.
Endpoints are *inclusive*.
        ->negative Start always means no selection
	->negative End is interpreted relative to sample end (-1 = default means last sample, and so on)
	->End is always clipped to sample length -1 (last sample)
	->End must always be >= Start, otherwise range is invalid (no selection)


WARNING - 5MB LIMIT
-------------------

At present (SE 1.4/1.5) blocks larger tha 5MB can't be transferred from Parameters (Patch Memories) to DSP. Any operation resulting in an increase of the stored sample length beyond this limit (eg. pasting from the Clipboard module, etc) will result in a failure to communicate the result to the DSP end.



OPERATION OF INDIVIDUAL EDITORS
------------------------------- 


CROP:
Crops (keeps) the selected range discarding all the rest.
After operation, the whole sample becomes selected automatically.

TRIM:
Trims (cuts) the selected range (note: this may paradoxically result in an empty sample, if the whole sample is selected).
After operation, the previous range becomes de-selected automatically.

SILENCE:
Silences (sets samples to zero) the selected range.

AMP:
Amplifies the selected range by either a linear factor or dB amount, depending on the Use dB pin setting.

INVERT:
Inverts (negates) the selected range.

FLIP:
Flips (swaps horizontally) the selected range.

NORM:
Normalizes the selected range to a specified level, which can be set in float units (1.0 = 10 V = 0 dB) or dB, depending on the Use dB pin setting.

FADE IN, FADE OUT:
Performs fade-in or fade-out of the selected range. By default, fading is linear. For a perceptually linear response (VCA-like), please set the Exp pin.

SMOOTH:
Useful after manual drawing, to smooth irregular edtis within the selected range by an adjustable amount (higher the Amt value -> stronger effect).
The Cyclic option must be enabled when working on a single cycle waveform and when the range of operation is the whole waveform: this way, smoothing will present periodic continuity from the end to the start of the waveform.


CLIPBOARD:
Allows copy/cut/paste by using a volatile buffer (the clipboard content is lost every time the plugin panel is closed.)

-By triggering Copy pin, the content of the specified range is copied to clipboard.
-By triggering Cut, the content of the specified range is trimmed and copied to clipboard.
 After operation, the previous range is de-selected automatically.
-By triggering Paste, the content of the clipboard (unless empty) is pasted at *Start* position, and End position is ignored (note: pasting to a void sample is allowed and will result in the Clipboard content being transferred, in this case range selection is ignored).
-By triggering Paste at End, the clipboard content is copied past the sample end (i.e concatenated); note that this isn't quite the same as pasting with Start = length -1.


UNDO:
This module can be used as a global UNDO swap and as such has no range, but operates on the whole sample.
Triggering Undo causes the previous sample received to be output.
Triggering Redo restores the last un-done operation.
Both Undo and Redo can't be triggered more than once.
Note: this module can't of course revert a sample to its initial state. If the sample to be edited is loaded from disc, you can easily implement a Revert operation by simply re-triggering the Sample Loader GUI.

