LIVE CODING

with tidal

Disclaimer:

this talk is based on @yaxu's workshop notes at Resonate 2015

Dario Villanueva

@radiodario

Live coding:

source code edited and interpreted in order to modify a running process

TOPLAP Manifesto

WE DEMAND:

  • Access to the performer's mind
  • Show us your screens!!!
  • Programs as instruments that can change themselves
  • Code should be seen AND heard
  • Not about tools but about thoughts

Algorithms are Thoughts

 

Chainsaws are Tools

 

(Thats why algorithms are sometimes harder to notice than chainsaws)

Famous Livecoders

Alexandra Cárdenas

Colombia

Alex McLean 

Sheffield

Shelly Knotts

Birmingham

Dan Hett

Manchester

TIDAL

TIDAL

Domain specific language for exploring pattern in live coding performances

patterning inputs

MIDI

OSC

DIRT SAMPLER

Language Overview

d1 $ sound "can"

plays the 1st sound in the folder

~/dirt/samples/can

plays a can sound forever.

"can" is a folder of samples.

d1 $ sound "can:1"
flick sid can metal future gabba sn mouth co gretsch mt arp h cp cr newnotes bass crow hc tabla bass0 hh bass1 bass2 oc bass3 ho odx diphone2 house off ht tink perc bd industrial pluck trump printshort jazz voodoo birds3 procshort blip drum jvbass psr wobble drumtraks koy rave bottle kurt latibro rm sax lighter lt arpy feel less stab ul
d1 $ silence

Stops whatever is playing on d1

silence plz 🌝

hush

Stops everything

d1 $ sound "can:1" |+| vowel "a"

FX

Apply effects to your sound with |+|. 

vowel is a vowel-like formant filter

 

"a e i o u"

FX

d1 $ sound "can:1" |+| speed "2"

Speed changes sample playback speed, which in turn changes pitch. Faster:

d1 $ sound "can:1" |+| speed "0.5"

or slower:

d1 $ sound "can:1" |+| speed "-1"

or backwards!

FX

d1 $ sound "can:1" 
  |+| speed "2" 
  |+| vowel "a"
  |+| resonance "0.5"
  |+| cutoff "0.25"

Apply several effects at the same time: 

d1 $ sound "bd*16" |+| pan sine1

Continuous Patterns

you can apply sinewaves to effects!

sine1 goes from 0 to 1 and back again.

there's also tri1, saw1 and square1

 

if you remove the zero then they go from -1 to 1

# a kick and a snare
d1 $ sound "bd sn" 

# kick clap
d1 $ sound "bd ~ bd cp"

Sequences

Play a few samples like this:

Sequences

A sequence always takes the same amount of time:

# this long aphex-tween like sequence
d1 $ sound "bd bd hh hh bd bd hh*4 hh bd bd hh"


# it's just as long as this one
d1 $ sound "hh hh"
"blue orange green"

Sequences

easier to think about them visually:

"blue yellow orange green"
d1 $ sound "drum drum:1 ~"


# 7-step pattern!
d1 $ sound "drum ~ can ~ ~ cp ~"

Resting

Use a ~ to insert a rest/pause:

d1 $ sound "bd [hh hh hh] bd cp"

Subdividing Sequences

use [ ] to take one step and subdivide it:

"blue green [yellow purple black] orange"

visually:

Sequences

Two events broken down:

"[blue green] [yellow purple black]"
d1 $ sound "drum drum [can [can:4 can:6 can:3] can:5] drum"

Sequences

INCEPTION!

Visually:

"orange purple [red [green brown] yellow] pink"
d1 $ sound "drum [can cp, can bd can:5]"

Layering Sequences

Use a comma to layer inside [ ]

"[orange purple, red green pink]"

Visually:

d1 $ sound "{can can:2, can bd can:5}"

Layering Sequences

curly braces align sounds and roll over patterns:

"[orange purple, red green pink]"

Visually:

Layering (cont)

If we use the density function, we can double speed to see the effect:

density 3 $ "{orange purple, red green pink}
# this
d1 $ sound "bd [hh hh hh]"

# is the same as
d1 $ sound "bd hh*3"

Sequencing tricks

