Jump to content
IGNORED

TidalCycles


Yaxu

Recommended Posts

Yeah I do most things in Linux these days. I have Tidal running with a vim plugin. Jack is a sound server for Linux that allows you to route audio from different applications. Took a while to tweak it right, I was getting a whole bunch of Xruns which would result in unpleasant audio glitches.

 

I'd post the code for that but it's on my laptop and I'm at work atm. It isn't anything fancy, and it's working with the Diva arpeggiator.

Nice, I have a similar (maybe the same) setup - any recommendations on said tweaks?

Link to comment
Share on other sites

re: Fold. Absolutely, it's an Atom feature that lets you collapse / expand bits of code, so that you can really focus on the lines you want to edit. I find it then much easier as well to evaluate a bunch of lines at once (when folded).

 

As you can see, I've chained several cycles together using cat, and am also trying to fully remember how to combine cat and stack (to chain stacked cycles that is).

 

I spent some times with JackOSX years ago when I tried Harrison Mixbus, it was a bit of a CPU hog back then. I'm on OSX, but found that using Live (that I've used for years) to host plugins and handle everything audio while using TC to MIDI sequence everything (and to avoid all sorts of potentially unstable audio routings). Might worth a try to experiment with similar set-up with Reaper, Ardour or Bitwig maybe ?

 

I have yet to figure out if / how I can send one shot MIDI notes / CC from TC to Live, to be mapped to Live's transport and to launch scenes : could be a nice, simple workaround to sync both / change BPMs without  much hassle. The same way I've used d8 here to re-trigger a free running M4L LFO every 4 cycles.

 

I literally have to write down seqPool in my TC sketchbook and investigate that one :)

 

I genuinely love TidalCycles, what a fantastic tool, a proper game changer for me. And I equally appreciate how sharing knowledge is tied to its DNA, the way we're doing it here or on Lurk, at the exact opposite of any secret sauce bullshit or whatever.

Edited by Nil
Link to comment
Share on other sites

 

Yeah I do most things in Linux these days. I have Tidal running with a vim plugin. Jack is a sound server for Linux that allows you to route audio from different applications. Took a while to tweak it right, I was getting a whole bunch of Xruns which would result in unpleasant audio glitches.

 

I'd post the code for that but it's on my laptop and I'm at work atm. It isn't anything fancy, and it's working with the Diva arpeggiator.

Nice, I have a similar (maybe the same) setup - any recommendations on said tweaks?

 

 

this is a good read if you're on Fedora:

https://fedoraproject.org/wiki/JACK_Audio_Connection_Kit

 

the real fix that eliminated Xruns for me was using this as a guide:

https://github.com/raboof/realtimeconfigquickscan

 

Before that I had a setup where I was sending MIDI to a separate PC via aseqnet and x11 forwarding Renoise and Diva back to my laptop. It's still a good setup if I really want to push things, but for now, running the U-he plugins with TC all on the same laptop is performing fine now that I have it tweaked for Jack.

 

@Nil

I didn't know about that concat function for TC, another good tip! and probably more practical then SeqP if I'm just trying to construct a long pattern. SeqP is useful if you want to loop certain stacks for a particular number of cycles.

 

Like I was experimenting organizing tracks like this:

 

 

do

resetCycles

let pat1 =

                striate' 10 0.9 $

                n "4 [10/2 83]*2 40/2 30*3"

                # speed 0.4

                # "dr660"

let pat2 =    

                every 2 (slow 2) $

                n "19 39 40*3 23/3"

                # speed 0.5

                # "dr660"

let pat3 =

                n "100 [93*4]/2 30 40"

                # speed 1

                # "dr660"

let pat4 =

                n "29/2 32*4 92/4"

                # speed 0.7

                # "dr660"

let pat5 =

                n "82 91 94/2 12*3"

                # room 0.1

                # "dr660"

let stack1 =

                slow 2 $    

                stack [pat1,pat3]

let stack2 =    

                striate' 4 0.4 $

                stack [pat1,pat2]

let stack3 =

                every 2 (0.25 <~) $

                stack [pat3]

let stack4 =    

                fast 2 $

                every 3 (0.125 <~) $

                striate' 6 0.3 $

                stack [pat2]

