JK's Random Sampler

Type: Module

Category: Source

Updated: Dec 27, 2020

Manufacturer: JKphobic

Documentation & Help

$10.00

Version 2.2

  • NEW: Button on bottom right of module opens a menu with new settings. (Current settings viewable in tooltip.)
    • Start offset divisions: Random value can be quantized to none (default), 4, 8, or 16 equal time divisions.
    • Pitch mode: Select between default random pitch operation ("range") and v/oct pitch control.
    • Save mode: Choose to save path names of samples or save sample data with the module.
  • NEW: Two new sample window mouse/key functions:
    • Right-click + Alt: load previous sample in same directory
    • Right-click + Ctrl: load next sample in same directory
  • FIX: Fixed bug where 5V input to Sample jack caused processing issues.
  • FIX: Fixed related bug where sample input CV was not wrapping to expected sample slot.
  • FIX: Fixed issue where multiple files would fail but only the last message box would appear. Message box now lists all files that failed to load or whose paths are no longer valid (for those stored internally).
  • Small adjustments to end declick function. Should sound better in most cases.

Overview

JK's Random Sampler provides an easy and compact way to add variety to patches that use sampled audio. Load up to 8 sound files into the sample window, then send an impulse to the trigger input to randomly choose and play any one of the loaded sounds. For further variation, controls are provided to adjust the randomness of the six sound parameters that change each time the sound is triggered.

JK's Random Sampler was created as a solution to the need for quick randomization of samples within a compact interface. It was originally intended as an easy way to add variation to drum sequences, but like with most things modular, its uses are whatever you make them. There's no reason you can't load any sort of sound into the device, using it for melodies, textures, or whatever else you might like. Alternately, try loading a few different drum sounds to turn the module into a simple (though perhaps brainless) random drum sequencer. You could even flirt with the dark side and trigger at audio rate to turn this thing into a dirty granular noise generator where the controls affect the flavor of the dirt (yum).

NEW Demo video for Version 2.0!

OLD Demo video


Interface

Sample Window

Left-click anywhere in the window to open the file browser. Choose a sound file (.wav, .ogg, .mp3, or .aif) and it will load into the next empty sample slot (highlighted slot has no effect on this). Dragging and dropping a sound file into the window yields the same result.

Right-click to remove the highlighted sample from the module.

Left-click + Shift anywhere in the window to load a random sound file from the last used directory.

Left-click + Alt, when highlighting a loaded sample, to load a random sound from the same directory as the highlighted sample.

Right-click + Shift anywhere in the sample window to remove all samples.

Right-click + Alt, when highlighting a loaded sample, to replace that sample with the one listed previously in the same directory.

Right-click + Ctrl, when highlighting a loaded sample, to replace that sample with the one listed next in the same directory.

Parameter Section

Six aspects of playback are available for random variation or CV input.

  • Volume (Vol): A multiplier for the overall loudness of playback. Maximum range: 0% (silent) to 150% (boost by half).
  • Decay: A percentage of the length of the sound (minus start offset) to use as the length of a linear decay envelope. Maximum range: 0.1% (extremely short) to 100% (no decay).
  • Start: An offset, as a percentage of total length, of where to start playback of the sound. Maximum range: 0% (start of the sound) to 99% (nearly the end).
    • In the menu button accessible at the bottom right of the module, the first submenu offers a choice between using default fully random offset ("none") or instead that value quantized to set number of divisions (4, 8, or 16). Among other uses, this option provides a quick and easy way to chop beats and and other loops. Note: the quantization happens as the last step in the process, after all randomization settings have been applied and offset value calculated.
  • Pitch: A shift in semitones by which to resample the sound using cubic interpolation. Maximum range: -24 semitones to +24 semitones.
    • In the menu button accessible at the bottom right of the module, the second submenu offers a choice of either the default random range operation or standard realtime V/Oct control. Note 1: the V/Oct option completely overrides the random settings, giving complete control of pitch to the control voltage. Note 2: the V/Oct option is only available when a jack is connected, and the mode will reset to the default random range mode if the jack is disconnected.
  • High Pass Frequency (HP): Frequency value for a 4-pole high pass filter. Maximum range: 0 Hz to 9000 Hz.
  • Low Pass Frequency (LP): Frequency value for a 4-pole low pass filter. Maximum range: 100 Hz to 20000 Hz.

Parameter Controls