use * to repeat a sample several times:

Saves time when performing live!

d1 $ sound "bd can*32 bd gabba*4"
# kick, clap every 2
d1 $ sound "bd cp/2"

Sequencing tricks

Slow down with /

# kick, clap maybe?
d1 $ sound "bd cp?"

Drop randomly with ?

d1 $ sound "can(5,8)"

Bjorklund's algorithm

use parenthesis to distribute the first number of sounds equally across the second number of steps:

d1 $ sound "bd"

Functions

d1: function that sends a pattern to Dirt

d1 $ sound "bd sn"

d1 (sound "bd sn")

the dollar takes everything on the right

and gives it to the left

d1 $ stack [
    sound "bd ~ bd ~",
    sound "hh ch hh cp",
    sound "casio casio:1 casio:2*2"
]

Layering Patterns 

Use stack to layer patterns

similar to [ ] but as a function.

you can have different effects on each "layer"

d1 $ cat [
    sound "bd ~ bd ~",
    sound "hh ch hh cp",
    sound "casio casio:1 casio:2*2"
]

Joining Patterns

Use cat to join patterns one after the other

they will all play in one cycle. use slowcat to maintain the speed of playback.

d1 $ slow 2 $ sound "bd ~ sn bd ~ [~ bd]/2 [sn [~ bd]/2] ~"

Slow down / Speed up

Use slow to play n times slower:

And density to play n times faster!

d1 $ density 2 $ sound "bd ~ sn bd ~ [~ bd]/2 [sn [~ bd]/2] ~"
density 0.5 = slow 2
slow 0.5 = density 2
d1 $ rev $ sound "bd ~ sn bd ~ [~ bd]/2 [sn [~ bd]/2] ~"

Reverse

Use rev to reverse a sequence

d1 $ chop 16 $ sound "bd ~ sn bd ~ [~ bd]/2 [sn [~ bd]/2] ~"

Chop function

chop each sample into a given number of bits

d1 $ rev $ chop 16 
    $ sound "bd ~ sn bd ~ [~ bd]/2 [sn [~ bd]/2] ~"

crazy if combined with rev!

Meta-functions

functions that take other functions as an input.

Meta-functions

# reverse the sequence every second time
d1 $ every 2 rev $ sound "bd can sn can:4"

# play twice as fast every fourth time
d1 $ every 4 (density 2) $ sound "bd can sn can:4"

every: Do X every Y times

Meta-functions

d1 $ jux rev $ sound "bd sn*2 can [~ arpy]"

jux: apply function on one speaker

but not the other!

d1 $ jux (density 1.25) $ sound "arpy:2 arpy:4 arpy:1 [~ arpy]"

play 25% faster on one speaker:

Weave

d1 $ weave 16 (pan sine1)
  [ sound "bd sn", 
    sound "arpy ~ arpy:3", 
    sound "can ~ ~ can:4"
  ]

Weave takes different synth parameters and overlays them, offset against each other, on top of a base pattern. 

Rotation

d1 $ 0.25 ~> sound "arpy arpy:1 arpy:2 arpy:3"

~> and <~ "rotate" the pattern by a given amount. 

d1 $ 0.25 ~> sound "arpy arpy:1 arpy:2 arpy:3"

shift pattern forward in time 1/4 of a cycle 

shift pattern back in time 1/4 of a cycle 

Compound rotation

d1 $ iter 4 $ sound "arpy:1 arpy:2 arpy:3 arpy:4"

iter shifts a pattern to the left by 1/n steps every cycle

density 4 $ iter 4 $ "blue green purple orange"

visually:

Scaling number patterns

d1 $ jux (iter 4) $ sound "arpy arpy:2*2"
  |+| speed (slow 4 $ scale 1 1.5 sine1)

change the range of a pattern like sine1

d1 $ sound "blade"
  |+| cut "1" -- cut long samples
  |+| resonance (slow 32 $ scale 0.01 0.71 sine1)
  |+| cutoff (slow 64 $ scale 0.01 0.5 sine1)

useful to cap resonance/cutoff:

Running Samples

d1 $ sound (samples "arpy*4" (run 4))

choose with patterns you want

That's all!

@radiodario

Made with Slides.com