let stack5 =

                striate' 17 0.2 $

                every 2 (0.5 <~) $

                stack [pat4,pat1]

let stack6 =    

                striate' 4 0.7 $

                stack [pat5]

let seq1 = (0,1,stack1)

let seq2 = (1,2,stack2)

let seq3 = (2,3,stack3)

let seq4 = (3,4,stack4)

let seq5 = (4,5,stack5)

let seq6 = (5,6,stack6)

let main = seqPLoop [seq1,seq2,seq3,seq4,seq5,seq6]

d1 $ main

        # orbit 0

        # gain 0.6

 

 

 

I agree, tidalcycles is great. Before I was trying to do similar pattern-creation in SuperCollider via Pbinds, and this just works so much better. It's great that the community is so helpful, been learning it quick by just lurking the message boards and reading/watching all tutorials.

Link to comment
Share on other sites

As far as I can tell after having a peek at its homepage, Sonic Pi looks like it requires much more typing to get to the same point. Looking at bits of its code, the command lines / function seem more easily understandable for a novice and, consequently, simpler to remember. But I suppose it may lead to a less to-the-point workflow.

 

From my super short experience, TC might be the most direct to use. You have to learn its function shortcuts and overall syntax, but once you grasp it and get to use it you can write super complex patterns in a heartbeat. If you can visualize mentally / conceptually 

 

TC is easy to use with synths too and to integrate to your current workflow IMO.

 

I gave Gibberwocky a try, because it looks pretty awesome, detailed and easy to integrate to Live/Max... but just like (apparently) Sonic Pi, it requires way too much typing compared to TC to get similar results.

Link to comment
Share on other sites

Yeah, that's one thing I love about TC, the terseness. After using it for a jam with someone this last weekend, I feel even more confident that this is how I want to do my sequencing in the foreseeable future. There's so much you can do with so little code, and you can turn on a dime. Since getting my laptop set up, I haven't even bothered trying to hook it up to hardware or plugins or even another SuperCollider synth. I usually spend way too much time on sound design relative to sequencing. With TC I'm having so much fun sequencing that the most sound tweaking I've bothered to do is to loop a built-in drum sound to turn it into a pad.

 

There's been a few suggestions of similar things in this thread. I'm not sure what it is about TC that makes people avoid it at first - maybe the initial setup because admittedly it's a minor hassle. I avoided it too until Youtube kept recommending me a kindohm set. I finally watched it, paying careful attention to his actions, and I was blown away.

 

Also I think someone mentioned it already but the community is great. It's a pretty diverse bunch of folks from seasoned Haskell hackers to music academics to average EKT types who just wanna have fun tinkering and making tunes. And yaxu's attitude is great, he's right in there taking suggestions and answering questions and encouraging people to contribute. TC has a bright future.

 

this is a good read if you're on Fedora:

https://fedoraproject.org/wiki/JACK_Audio_Connection_Kit

 

the real fix that eliminated Xruns for me was using this as a guide:

https://github.com/raboof/realtimeconfigquickscan

 

Before that I had a setup where I was sending MIDI to a separate PC via aseqnet and x11 forwarding Renoise and Diva back to my laptop. It's still a good setup if I really want to push things, but for now, running the U-he plugins with TC all on the same laptop is performing fine now that I have it tweaked for Jack.

Ah, yeah, I ran that quickscan thing too, that thing is brilliant. I ended up using the JACK version that doesn't do dbus, and that solved some problems that the scan didn't detect. I think the only thing I haven't done yet from its suggestions is to replace my kernel with an RT version. I will check that fedora one as well.

Link to comment
Share on other sites

you bring up a good point. I think the issue I have often is I get too focused on one particular sound and then get sidetracked from the complete composition. this works sometimes and can be inspiring if I hit on an interesting sound, but I think the approach I'd like to have is getting a good structure laid out before I fill in the details. I really want to start working on getting a better groove. going to try and ignore my synth params a bit (and even worse compressor or tape filters), to get more familiar with TC.

 

I did try a RT kernel but it was buggy. I ended up going back to the default kernel, although the other tweaks definitely helped.

Edited by Ovitus
Link to comment
Share on other sites

