Looper for SuperDirt to provide live sampling in TidalCycles.
The TidalCycles looper can now be installed as SuperCollider Quark.
Currently this has to be done manually by downloading this repository and then adding the folder in SuperCollider under Language -> Quarks -> Install a folder
.
This procedure has the following reasons:
- Easier to extend and customize.
- There is a documentation in SuperCollider.
- The looper can be loaded in the startup script when starting the server.
- Different releases can be issued in the future (but this is not done yet).
To start the TidalLooper you first have to create a SuperDirt instance and then initialize the TidalLooper.
~dirt = SuperDirt(2, s);
~looper = TidalLooper(~dirt);
You can adjust various parameters:
~looper.pLevel = 0.8;
In SuperCollider you can also add the TidalLooper under File -> Open startup script
and have it available after every server start.
(
s.waitForBoot {
~dirt = SuperDirt(2, s);
// More SuperDirt ...
// Initialize the TidalLooper
~looper = TidalLooper(~dirt);
// You can adjust these parameter even in runtime
~looper.rLevel = 2.5;
~looper.pLevel = 0.8;
~looper.linput = 15; // Set this to your main input port.
~looper.lname = "mybuffer";
~looper.debugMode = true;
}
)
Note
The following section is available as TidalCycles source code under tidal/intro.tidal
as well.
First you should execute the following tidal code:
linput = pI "linput"
lname = pS "lname"
recordSource = pS "recordSource"
Now you can use linput
, lname
and recordSource
as parameter.
This basic operations which are explained below is shared by all looper modes. By default 8 buffers are created, and accessible under the name 'loop' (s) and a number from 0 .. 7 (n).
The simplest form for recording is
once $ s "looper" -- writes one cycle to the loop buffer and uses the input port 0 and the sample number 0
After recording you can listen back to the result with
d1 $ s "loop"
It is possible to set the length of the recording (this is equals to the length of the events) i.e
d1 $ slow 2 $ s "loop"
Use n to choose a specific buffer, i.e. n "2" is equal to "write to the second buffer under of the sample bank loop".
d1 $ s "looper" # n "<0 1 2 3 4 5 6 7>"
And each buffer is accessible with the n function
d2 $ s "loop" # n "[0,1,2,3,4,5,6,7]"
You can use each available input port for recording. This way you can write the orbit results (i.e. what came from d1) to a buffer.
d1 $ s "looper" # linput 13
You are able to switch between different input sources seamlessly with recordSource
. There are two available options:
- in: uses the input port of your sound card for recording
- out: uses the synth bus of an orbit for recording. You can switch between orbits with
orbit
:
d1 $ s "looper" # recordSource "out" # orbit 1 -- orbit 1 == d2
d2 $ s "superpiano" # note "c'maj7'4"
You can specifiy the name of your loop sample bank
once $ s "looper" # lname "bubu"
d1 $ s "bubu"
To reset all loop buffers just evaluate
once $ s "freeLoops"
To reset a specific buffer you need to add the buffer name and/or a buffer number
once $ s "freeLoops" # lname "loop" # n "3"
To persist all loop buffers of a specific buffer list just evaluate
once $ s "persistLoops" # lname "bubu"
Note 1: I prefer to use 'qtrigger 1' to ensure, that the recording starts from the beginning of the pattern. Maybe you want to use the looper with seqP, seqPLoop or wait.
Note 2: If you want to use more samples under one name, than adjust the numBuffers
in the Looper.scd
.
In replace mode, each time the recording pattern is called, the specified buffer is recreated and any existing buffer is cleared. The basic looper s $ "looper"
is actually the "rlooper"
(for replace looper) and just a synonym.
To continuously play back and record a loop, the code could looks like this
d1 $ qt $ stack [
s "rlooper" # n "<0 1 2 3>",
s "loop" # n "[0,1,2,3]",
s "808 cp!3"
]
If you record a loop of cycle length 1 and play it back at the same time, you will never hear a result, because the buffer is immediately rewritten at each cycle.
Note: You can change the default looper mode by changing the variable pLevel
in the Looper.scd
.
In single shot mode, the recording pattern for a buffer will only be applied once. Every time the looper will be executed to write on an existing buffer, nothin will happen. To use the looper in single shot mode you just need to use slooper
.
d1 $ qt $ stack [
s "slooper" # n "0",
s "loop" # n "0",
s "808 cp!3"
]
In combination with freeLoops
, you can treat the single shot looper like a replace looper, where the replacement happens manually. This is useful to simulate a classic looper behavior, where you record multiple layers with a manual trigger.
d1 $ s "slooper" # n "0"
once $ s "freeLoop" # lname "loop" # n "0" # orbit 0
Loop overdub - A mode found in many looping devices where new material can be added on top of — overdubbed on — existing loop material. This allows you to layer additional parts into a loop to create a fuller sound or a more “layered” effect. (See https://www.sweetwater.com/insync/loop-overdub/)
In overdub mode, each time the recording pattern is called, the specified buffer is kept and the incoming audio signal is mixed to the existing one. This means that no new buffer is created if a recording has already been made for that buffer. To use the looper in overdub mode you just need to use olooper
(for overdub looper) instead of looper
.
To continuously play back and record a loop, the code could looks like this
d1 $ qt $ stack [s "olooper",s "loop",s "808 cp!3"]
Note 1: The buffer length of a buffer is set when recording for the first time and cannot be changed afterwards (unless you clear the buffer with s "freeLoops"
) .
Note 2: In an older version the additional function playAll
was needed to simulate an overdub mode. This is no longer necessary because a "real" overdub mode was implemented.