Skip to content

Instantly share code, notes, and snippets.

@kindohm
kindohm / tidal.emacs
Created March 6, 2014 12:55
tidal.emacs
(add-to-list 'load-path "~/code/Tidal")
(require 'tidal)
;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>]))
(set-frame-parameter (selected-frame) 'alpha '(65 40))
(add-to-list 'default-frame-alist '(alpha 65 40))
(eval-when-compile (require 'cl))
(defun toggle-transparency ()
(interactive)
@kindohm
kindohm / tccc16-live-coding-demo.tidal
Created April 7, 2014 18:44
tccc16-live-coding-demo.tidal
# hi.
d1 $ slowspread ($) [density 2, striate 3, slow 1, (|+| pan "[0 1 0 1 0 1]*2]")] $ every 3 (0.25 <~) $ jux (iter 8) $ sound "bd*4 [cp hh*2] [rm sn] [sn*4 bd*2]" |+| speed "[1 2 3 4]/4"
d2 $ jux (iter 8) $ striate' 128 (1/100) (sound "alone:7")
|+| speed "[1 0.8]/2"
d3 $ sound (samples "jvbass*4 ~ jvbass*4 jvbass*4" (slow 0.8 $ run 19))
|+| speed "[1 0.8 1.25]/4"
@kindohm
kindohm / play.hs
Created April 23, 2014 13:37
Python and Haskell code for recording a 1-min Tidal loop
{-# LANGUAGE OverloadedStrings #-}
module Play where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Data.List
import Data.Ratio
import Sound.Tidal.Dirt
d1 $ sound "mouth*4"
d1 $ every 3 rev $ every 4 (0.25 <~) $ slow 4 $ striate' 64 (1/40) ( sound "ulmel:1")
|+| speed "[1 1.5 1.25, 0.5]"
d2 $ every 3 (density 2) $ every 2 (density 2) $ sound "mouth*8"
|+| gain "0.6"
d3 $ jux (iter 8) $ sound "bd*2 ~ cp future future*2 ~ bd*4 sn*2"
|+| gain "0.7"
@kindohm
kindohm / TidalCustom.hs
Created January 29, 2015 16:04
mike-tidal-custom
{-# OPTIONS_GHC -XNoMonomorphismRestriction #-}
### put this in your home directory
module TidalCustom where
import Data.Ratio
import Control.Applicative
import qualified Data.Map as Map
@kindohm
kindohm / ring-surfing.tidal
Last active August 29, 2015 14:19
Ring Surfing (live-coded mix)
{-|
Static example code of a live-coded performance of Ring Surfing
for ODD7 live-coding compilation release (summer 2015).
Performance video: https://youtu.be/4KZn0YBpx9o
Performed on 2015-04-21 by Kindohm (a.k.a. Mike Hodnick)
-}
bps (200/120)
let rip a b p = within (0.25, 0.75) (slow 2 . rev . stut 8 a b) p
@kindohm
kindohm / warm-waves.tidal
Created April 24, 2015 14:06
Warm Waves (live-coded mix)
{-|
Static example code of a live-coded performance of Warm Waves
for ODD7 live-coding compilation release (summer 2015).
Performed on 2015-04-24 by Kindohm (a.k.a. Mike Hodnick)
-}
-- midi setup
import Sound.Tidal.MIDI.Output
import Sound.Tidal.VolcaKeys
keyStreams <- keyproxy 1 4 keys [1]
import Sound.Tidal.MIDI.Output
import Sound.Tidal.VolcaKeys
import Sound.Tidal.SimpleSynth
import Sound.Tidal.Rytm
keyStreams <- keyproxy 1 "Scarlett 18i8 USB" keys [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
[bd,sd,rs,cp,bt,lt,mt,ht,ch,oh,cy,cb,k13,k14,k15,k16] <- sequence keyStreams
@kindohm
kindohm / snippets.cson
Last active August 29, 2015 14:24
atom-tidal snippets
# atom-tidal snippets
#
# These are atom editor snippets that automate some of my common tasks
# while live coding music with Tidal. They only work with .tidal files.
#
# To use, in Atom go to File -> Open Your Snippets, then paste in this code.
#
# I created these snippets because I often find myself typing the same Tidal code
# over and over again. Your mileage may vary; maybe these don't suit your needs,
# but you can also use them as a reference for your own Tidal snippets.
@kindohm
kindohm / index.js
Created July 6, 2015 00:41
photo rename
var path = 'C:\\Users\\Mike\\code\\rename\\*.jpg';
var glob = require("glob")
var fs = require('fs');
var exif = require('exif');
var _ = require('lodash');
var Promise = require('bluebird');
var pathModule = require('path');
var pad = require("node-string-pad");