Skip to content

Instantly share code, notes, and snippets.

@kindohm
kindohm / _readme.md
Last active August 30, 2017 20:16
d-code info

d-code info

https://soundcloud.com/kindohm/d-code

This is a de-construction of the above linked track and how it was composed and built with TidalCycles.

sample composition strategy

The real crux of this track and how it is composed in code depends on kick/snare pairs, located in the name sample folder. This is really the important part. You have to know how that folder is structured before digging into the code:

do
let iters = 400
sample = "rain1z"
d1 $ (now) ~> do {
x <- slow (iters) $ run iters;
jux (((x/iters) ~>) . (# speed "1.005")) $ sound sample}
@kindohm
kindohm / banks.hs
Last active September 15, 2017 13:21
Tidal Sample Bank Approach
let sprefix p = with s_p (liftA2 (++) (p::Pattern String))
d1 $ sprefix "track1 track2" $ s "bd sn*2"
d1 $ s (fmap ("track1"++) "bd sn" )
d1 $ s (flip (++) <$> "bd sn*2" <*> "track1 track2")
@kindohm
kindohm / readme.md
Last active September 27, 2017 02:11
new tidal install instructions draft

You can install TidalCycles on MacOS, Windows, and Linux. Locate the instructions below for your specific operating system.

Mac OS

1. Prerequisites

import Sound.Tidal.Utils
let fillIn p' p = struct (splitQueries $ Pattern (f p)) p'
f p (s,e) = removeTolerance (s,e) $ invert (s-tolerance, e+tolerance) $ arc p (s-tolerance, e+tolerance)
invert (s,e) es = map arcToEvent $ foldr remove [(s,e)] (map snd' es)
remove (s,e) xs = concatMap (remove' (s, e)) xs
remove' (s,e) (s',e') | s > s' && e < e' = [(s',s),(e,e')] -- inside
| s > s' && s < e' = [(s',s)] -- cut off right
| e > s' && e < e' = [(e,e')] -- cut off left
| s <= s' && e >= e' = [] -- swallow
@kindohm
kindohm / lsys.hs
Created October 30, 2017 17:50
tidal l-systems
-- calum's code
let lsys n r s = p ("{" ++ lindenmayer n r s ++ "}%8")
let inverse 0 = 1
let inverse 1 = 0
let pat = lsys 2 "1:1 1 ~,0:0,~:~ ~ 1 0 ~" "1 1 1 0 ~"
d1 $ gain pat $ s "bd"
@kindohm
kindohm / processing-stuff.pde
Created January 11, 2018 16:27
tidal-processing
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myRemoteLocation;
float x;
float y;
float z;
float opacity;
@kindohm
kindohm / TidalProc.hs
Created February 6, 2018 22:44
TidalProc.hs
module TidalProc where
import Sound.Tidal.Stream
import Sound.Tidal.Pattern
import Sound.Tidal.Parse
import Sound.Tidal.OscStream
port = 5000
procShape = Shape {
@kindohm
kindohm / hi.tidal
Last active May 10, 2018 17:50
slice.tidal
d1 $ whenmod 10 8 (|*| speed (scale 1 1.25 $ slow 2 saw)) $
every 4 (# pan (scale 0 1 $ slow 3 rand)) $
sometimesBy 0.15 (|+| n "2") $ shift $
slice ("{0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15}%16" + "<0 0 2 0 1>") 16 $
sound "1bar"
# n "<0 0 0 2 0 3>"
# unit "c" # speed 1 # shape 0.9 # orbit 0 # delay 0 # delayfb 0