Considering your skills with sequencers and synths you should feel home quickly :)

 

@all : 1)  I've found a simple way to sync Live's transport and tempo with TC :

 

 once $ ccv "127" # ccn 15 # s "midi" # midichan 15 -- Trigger Transport / Play

 once $ ccv "127" # ccn 16 # s "midi" # midichan 15 -- Scene 1
 
It makes the most of the ability live has to change BPM when launching a new scene, and "once" lets you just send a note / CC... once.
I suppose this way I should be easily able to build a whole live set with various tempi... and to navigate through soft synths presets etc.
I really like that way to treat Live like a simple plugin host / recorder.
 
2) has anyone succeeded in making resetCycles work ? I've also tried various ways (i.e. "pure now" and "cps (-1)") to reset cycle count when playing a new pattern, so that it always starts with the first note... in vain.
 
3) have you guys explored SuperDirt's MIDI ? I still can"t get the velocity to work as expected.
Link to comment
Share on other sites

 

Considering your skills with sequencers and synths you should feel home quickly :)

 

@all : 1)  I've found a simple way to sync Live's transport and tempo with TC :

 

 once $ ccv "127" # ccn 15 # s "midi" # midichan 15 -- Trigger Transport / Play

 once $ ccv "127" # ccn 16 # s "midi" # midichan 15 -- Scene 1

 

 

That's pretty neat, thanks. One day soon I will get over learning Push and back into live coding sequences too, but not yet...

 

Last time I tried TidalCycles I could not even figure out how to send basic MIDI.. I guess I even got stuck at setting up VSCode as the text editor. Probably too exhausted from writing code all day at work. :)

Link to comment
Share on other sites

  • 3 weeks later...

If you want to apply functions to e.g. only the bd events in a pattern, you can use fix https://tidalcycles.org/index.php/fix

 

d1 $ fix (fast 2) (s "bd") $ n "0 3 2 1" # s "bd sn"

 

... should make the bds go faster

 

A warning though, for some reason fix uses a lot of cpu, you can't get away with using many at once.

 

You can use gain to control midi velocity, but the scaling of it is wrong.. Looks like there's a workaround here https://github.com/musikinformatik/SuperDirt/issues/120

Edited by Yaxu
Link to comment
Share on other sites

  • 3 weeks later...

Thanks Alex ! A velocity function with a usual scale (either 0/127 or 0/1) would be damn handy, at least for anything MIDI related.

 

Guys, this thread (courtesy of the mighty Kindohm) on the new toplap forum has been incredibly helpful for me, so I felt like sharing it here , and : https://toplap.lurk.org/t/shortcuts-or-higher-level-tidal-functions-for-faster-pattern-composition/354

 

Another breakthrough (at least, for me) : whenever possible, to write patterns over several cycles, you can just use < > and [ ]. No more need then for cat.

Each event within < > happen once per cycle, and you can use integers or a sequence of integers within [ ].

 

So it becomes even faster / terser to write something (relatively) complex like :

do
  setcps (160/60/4)
  d1
    $ degradeBy "<0 0.375 0.125 0 0.75 0.875>"
    $ every 16 (rev)
    $ s "<[bd [bd*2 ~ ~ ~], [~ cp:1]*2] [bd(5,8), ~ [cp:1]*2] [bd ~ [~ bd] [~ bd ~ ~],cp:1(3?,8)] [bd(3,8,<0 2>), [~ cp:1]*16?]>"
    # orbit 0
  d2
    $ degradeBy "<0 0.625 0.8725 0 0.25 0.125>"
    $ striate "<1 1 1 4 1 1 1 4?>"
    $ s "[~ arpy]*8"
    # up "[1 1 1 4 -1 -1 6]/2"
    # orbit 1
    # room 1
    # size 0.875
    # gain 0.625

ps: not meant to be a nice musical pattern, more of an illustration of what I meant.

Link to comment
Share on other sites

Guest Ovitus

I'm doing something like this to sequence midi:

1 freq 2 e1:decay 3 e1:sus 4 e2:decay 5 e2:sus

