Skip to content

Instantly share code, notes, and snippets.

@kindohm
kindohm / ghost.hs
Created November 11, 2015 05:09
ghost notes in Tidal
let ghost'' a f p = superimpose (((a/2 + a*2) ~>) . f) $ superimpose (((a + a/2) ~>) . f) $ p
ghost' a p = ghost'' a ((|*| gain "0.7") . (|=| end "0.2") . (|*| speed "1.25")) p
ghost p = ghost' 0.125 p
cps 0.5
d1 $ ghost $ sound "sd(3,8)"
d1 $ ghost' (-0.375) $ sound "sd(3,8)"
d1 $ ghost'' (0.125) ((|*| gain "0.7") . (|+| accelerate "-2")) $ sound "bass2(3,8)"
@kindohm
kindohm / System-1M-glitch.hs
Last active December 11, 2015 15:06
Source code for extreme glitching on the Roland System 1-M
m $ slow 2 $ (|+| note "[45 33 57]*4") $ note "0*16?"
|+| dur (scale 0.05 0.2 $ slow 1.9666 sine1)
|+| rlpcutoff (scale 0 1 $ density 1.01 sine1)
|+| rhpcutoff (scale 0 1 $ density 1.132 sine1)
|+| rfilteratk (scale 0 0.5 $ slow 1.2 sine1)
|+| rfilterdecay (scale 0.05 0.5 $ density 1.5181 sine1)
|+| rfiltersustain (scale 0.1 1 $ density 1.277777 sine1)
|+| rfilterrelease (scale 0.05 0.5 $ slow 1.523 sine1)
|+| rres (scale 0 0.7 $ density 1.313 sine1)
|+| rfilterenv (scale 0.1 0.9 $ density 1.111 sine1)
-- eval the functions below first, then you can do this:
midiInstrument $ (|+| note "45") $ mel m9 5 "0*8"
-- above, plays the first 5 notes of a m9 arpeggio, over a pattern of eighth notes,
-- starting at MIDI note #45
-- the "mel" function below relies on a "scramble" function which I don't
-- really like. I'm not good enough at haskell to know to how pick
-- random values out of the scale/arpeggio.
@kindohm
kindohm / tidal-params.md
Last active February 15, 2016 19:03
Tidal Params

Tidal Pattern Transformers

Functions that change patterns to do wacky things.

<~ and ~> (Beat Rotation)

Description

Rotates a pattern either to the left of the right.

Paramters

{
"origin" : ["d1 $#prestack# stack #startbracket# \n #stackitems# #endbracket# "],
"prestack" : ["", " #transformblock# \n "],
"stackitems" :["#stackitem#"],
"stackitem" : ["#transformblock##sound#", "#transformblock##sound#, \n #stackitem#"],
"startbracket" : ["["],
"endbracket" : ["]"],
"sound" : ["#soundtype# |=| cut \"#cutint#\"", "#soundtype# #effects# |=| cut \"#cutint#\""],
"soundtype" : ["(sound $ samples \"#soundpatterns#\" #samplespattern#)", "(sound $ samples \"#soundpatterns#\" #samplespattern#)", "(sound $ samples \"#soundpatterns#\" #samplespattern#)", "(sound $ samples \"#breakpatterns#\" #samplespattern#) |=| unit \"c\" |=| speed \"8\""],
"soundpatterns" : ["#s#", "#s# #s#", "#s# #s# #s# #s#", "{#s# #s# #s#}%#factor2#", "{#s# #s# #s# #s# #s#}%#factor2#", "{#s# #s# #s# #s# #s# #s# #s#}%#factor2#"],
@kindohm
kindohm / MidiRack3.hs
Created June 28, 2016 02:29
custom tidal-midi module
module Sound.Tidal.MidiRack3 where
import Sound.Tidal.Params
import Sound.Tidal.MIDI.Control
rackController :: ControllerShape
rackController = ControllerShape { params = [
mCC kvoice_p 40,
mCC kdetune_p 42
],
module Sound.Tidal.MidiRack3 where
import Sound.Tidal.Params
import Sound.Tidal.MIDI.Control
(perf1, perf1_p) = pF "perf1" (Just 0.5)
(perf2, perf2_p) = pF "perf2" (Just 0.5)
(tun, tun_p) = pF "tun" (Just 0.5)
rackController :: ControllerShape
let rip a b p = within (0.25, 0.75) (slow 2 . rev . stut 8 a b) p
rip' a b c d e p = within (a, b) (slow 2 . rev . stut c d e) p
spike p = ((|+| delaytime (scale 0.001 0.3 $ slow 7.1 sine1)) . (|+| delayfeedback (scale 0.7 0.99 $ slow 6.71 sine1))) $ p
spike' p = (|+| delay "0.3") $ spike $ p
ghost'' a f p = superimpose (((a/2 + a*2) ~>) . f) $ superimpose (((a + a/2) ~>) . f) $ p
ghost' a p = ghost'' a ((|*| gain "0.7") . (|=| end "0.2") . (|*| speed "1.25")) p
ghost p = ghost' 0.125 p
jit start amount p = within (start, (start + 0.5)) (trunc (amount)) p
gtfo p = (const $ sound "~") p
shift p = (1024 <~) p
@kindohm
kindohm / cosmicsound01.txt
Last active July 20, 2016 00:08
track list from cosmic sound guest mix 2016-07-19
Time | Artist | Title
=================================================================================
00:00 | Second Woman | 100407jd7
04:06 | Two Human | Two Human
07:12 | Joanne | fa 1l
10:02 | Kindohm | 002
14:07 | Mathtrap | 25 34 38 28 36 30 44 22 40
16:39 | Bataille Solaire | Hyper Drive
20:12 | Grant Muller | Black Cat, White Pause
22:30 | Calum Gunn | Fixed
@kindohm
kindohm / 009b.hs
Created July 25, 2016 14:01
tidal-midi code for 009b
bps (150/120)
let prog = (|+| note "{0 0 0 2 2}%1")
rep' n p = stut' (n-1) (0.125/2*3) (|*| gain "1") $ p
-- Erebus, oscillators tuned to a 5th
erebus $ prog $ whenmod 32 22 (foldEvery [2,3,4] (0.25 <~)) $
(|+| note (choose [0,-12,12,24])) $ (|+| note "-7") $ note "{0 ~ ~ 0 ~ ~ 0 ~ ~ 0 ~ ~ 0 ~ ~ 0 ~ ~ ~}%16"
|=| modwheel (rand)