
SAMPLING 2 / SAMPLE DISPLAY/EDIT
---------------------------------

Zoomable/scrollable sample waveform display and editor.
Accepts standard BLOB V2 sample data (GUI) from compatible ED Sampling2 modules.
Can be coupled with the Scroll Bar module (ED/GUI) to edit or display long samples.
Can be coupled with more Sample Marker modules overlaid.
Several sample displays can be overlaid (eg. to plot stereo samples) by simply making the required background transparent and by setting colors and alpha channels suitably.


SELECTING AND ZOOMING
---------------------

If Allow Selection is enabled, by clicking anywhere in the display, a highlit area can be drawn to select a portion of the sample. Dragging the selection over the screen boundaries causes the screen to scroll automatically to continue selection until the physical sample limits. The selection is cleared by clicking anywhere on the display area and releasing the button without dragging. Clicking and dragging close to the selection margins allows adjusting of the latter. When Auto Zoom is enabled, once the mouse button is released after a selection, the selected area will be zoomed automatically to fit the display area.
Otherwise, zooming can be performed manually (eg. by a button) using the Zoom pin.
The selection endpoints (in sample units, where Sel End is always >= Sel Start) are transmitted to the respective input/output Selection pins. These pins can be also externally set, if needed.
When Sel Start and Sel End are identical just one sample is selected, since they are always *inclusive*.

Note that selection endpoints are preserved when a new sample is received; whenever this behaviour may result confusing, you can enable Auto Reset pos, to reset the display offset to zero every time a new sample is received.

Sample position under the mouse and corresponding sample value are constantly output by the apposite output pins (NOTE: this feature does not work in Structure View of SE 1.4 because of a SE bug)


EDITING
-------

By pressing CTRL, the current waveform can be drawn by hand by simply clicking on the desired waveform position and moving the mouse while keeping the mouse button pressed.
Note that the updated sample will be transmitted to the Sample I/O pin only when the mouse button is released, to prevent unnecessary data floods.
(NOTE: editing does not work in Structure View of SE 1.4 because of a SE bug)



PIN DESCRIPTION
---------------

.Sample2 I/O  - BLOB sample v2 data input and output

.Y Range - vertical amplitude range in V (default is 5V)

.Allow Selection - enable/disable mouse selection

.Allow Editing - enable/disable manual sample editing

.Lock Editing - allows automatic editing without need to use CTRL, every time the mouse button is pressed. You won't be able to zoom of course. Enable this setting when the editor is intended for drawing single-cycle waveforms and zoom features are not required.

.Auto Zoom - zoom automatically when releasing the mouse after a selection.
NOTE: in Auto Zoom mode, selection is disabled automatically after zooming (Sel pins are set to -1); therefore, to know the current display start and end position you can safely use the values of Offset and Offset+Visible-1

.Auto Reset Pos - if set, the current zoom position will be resetted every time a new sample is received.
If not set, the current zoom position will be preserved (if possible)

.Mouse Down - always set to TRUE when the user clicks anywhere in the active display area with the left mouse button

.Grid Step V - steps in Volts of the level grid


COSMETIC PINS
-------------

#? ARGB - specify the color of the corrisponding display elements using a standard 32-bits hexadecimal string. When no string is specified, the internal default color will be used


RIGHT-SIDE PINS
---------------

.Hover (output) - set to True when the mouse hovers the gadget box - SE 1.5+ REQUIRED 

.Offset (input/output) - display offset.
Connect to a Scroll Bar and/or to one or more Waveform Marker(s)

.Visible (input/output) - amount of visible samples.
Connect to a Scroll Bar and/or to one or more Waveform Marker(s)

.Total (output) - total number of samples (actual sample length).
Connect to a Scroll Bar and/or to one or more Waveform Marker(s)

.Zoom (input) - used for manual zooming, to zoom in the selected area

.Zoom Out (input) - zooms out by a factor of 2

.Home (input) - zooms all the ways out

.Select All (input) - select the whole sample

.Sel Start, Sel End (input/output) - selection end points or -1 if there is no selection

.Sample Pos (output) - outputs the position of the sample under the mouse pointer

.Sample Val (output) - outputs the sample value under the mouse pointer in native Float units




                                               
 