Coder Social home page Coder Social logo

thgrund / tidal-looper Goto Github PK

View Code? Open in Web Editor NEW
87.0 5.0 2.0 23.69 MB

Different looper variants for SuperDirt to provide live sampling in TidalCycles.

License: GNU General Public License v3.0

SuperCollider 100.00%
tidalcycles supercollider looper hydra live-coding obs-studio osc

tidal-looper's People

Contributors

thgrund avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

yaxu manten120

tidal-looper's Issues

start recording to buffer when silence ends

Hey!
I don't currently have a pedal or something to trigger the recording in Tidal while I'm holding my guitar and the method with qtrigger is quite unprecise. So I was wondering if there could be some way to have a special recorder that starts recording when it detects an amplitude greater than some threshold (maybe using something like the DetectSilence Ugen).

/b_alloc: memory allocation failed

I'm struggling to get tidal-looper working. I'm on supercollider 3.13.0.

I've stripped things down so I'm starting superdirt with the simplest SuperDirt.start and then run ~looper = TidalLooper(~dirt);

Then when I do d1 $ sound "looper" I see this in the post window:

/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed

I tried doubling s.options.memSize before booting superdirt but no luck.

Any ideas @thgrund ?

Here's my full post window output:

Booting server 'localhost' on address 127.0.0.1:57110.
Found 0 LADSPA plugins
JackDriver: client name is 'SuperCollider'
SC_AudioDriver: sample rate = 48000.000000, driver's block size = 1024
JackDriver: connected  Built-in Audio Analogue Stereo:capture_FL to SuperCollider:in_1
JackDriver: connected  Built-in Audio Analogue Stereo:capture_FR to SuperCollider:in_2
JackDriver: connected  SuperCollider:out_1 to Built-in Audio Analogue Stereo:playback_FL
JackDriver: max output latency 21.3 ms
JackDriver: connected  SuperCollider:out_2 to Built-in Audio Analogue Stereo:playback_FR
SuperCollider 3 server ready.
Requested notification messages from server 'localhost'
localhost: server process's maxLogins (1) matches with my options.
localhost: keeping clientID (0) as confirmed by server process.
Shared memory server interface initialized
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/core-modules.scd
---- core synth defs loaded ----
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/core-synths-global.scd
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/core-synths.scd
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/default-synths.scd
exception in GraphDef_Recv: exceeded number of interconnect buffers.
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/try-load-extra-synths.scd
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/tutorial-synths.scd
loading synthdefs in /home/alex/.local/share/SuperCollider/downloaded-quarks/SuperDirt/classes/../synths/zzzzz-core-modules-that-come-last.scd


217 existing sample banks:
808 (6) 808bd (25) 808cy (25) 808hc (5) 808ht (5) 808lc (5) 808lt (5) 808mc (5) 808mt (5) 808oh (5) 808sd (25) 909 (1) ab (12) ade (10) ades2 (9) ades3 (7) ades4 (6) alex (2) alphabet (26) amencutup (32) armora (7) arp (2) arpy (11) auto (11) baa (7) baa2 (7) bass (4) bass0 (3) bass1 (30) bass2 (5) bass3 (11) bassdm (24) bassfoo (3) battles (2) bd (24) bend (4) bev (2) bin (2) birds (10) birds3 (19) bleep (13) blip (2) blue (2) bottle (13) breaks125 (2) breaks152 (1) breaks157 (1) breaks165 (1) breath (1) bubble (8) can (14) casio (3) cb (1) cc (6) chin (4) circus (3) clak (2) click (4) clubkick (5) co (4) coins (1) control (2) cosmicg (15) cp (2) cr (6) crow (4) d (4) db (13) diphone (38) diphone2 (12) dist (16) dork2 (4) dorkbot (2) dr (42) dr2 (6) dr55 (4) dr_few (8) drum (6) drumtraks (13) e (8) east (9) electro1 (13) em2 (6) erk (1) f (1) feel (7) feelfx (8) fest (1) fire (1) flick (17) fm (17) foo (27) future (17) gab (10) gabba (4) gabbaloud (4) gabbalouder (4) glasstap (3) glitch (8) glitch2 (8) gretsch (24) gtr (3) h (7) hand (17) hardcore (12) hardkick (6) haw (6) hc (6) hh (13) hh27 (13) hit (6) hmm (1) ho (6) hoover (6) house (8) ht (16) if (5) ifdrums (3) incoming (8) industrial (32) insect (3) invaders (18) jazz (8) jungbass (20) jungle (13) juno (12) jvbass (13) kicklinn (1) koy (2) kurt (7) latibro (8) led (1) less (4) lighter (33) linnhats (6) lt (16) made (7) made2 (1) mash (2) mash2 (4) metal (10) miniyeah (4) monsterb (6) moog (7) mouth (15) mp3 (4) msg (9) mt (16) mute (28) newnotes (15) noise (1) noise2 (8) notes (15) numbers (9) oc (4) odx (15) off (1) outdoor (6) pad (3) padlong (1) pebbles (1) perc (6) peri (15) pluck (17) popkick (10) print (11) proc (2) procshort (8) psr (30) rave (8) rave2 (4) ravemono (2) realclaps (4) reverbkick (1) rm (2) rs (1) sax (22) sd (2) seawolf (3) sequential (8) sf (18) sheffield (1) short (5) sid (12) sine (6) sitar (8) sn (52) space (18) speakspell (12) speech (7) speechless (10) speedupdown (9) stab (23) stomp (10) subroc3d (11) sugar (2) sundance (6) tabla (26) tabla2 (46) tablex (3) tacscan (22) tech (13) techno (7) tink (5) tok (4) toys (13) trump (11) ul (10) ulgab (5) uxay (3) v (6) voodoo (5) wind (10) wobble (1) world (3) xmas (1) yeah (31) 
... file reading complete. Required 444 MB of memory.

