Skip to content

Instantly share code, notes, and snippets.

@lennart
lennart / gist:1717337
Created February 1, 2012 14:35 — forked from anonymous/gist:1717331
A Gentoo startup script for the newrelic server monitor daemon
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net
}
start() {
@lennart
lennart / gist:3787187
Created September 26, 2012 10:16
Web Config for Symfony 2 in WebMatrix 2
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="TempRewriteToWeb" stopProcessing="false">
<match url="^(web/)?(.*)$" />
<action type="Rewrite" url="web/{R:2}" logRewrittenUrl="true" />
</rule>
@lennart
lennart / .gitignore
Last active June 15, 2016 09:42
Simple Testing for Tidal MIDI
.cabal-sandbox
dist
test
*~
@lennart
lennart / k81x_conf.c
Created May 29, 2016 16:30 — forked from anonymous/k81x_conf.c
Invert fn keys for Logitech K81x series (Linux)
/*
* Copyright 2012 Mario Scholz <mario@expires-2013.mail.trial-n-error.net>
*
* based on pairing_tool.c from Benjamin Tissoires <benjamin.tissoires@gmail.com>
* see also https://lkml.org/lkml/2011/9/22/367
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@lennart
lennart / SyncSC.hs
Last active May 29, 2016 09:32
Record Tidal patterns from SuperCollider (HW output or SuperDirt outBus)
module Recorder where
import Sound.Tidal.Tempo (Tempo(..), clocked)
import Sound.Tidal.Stream (logicalOnset')
import Sound.OSC.FD
import Sound.OSC.Datum
import Control.Concurrent
import Control.Concurrent.MVar
init :: IO ((IO (), IO ()))
init = do s <- openUDP "127.0.0.1" 57130
@lennart
lennart / documented.sh
Last active May 25, 2016 17:35
Finding undocumented things in Tidal
# within the tidalcycles.github.io repo do
find _functions/ -type f -iname "*.md" -print0 | xargs -0 -n1 basename | cut -d. -f1 | sort | grep -v index > documented.txt
@lennart
lennart / midi-pattern-test.tidal
Last active May 17, 2016 09:14
midi pattern test for tidal 0.6 / 0.7
let simple = "SimpleSynth virtual input"
-- 0.6 style setup
import Sound.Tidal.MIDI.Output
import Sound.Tidal.SimpleSynth
keyStreams <- midiproxy 1 simple [(keys, 1), (keys, 2), (keys, 3), (keys, 4)]
[m1,m2,m3,m4] <- sequence keyStreams
-- > 0.7 init
d1 $ slow 2 $ stack [
slow 2 $ slowspread (chop) [128, 64, 32] $ jux (iter 10) $ (preplace (1,1) ("[x x ~ x x ~ ~ x x ~]?" :: Pattern String) $
grp [n_p, dur_p] ( "67:1 68:6 78:1 77:2")) # s "tri" |-| n "36" # vowel "[a, i] u"
# velocity "0.4",
slow 0.5 $ sometimes (palindrome) $ (preplace (1,1) ("x x? ~ ~ ~ ~ ~ x x ~" :: Pattern String) $
grp [n_p, dur_p] "67:1 68:6 78:1 77:2") # s "kalimba"
# velocity "0.4",
sound "kick?" # gain "0.6"
] |/| dur "2.5" # gain "0.8"
@lennart
lennart / .emacs
Last active February 21, 2016 10:22
;; Package Repository Requirements
(when (> emacs-major-version 23)
(require 'package)
(package-initialize)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/")
@lennart
lennart / blinken.ino
Last active January 4, 2016 11:37
Lo-Fi Arduino Tidal binding, makes lights go on by color name.
/*
Tidal <-> Arduino
send rhythmic patterns to custom hardware
assumes three leds connected to Arduino on Digital Pins:
13 red
12 yellow
11 green