do
let
        sin a b c d = struct "t*64" $ ccv (range a b $ slow c sine) # "midi" # d
        k = degradeBy 1
        c = ccn
        pat = midichan "{0 ~ ~ 0 ~ ~ 0 ~, 1 ~ 1 ~ ~ ~ 1}%10" # "midi"
        mst = cat [
                pat # up "[-4 -10]*2 -4 15/2",
                pat # up "4 -10 [11 -3]/2",
                pat # up "-3 -10/3 10 -7 -3 -3*2"
                ] # sustain 2
        cc = stack[
                sin 40 50 4 $ stack[c 2,c 3,c 4,c 5] # midichan 0,
                sin 60 70 4 $ stack[c 2,c 3,c 4,c 5] # midichan 1
                ]   
d1 $ stack[cc,mst]

hush

d1 $ midichan 0 # ccn 5 # ccv 0 # sound "midi"

Only gripe I have is that as you can see with cat, I can put each pattern on a separate line and easily read the sequence of my list, whereas with my midichan polymeter, the syntax doesn't allow me to do that.

 

Link to comment
Share on other sites

  • 4 weeks later...
On 3/2/2019 at 6:56 PM, Nil said:

@all : 1)  I've found a simple way to sync Live's transport and tempo with TC :

 once $ ccv "127" # ccn 15 # s "midi" # midichan 15 -- Trigger Transport / Play

 once $ ccv "127" # ccn 16 # s "midi" # midichan 15 -- Scene 1
 
It makes the most of the ability live has to change BPM when launching a new scene, and "once" lets you just send a note / CC... once.
I suppose this way I should be easily able to build a whole live set with various tempi... and to navigate through soft synths presets etc.
I really like that way to treat Live like a simple plugin host / recorder.

The new support for Link has made it even more reliable and useful https://toplap.lurk.org/t/link-support-preview/418

These custom functions of mine, even if quite rudimentary, might come handy if anyone's using TC similarly :

Spoiler

let
  drm = s "midi" # midichan 0
  syn1 = s "midi" # midichan 1
  syn2 = s "midi" # midichan 2
  syn3 = s "midi" # midichan 3
  syn4 = s "midi" # midichan 4
  syn5 = s "midi" # midichan 5
  syn6 = s "midi" # midichan 6
  syn7 = s "midi" # midichan 7
  syn8 = s "midi" # midichan 8
  meta = s "midi" # midichan 15
  playLive = once $ ccv "127" # ccn 0 # meta
  stopLive = once $ ccv "127" # ccn 1 # meta
  recLive = once $ ccv "127" # ccn 2 # meta
  sc1 = once $ ccv "127" # ccn 127 # meta
  sc2 = once $ ccv "127" # ccn 126 # meta
  sc3 = once $ ccv "127" # ccn 125 # meta
  sc4 = once $ ccv "127" # ccn 124 # meta
  sc5 = once $ ccv "127" # ccn 122 # meta
  sc6 = once $ ccv "127" # ccn 121 # meta
  sc7 = once $ ccv "127" # ccn 120 # meta
  sc8 = once $ ccv "127" # ccn 119 # meta
  drm1 = n "-24" # drm
  drm2 = n "-23" # drm
  drm3 = n "-22" # drm
  drm4 = n "-21" # drm
  drm5 = n "-20" # drm
  drm6 = n "-19" # drm
  drm7 = n "-18" # drm
  drm8 = n "-17" # drm
  drm9 = n "-16" # drm
  drm10 = n "-15" # drm
  drm11 = n "-14" # drm
  drm12 = n "-13" # drm
  drm13 = n "-12" # drm
  drm14 = n "-11" # drm
  drm15 = n "-10" # drm
  drm16 = n "-09" # drm
  v127 = gain 1.27
  v120 = gain 1.27 --WIP
  v112 = gain 1.27 --WIP
  v104 = gain 1.27 --WIP
  v096 = gain 1.175
  v088 = gain 1.15
  v080 = gain 1.1225
  v072 = gain 1.09225
  v064 = gain 1.06
  v056 = gain 1.06 -- WIP
  v048 = gain 1.06 -- WIP
  v040 = gain 1.06 -- WIP
  v032 = gain 1.06 -- WIP
  v024 = gain 1.06 -- WIP
  v016 = gain 1.06 -- WIP
  v008 = gain 1.06 -- WIP
  v000 = gain 0

