This is a repost of a polished idea from the ideas megathread.
TLDR: A sample player / DJ player thing like those by Pioneer, Denon, Native Instruments, etc… I’m probably omitting some stuff in the description below, but it’s a nice starting point. The main inspiration for this module is the ability to setup a DJ workflow in VCV Rack with complicated send/return effects chains that can be beat synced to the track that’s playing.
Sample (external data): The song to play; loaded probably through drag and drop / right-click like how most samplers in the library currently function. However, an ability to load from RekordBox, Engine Prime, and etc. libraries would be useful in the future (i.e., with the addition of some a media browser so you can use the module to load songs more easily).
- Sample Lock (Boolean Switch): an additional right-click context menu option that prevents changing the sample when the song is currently playing.
- Sample BPM (Numeric Keyboard Input): The BPM of the sample is analyzed by an algorithm first, but there also needs to be a way to change the BPM manually.
- Sample Alignment (Rotary Encoder Knob): The position of sample playback on the BPM grid is analyzed by an algorithm to automatically detect beats in the sample and align the sample in the grid. However, there also needs to be a way to change the alignment of the sample within the grid manually.
Sample Position (Rotational Encoder / Click Sensor): i.e., “needle drop”. Select a point in the sample to play from. This is usually accomplished by displaying the entire waveform and either using a rotational encoder or touch sensor. Both can be done for VCV Rack to provide flexibility.
- Sample Position Lock (Boolean Switch): an additional right-click context menu option that prevents changing the sample position when the song is currently playing.
Play / Pause (Trigger Switch): Start the sample playback & stop the sample playback.
- Vinyl Brake (Knob): an additional parameter can control a vinyl break effect when playback is paused; measured in units of time.
- Motor Lag (Knob): an additional parameter can control a reverse vinyl break effect when playback is started; measured in units of time.
- Cue (Trigger Switch): Standard cue functionality from players. Jumps to the beginning of the song or wherever the cue-point is set if a cue-point exists
- Reverse (Boolean Switch): Reverse sample playback (inverts sample).
- Playback Rate (Slider): Control the rate that sample playback occurs at. There is usually an accompanying parameter for controlling the maximal bounds of the rate slider. playback rate is measured in % of BPM and the maximal bounds are typically log2, i.e., 2%, 4%, 8%, 16%, 50%, 100%. IMO replacing the (50%, 100%) tuple with (32%, 64%, 128%) would be nice.
- Sample Key / Pitch (TBD): Control the key / pitch of the sample without altering the BPM. This is usually accomplished through algorithms that I’m not currently familiar with. There are many ways to implement this including: (1) a pair of trigger switched, (2) a single encoder knob, or (3) a custom graphical interface).
Jog Wheel (Rotary Encoder): Scrubs through the sample the same way putting your hand on a vinyl would, i.e., for scratching, beat matching, wind-backs, and mangling.
- the far edge of the jog wheel usually functions as a “nudge” that is used to apply more subtle adjustments to sample playback rate, typically for beat-matching between songs
Performance Pads (Momentary Boolean Switch): 8 buttons that act as performance pads for various sub-features related to sample playback. Some common performance features are:
- Roll: Loop for 1/64, 1/32, 1/16, 1/8, 1, 2, 4, 8 beats while the switch is held.
Loop: Create arbitrary loops that can be quantized. The first press for a slot creates the start of the loop point. The second press creates the stop of the loop point and activates the loop. Subsequent presses disable / enable the loop. If the loop becomes activated by the user while the sample position is outside the loop, the sample position will obviously jump to the beginning of the loop; however, if the loop becomes activated by the user while the sample position is within the bounds of the loop, the sample position will proceed until it reaches the end of the loop.
- quantization level can be set through right-click context menu, i.e., whether it’s on and the granularity: 1/64, 1/32, 1/16, etc…
- Hot Cue: Create arbitrary jump points in the sample. The first press of a slot creates an arbitrary hot-cue point in the sample. Subsequent presses change the sample position to that slot’s cue point.
Auto-Loop (Boolean Switch / Discrete Encoder Knob): This functions very similarly to the loop and roll features. The boolean switch is used to activate/deactivate a loop in the song at the current beat. The encoder knob controls the duration of the loop in beats, i.e., 1/64, 1/32, 1/16, etc…
- Beat Jump (Shift Modifier): When the auto-loop is activated, beat jump changes the start position of the loop. On a lot of players this is accomplished by using a “shift” modifier and extending the functionality of the auto-loop’s encoder. This can be done in VCV Rack as well, or a dedicated knob / pair of trigger switches can be used if it works better that way.
Pretty much all the parameters can have CV inputs with attenu-verters. There is one important dedicated input that I can think of though:
Clock: Synchronizes the sample playback to other clocks / players.
- A boolean switch (i.e., the infamous “sync” switch) will be needed for controlling whether the player listens to the clock input.
- Sample: the result of sample playback after applying loops, reverse, etc. through the player
- Sample Playback: a gate that goes high when the sample is playing and low when it stops. I think it should follow the envelope of the motor lag / break as well.
- Clock: BPM signal for syncing other modules to the player. The clock output is active irrespective of sample playback state, i.e., as long as there is a sample loaded, the clock output will send the BPM signal.
- Cue: Sends a trigger any time a cue event occurs.
- Hot-Cue: Sends a trigger any time a hot-cue event occurs
- Performance Loop: gate that goes high when a performance loop is starting and low half-way through the loop
- Auto-Loop: Same as performance loop, but for the auto-looper
Most of the boolean options will have an associated light.
An additional widget is necessary to show the sample playback. This can be as complicated as the developer would want. There are plenty of excellent examples out there between hardware players and software DJ tools. The most important part, IMO, is to have zoom, show the beat grid clearly, and maybe color code different spectral components (lows, mids, highs).
A rough sketch:
There are a couple of specific algorithms for this module that need worked out, namely, the (1) beat detection algorithm / BPM analyzer, and (2) the key-shifting algorithm.