two modules that work together to provide you with key-controlled sample triggering.
-You need to make a table containing your samples first!
-Though you could also load an entire drum/melody pattern, use the "sample select" as overall search and then use the start/end parameters to finetune your loop points.
-To find the right sample-length settings (sample length, amount of samples), see the "overview" on the samplePlayer module
this is the module that actually plays the samples. Only 2 parameters are on-board: "samplelength" and "intExt".
When "intExt" is high, it uses the samplelength set by the samplelength control. If it's low, it uses the samplelength-input of the module. This can be used with the controller to save the samplelength of your samples for each table.
Though this "samplelength" "should" be set to the right value, you could of course still set it to the wrong value and read out multiple samples after 1 trigger within a single stage.
This is the module that can be used to control the samplePlayer with a keyboard (don't forget to offset your notes with +64 to stay in the "positive" readout of presets).
Each of the inputs of the samplePlayer has it's own control on this module, that can be saved into an array and later recalled and sequenced with the preset-input.
The array is being read out and set to the outputs of the controller.
During play, while the controller is automated by the preset-input, you can still select a preset with the onboard preset selector and adjust the preset.
You can also select the internally selected preset to be send to the samplePlayer by setting the "intExt" button to high.
When changing the preset-selector to edit another preset, the controls will be updated from the table of the newly selected preset.
NOTE though, that when this module is used inside a polyphonic subpatch, the parameter-update might not work.. I noticed that in another project of mine.
-the samplePlayer is divided into 3 parts: start, loop and end. Each have their own controls for play positions, pitch and sample select.
-if loop is off, it just plays from startStrt to endEnd (these are the names of the controls) and these decide the start and end positions of a "normally" played sample without loop. Note that when start is behind the end, the sample will be reversed.
if loop is on, there are 3 loop-modes: forward, reversed and alternate.
when triggered, the samplePlayer will start playing the "startsample" from the startStrt position to the startEnd position.
When that is reached, it will jump to loopStrt position and move to loopEnd position. (for reversed, loopStrt and loopEnd are switched).
For forward and reversed, if the start/end position is reached, it will jump back to the other position and plays again in the same direction as long as the incoming gate is high.
For alternate, if either position is reached, the samplePlayer reverses it's play-direction, alternating between forward and reversed play as long as the incoming gate is high.
When the gate is release, the module will go into the end-stage.
It will then play it's own stage's sample from the selected endStrt position to the endEnd position.
Next to this, there is an internal oscillator that can be added to the readout position, creating FM effects.
Of course, the width of this can be saved along side with the other settings (or use this to save some other parameter for another effect).
To top it all off, the sampleController has a sample-display which shows the sample that you are adjusting(start/loop/end-sample of selected preset) along with the start and end positions of the parameters belonging to that stage (start=high peak, end=low peak)