For each of the six parameters there is a set of controls and an input jack. On triggering a sound, if there is no cable attached to the parameter's jack, a value is generated for the parameter based on the control settings.

The left white knob is the minimum allowed value, while the right white knob is the maximum allowed value. These define the active range of the parameter values. NOTE: If you only use these two knobs, the module should function exactly as it did in its previous version, simply choosing a random value within the set range.

The blue knob is the "center" value, and the black knob is a "stickiness" setting. Stickiness is a percentage of how likely the parameter value with be set to the center value rather than a random value. At 0%, you have a fully random parameter, while at 100% the center knob acts as a direct control of the parameter with no variation.

The toggles refer to the chosen randomness distribution. U stands for a uniform distribution, which means any value in the set range has an equal chance of occurring. N stands for a normal distribution (or Gaussian, if you want to sound smarter). In non-math terms, a normal distribution means values tend to cluster more around a middle value (the "mean") and occur less frequently the farther away you get (which, depending on your intentions, can be more musically useful). When set to normal distribution, the center knob also defines the mean.

Attaching cables to any CV input jack changes how that parameter chooses its value on trigger. Min and max instead define the range of values that a 0 to 5 V input signal gets mapped to (outside values will wrap, i.e. 7 V becomes 2 V, -2 V becomes 3 V). Stickiness will now refer to the likelihood of the value actually being set to the CV value - turn it to 100% for fully non-random CV control or 0% to completely ignore the CV input and choose based on the settings as above, though with the CV value used as the center value. The actual center knob has no purpose when a jack is connected.

Also, note that min, max, and center knobs are self-correcting, in that minimum <= center <= maximum is always maintained.

(Have a look at the third image if you need a better idea of how the controls work.)

Bottom Section

  • Trigger In: Accepts any input. Will trigger sample playback when input rises from 2.5 or less to above 2.5 Volts. Typically triggered with a clock signal, sequencer gate output, or LFO.
  • Sample: Overrides random sample choice and instead chooses the sample based on CV input voltage at the time it receives a trigger. Expected input range is 0 to 5 V (though values outside this range are wrapped). The input value is then mapped evenly across however many samples are loaded at the time.
  • Left and Right Outs: Sends audio output in standard -5V, 5V range. For usability with mixed use of mono and stereo samples, mono samples are automatically output to both left and right channels.
  • Option Menu: Settings for start offset quantization (explained above), pitch mode (explained above), and save mode (explained below). Note that the tooltip will report the current state of each of these settings.

Top Controls

  • De-click Start: The button in the top left corner of the module toggles a very short (2 ms) attack envelope that is retriggered along with the sample triggering. This is best used to avoid ugly clicks when changing the start offset of less harmonically rich sounds such as kicks, basses, or anything sine-like.
  • De-click End: The button in the top right corner of the module toggles a very short transition when a new sound is triggered before an old one has finished playing. This is sometimes helpful for when you are triggering sounds quickly, or using long sounds, and a difference in adjacent sample values may otherwise result in ugly clicks.
  • TIP: Neither de-click option is meant as a cure-all, especially when you're in the danger zone, triggering things extremely fast, but any remaining click-y issues can sometimes be addressed by shortening the decay envelope and/or lowering the lowpass frequency slightly.

Further Notes on Functionality

Once triggered, sounds will play to the end, with only a few exceptions. Playback is monophonic, so when a new sound is triggered, the previous sound will stop (see de-click end above for an adjustment to this). If decay time is shorter than sample length, the sound will stop when its output level reaches zero at the end of its decay envelope. Removing a sound from the sample window while it is playing will also stop its playback.

Reset and Randomize affect only controls, not the sample window. Variations also only apply to control settings; loaded samples will not change. Both patches and presets will save loaded samples.

Note that by default only the sample paths are actually saved, rather than the audio data itself. If on reload the module cannot find any files referred to by path, a message window will report the names of each.

In the menu button accessible at the bottom right of the module, the last submenu in the dropdown allows the user to choose to instead save sample data with the module itself in presets and patches. File paths are still saved, but if they become invalid, this is reported in a message window as a courtesy to the user - the data itself has still loaded. Finally, note that in data saving mode, if the path names become invalid, many of the sample window functions (load next, load random, etc.) will cease to function for those samples.


Post any comments, questions, concerns, feature requests, or bug reports on the forum or send an email here. And finally, have fun with it!

Title of Song

  • JKRS-amb1
  • JKRS-amb2
  • JKRS-drums2
  • JKRS-texturedrums