
SAMPLING 2 / SAMPLE PLAYER
--------------------------

Plays an audio sample in standard v2 sample format.

Uses Double Precision sample positioning not to lose position accuracy with long samples (despite usage of long samples is never recommended).

Gate controls playback depending on Gate Mode setting (hidden):
-Gated: Gate can be switched repeatedly to start, pause or resume playback until the end of the sample;
-Gated Looped: as Gated, but playback will proceed from beginning once the end is reached; 
-OneShot: Gate triggers playback of the entire sample (further Gate changes are ignored until the end).

The Reset pin can be triggered at any moment to reset the play position.
Reset and Gate can be triggered together, to obtain automatic reset on trigger.

The original rate of the received sample, if known, should be specified with the Orig Rate Hz pin. Any value <= 0 (default) won't cause any rate conversion.

A frequency scaling factor can be specified with the audio Freq Scal pin, suitable for pitch modulations, in linear units, where 1 (default) means no scaling, 2 means one octave up, 0.5 one octave down.
Negative values can be specified aswell to play the sample backwards; in this case, playing on triggering will start from the last sample.

Resampling quality can be specified with the Anti Alias pin. Please refer to SAMPLING_V2.pdf for the available filters.

For convenience, the current playing position in samples is constantly output by the Position integer pin. Note that this pin, to prevent unnecessary control data flooding, is updated only once for every audio block (96 or 128 samples long, depending) and NOT on every sample frame. This pin is mostly intended to provide visual feedback of the playing position, for example when connected to a Sample Marker or similar GUI module.

NOTE: to limit playback to a desired sample region, please use a DSP Sample Range module upstream.

NOTE: whenever a very basic sample player for quick tests or simple tasks and with pretty no features is preferred, a Naive version of this module is also provided.