SuperDirt: listening to Tidal on port 57120

---- initialize TidalLooper ----
loading synthdefs in /home/alex/src/tidal-looper/classes/../synths/standard.scd
function olooper was successfully loaded.
function looper was successfully loaded.
function rlooper was successfully loaded.
function freeLoops was successfully loaded.
-> a TidalLooper
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed
/b_alloc: memory allocation failed

instrument not found

Hej Mr Reason,

I'd love to use your tidal-looper but I get this message in SC after following all your steps:

no synth or sample named 'looper' could be found.
instrument not found: nil

Did I miss something?
Thanks a lot!

generalize replace/overdub switch

Right now (or at least the last time I looked at your code), it seems that even though pLevel is a float between 0.0 and 1.0, only those two values are relevant.

I think it would be interesting to make use of the intermediary values. Say tidal-looper is recording. At any given time, we have one sample coming from the input i, and one sample coming from the buffer b. The new value put in the buffer could be b * pLevel + b * (1 - pLevel). That way, pLevel = 0 is replace mode, while pLevel = 0.5 is like overdub (with an attenuation of the previous loop) and pLevel = 1.0 is regular playback.

Does it make sense?

qtrigger complaining about argument

Hi, this looper is super cool! It's all working great for me, except when I try to use qtrigger. If I write my code as such:

linput = pI "linput"
lname = pS "lname"

d1 $ qtrigger 1 $ s "looper"

I get the following error in the tidal console:

<interactive>:392:6: error:
    • Couldn't match expected type: ControlPattern -> Pattern ValueMap
                  with actual type: Pattern a0
    • In the first argument of ‘($)’, namely ‘qtrigger 1’
      In the second argument of ‘($)’, namely ‘qtrigger 1 $ s "looper"’
      In the expression: d1 $ qtrigger 1 $ s "looper"

Do you see anything I might be doing wrong? I feel like it must be something simple

issue with lazy sample loading

Hi,

Tidal-looper is working seamlessly when sample banks are loaded at superdirt
startup. But if I use "lazy sample loading" (~dirt.doNotReadYet = true in supercollider
startup file), I get that error : reading soundfile as needed: loop:none ERROR: Primitive '_SFOpenRead' failed. when I try to play a recorded loop.

For some reason, it seems that lazy loading and tidal-looper don't play well together.

I'd really like to use both cause I have a very large sample library and looping in tidal is
so much fun.

looper not triggering? or buffer not being overwritten?

Hi,

I get very inconsistent behavior when trying to record loops.
Sometimes a loop gets recorded, sometimes not. Sometimes the old loop is not overwritten when using rlooper, sometimes it is.

I started using named loops instead of the standard 8 buffers, but that did not change the behavior.
I feel like I'm missing a very basic concept.

I need to run my once $ s "looper" # lname "bubu"
multiple times in order to actually get a recording. I thought it had to do with not waiting long enough but even when waiting multiple cycles, sometimes it triggers and sometimes it does not

anyone have an idea what is going on?

turning tidal-looper into a Quark / Superdirt synth

tidal-looper would benefit from a better integration in the ecosystem:

  1. turning it into a quark for easy install/update
  2. turning it into a Superdirt synth for easy integration into a superdirt instance

I'm not very familiar with the supercollider ecosystem, but I can have a look ...

Provide README as a .tidal file

I just made this for myself and thought I would share it in case you want to include it

Great projects, thanks for sharing

-- ## Pre-Requirement

-- First you should execute the following tidal code:

linput = pI "linput"
lname = pS "lname"

-- Now you can use `linput` and `lname` as parameter.

-- ## How to use it

-- 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 input port for recording. If you use i.e. Blackhole, than the output and input ports have the same results. This way you can write the orbit results (i.e. what came from d1) to a buffer.

d1 $ s "looper" # linput 16

-- 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 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`.

-- ## Replace mode

-- 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 $ qtrigger 1 $ 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`.

-- ## Overdub mode

-- 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 $ qtrigger 1 $ 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.