Skip to content

Instantly share code, notes, and snippets.

@nattog
nattog / drummer.lua
Last active May 4, 2022 16:22
Drummer :: sequencer for Monome Crow + Druid
-- drummer
-- 4 track pattern sequencer
-- pattern notation looks like this 'x---x---x---x---'
-- update sequence track with set(track, pattern)
--
-- queue a new sequence
-- progress(seq table, period - by default 16)
--
-- control transport
-- start() stop() reset()
-- discipline + punish
--
-- four outputs (subjects) process input 1 through randomized transfer functions (disciplines)
-- a trigger in input 2 selects a subject based on a fifth, secret discipline,
-- and punishes it, altering its transfer function
function rand10vpp()
return math.random() * 10 - 5
end
@matiaspl
matiaspl / mpv_vectorscope_waveform.md
Last active November 5, 2023 21:22
mpv based vectorscope, waveform monitor and EBU-R128 audio meter

mpv --hwdec="no" --lavfi-complex="[aid1]asplit=3[sv][eb][av];[sv]showvolume=b=4:w=720:h=68[sv-v];[eb]ebur128=video=1:size=720x540:meter=18[eb-v][ao];[av]avectorscope=s=720x540:zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7[av-v];[sv-v][eb-v][av-v]vstack=3[1c];[vid1]split=4[v][wf][wfc][vs];[wf]waveform=m=1:d=0:r=0:c=7[wf-vus];[wf-vus][v]scale2ref=iw:1220-ih[wf-va][sig];[wf-va]setsar=1[wf-v];[wfc]waveform=m=0:d=0:r=0:c=7,scale=610x610,setsar=1[wfc-v];[vs]vectorscope=m=color3:g=color,scale=610x610,setsar=1[vs-v];[sig][wf-v]vstack[2c];[wfc-v][vs-v]vstack[3c];[1c][2c][3c]hstack=3,scale=1280:-1[vo]" rtmp://server/app/key

float bend;
float pitch_value;
float divider = 38;
int vcaPin = 10;
int current;
void setup() {
usbMIDI.setHandleNoteOff(OnNoteOff);
usbMIDI.setHandleNoteOn(OnNoteOn);
usbMIDI.setHandleVelocityChange(OnVelocityChange);
@VitoVan
VitoVan / cl-autogui.lisp
Last active May 21, 2021 11:30
GUI automation in Common Lisp. Used to programmatically control the mouse & keyboard and take screenshot etc. (X11 only)
(ql:quickload '(clx zpng))
(defpackage #:cl-autogui
(:use #:common-lisp #:xlib)
(:export #:x-position
#:x-size
#:x-position
#:x-move
#:x-mouse-down
#:x-mouse-up
@igorgue
igorgue / grandpa_script.rb
Last active October 3, 2019 14:05
This script formats audio files to the Bastl Instrument's GrandPA's format, to use just install ffmpeg (brew install ffmpeg), copy it to a directory with files that end in ('.mp3', '.wav', '.aiff', '.ogg') and run it. It overwrites everything too so be careful (try first, it works for me).
#!/usr/bin/env ruby
# What's this?
# ============
#
# A script that converts all kinds of files to the file format Bastl Instruments GrandPA requires.
#
# Install
# =======
#
@chomy
chomy / bcm2835.lisp
Created December 17, 2014 10:49
Common Lisp package for GPIO control of Raspberry Pi
(defpackage :BCM2835
(:use :FFI)
(:export :init
:close
:gpio-fsel
:gpio-write
:gpio-lev
:gpio-set
:gpio-clr
:delay
@shortsightedsid
shortsightedsid / cl-udpip.lisp
Created October 27, 2014 22:01
Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
; Short guide to UDP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand.
; After working on a short example on TCP, I found the
; need for a UDP tutorial. So, here goes.
; As usual, we will use quicklisp to load usocket.
@shortsightedsid
shortsightedsid / cl-tcpip.lisp
Last active January 15, 2024 02:36
Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
; Short guide to TCP/IP Client/Server programming in Common Lisp using usockets
;
; The main reason for this guide is because there are very few examples that
; explain how to get started with socket programming with Common Lisp that I
; could understand. After spending a day trying, I finally came up with a small
; bit of code that makes it easy to understand the basics. I've written this
; primarily for myself, but should help others get started as well.
; As usual, we will use quicklisp to load usocket.
@fredRos
fredRos / steps.md
Last active March 9, 2023 14:22
Setup emacs with github markdown and pandoc offline rendering

Based on this blog.

This guide shows you how to setup emacs to render a README.md very similarly to how github will do it; except it also works offline. There are no dependencies that can't be easily installed via the package manager on ubuntu.

  1. Install emacs24, the markdown mode, and pandoc. You may need the packages emacs, emacs-goodies-el, and pandoc.
  2. Get a style sheet that resembles the github style from this gist and store it. I put it in ~/emacs.d/github-pandoc.css.