synX etc.. are too make MIDI routing faster and work with my Live template (and IAC busses).
scX are to trigger scenes directly from TC.
playLive, stopLive and recordLive are quite self-explanatory I suppose.
drmX are simple shortcuts to sequence drum machines (virtual and hardware alike), and work from the get go with Live's Drum Rack.
Still have to find adequate gain values for WIP velocity functions.

I also have set a simple Automator app to launch SC3 (and a MIDI.scd file), Atom, Carabiner and Live all at once if anyone's interested.

Link to comment
Share on other sites

  • 4 weeks later...

Getting back into this thing. I managed to get VSCode up and running sending MIDI to Live, but still how do I get Tidal to receive sync FROM Ableton. I tried out that TidalLink thing, which connects nicely to Live's Link but then completely fails to affect any MIDI coming from Tidal itself. ?

If anyone managed to get this to work, could you share the code?

Maybe it is just simpler to make Live the slave...

Link to comment
Share on other sites

14 hours ago, Nil said:

A ha this sounds much more promising than the TidalLink from random Github repository. Will try it out, thanks!

Edit: big thanks! Got it to work no hassle.

Edited by thawkins
Link to comment
Share on other sites

Now that I got it syncing nicely with Live through Carabiner, it was really fun to jam around with the patterns and cycles. I wish it could run without having SuperCollider open in the background (I suppose sclang should be able to execute the SuperDirt startup from command line?). Also there seem to be some technical difficulties - Live stopped recording at some point abruptly; the whole computer crashed at final render and also had the issue where Link was somehow resetting the playhead (I hit Live's play button but the arrangement would never get to the 2nd measure - weird). Not sure if any of those issues are due to TidalCycles or some MIDI feedback somewhere... My Roland XV-5080 is also hooked up through optical cable so there may be some syncing issues there.

I made this week's weekly jam completely in TidalCycles (record MIDI to Live and then cut and render).

https://streak.club/p/35199/sun-2-jun-by-thawkins

Link to comment
Share on other sites

I went on a big detour over the last few months, trying to learn SC without Tidal involved. I dusted off the old TC sessions this evening and holy shit, I didn't know how much I missed this thing. At least I can roll my own synths now.

Is that Caribiner thing only good for Live, or does it enable general on-the-fly start/stop? This was really the big thing that bugged me about TC: I just want big start/stop buttons like the Elektrons. Well, that and easy mixing with a controller, but now that I know some SC it's easy to imagine how I would set this up.

Edited by sweepstakes
Link to comment
Share on other sites

It’ll work with anything Link compatible, super handy really.

Check my sort of workaround using once and CCs otherwise to trigger play/stop from Tidal to manually sync transport between several MIDI devices (a few posts above) ? I actually combine both, works great.

Link to comment
Share on other sites

8 hours ago, Nil said:

It’ll work with anything Link compatible, super handy really.

Check my sort of workaround using once and CCs otherwise to trigger play/stop from Tidal to manually sync transport between several MIDI devices (a few posts above) ? I actually combine both, works great.

Hmm, it looks here like you are triggering start/stop of external sequencers from Tidal? I want to go the other way around - push a button on a controller and Tidal instantaneously starts at phase 0, beginning of the cycle, so I can easily sync by ear like with any other decent sequencer.

Last time I chatted about this on Lurk, I recall there was a function for this, but that for some reason it was starting by default at halfway though the bar, and I could not get it to reliably do what I wanted. I think the prescribed workaround was something like (0.5 <~) which would not consistently play events at the very beginning of the cycle.

Edited by sweepstakes
Link to comment
Share on other sites

15 minutes ago, Yaxu said:

Yes start / stop still needs fixing since tidal 1.0 happened..

OK, kind of a bummer but thanks for confirming.

If I had the Haskell chops I would try to help fix this. Someday!

Link to comment
Share on other sites

  • 4 months later...

I attended an Algorave workshop (which used TidalCycles) at a video game music composers' convention last weekend, and it got me motivated enough to finally actually install it and give it a go. I think a few people in Melbourne are going to start a live coding club as well, which should be nice ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.