Skip to content

Instantly share code, notes, and snippets.

$argon2id$v=19$m=64,t=512,p=2$mpknJXWwj9fK1OT3EjofrA$69JwYQ1IKC8Jp/kIaNfh8w

@pfig
pfig / morphagene_ableton.py
Created March 6, 2021 19:54 — forked from knandersen/morphagene_ableton.py
Allows you to use Ableton projects and exports as reels for the Make Noise Morphagene eurorack module.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
USAGE:
morphagene_ableton.py -w <inputwavfile> -l <inputlabels> -o <outputfile>'
Instructions in Ableton:
Insert locators as splice markers in your project (Create > Add Locator)
Export Audio/Video with
Sample Rate: 48000 Hz
@pfig
pfig / monoise.py
Last active December 14, 2020 16:22
Convert samples to mono
#!/usr/bin/env python
"""
mo' noise
monome + noise
mono-ise
"""
#
# You will need sox and pysox
# https://github.com/rabitt/pysox#install
#
@pfig
pfig / BootTidal.hs
Last active September 4, 2019 11:09
Tidal startup errors in emacs
-- $ ghc-pkg describe $(ghc-pkg latest tidal) | grep data-dir | cut -f2 -d ' '
-- /Users/pfig/.cabal/share/x86_64-osx-ghc-8.6.5/tidal-1.4.3
-- $ cat /Users/pfig/.cabal/share/x86_64-osx-ghc-8.6.5/tidal-1.4.3/BootTidal.hs
:set -XOverloadedStrings
:set prompt ""
:set prompt-cont ""
import Sound.Tidal.Context
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Prelude>
<interactive>:3:18: error:
Variable not in scope: bpsUtils :: IO (a0, b0)
<interactive>:4:12: error:
Variable not in scope: superDirtSetters :: t0 -> IO (a0, b0)
<interactive>:4:29: error: Variable not in scope: getNow
@pfig
pfig / server.py
Last active April 19, 2017 17:09
HTTP server producing a stream of RecordIO data
#
# Run with gunicorn -k eventlet server:app
#
# Dependencies:
# eventlet==0.21.0
# Flask==0.12.1
# gunicorn==19.7.1
#
import time
import random
@pfig
pfig / compose.py
Created December 20, 2016 22:26 — forked from TomWhitwell/compose.py
Python script to generate random scores for modular synth
import random
import string
# -*- coding: utf-8 -*-
def randomname(length = 6):
vowels = ['a','e','i','o','u','']
consonants = ['b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z']
a = random.sample(consonants,length/2)
x = 1
@pfig
pfig / rain.scd
Created October 10, 2016 22:00
A crude driver for my attempts at phase music
s.quit;
s.boot;
(
b = Buffer.read(s, thisProcess.nowExecutingPath.dirname +/+ "press_the_red_again.wav");
k = Buffer.read(s, thisProcess.nowExecutingPath.dirname +/+ "kissy_face.wav");
m = Buffer.read(s, thisProcess.nowExecutingPath.dirname +/+ "notice_me_senpai_short.aiff");
// Create a Synth capable of all the transforms we want
SynthDef(\reich, {
@pfig
pfig / pep-20.md
Last active April 27, 2016 09:10
PEP-20

From Tim Peters's Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.

Special cases aren't special enough to break the rules.

@pfig
pfig / be.pfig.notebooks.plist
Created September 17, 2015 21:03
iPython notebooks managed by launchctl
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>be.pfig.notebooks</string>
<key>ProgramArguments</key>
<array>
<string>ipython</string>
<string>notebook</string>