Skip to content

Instantly share code, notes, and snippets.

SinOsc s => dac;
3::second => now;
adc => dac;
3::second => now;
@premek
premek / g.ck
Created December 28, 2016 21:26
ChucK reverb guitar effect
adc => NRev r => Gain AM => SinOsc od => dac;
3 => AM.op;
1 => od.sync;
day => now;
language: bash
sudo: false
install: true
addons:
apt:
packages:
- lua5.1
- python2.7
- luarocks
before_install:
@premek
premek / guitar.sh
Created January 21, 2017 13:24
guitar start/restart/record scripts
if test "$1" = "record"; then
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck /home/pi/chuck/rec.ck:/home/pi/rec.wav &
exit
fi
if test "$1" = "play"; then
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck &
exit
fi
@premek
premek / build.sh
Last active January 21, 2017 17:36
#!/usr/bin/env bash
set -x
P="enjoy"
LV="0.10.1" # love version
LZ="https://bitbucket.org/rude/love/downloads/love-${LV}-win32.zip"
### clean
if [ "$1" == "clean" ]; then
rm -rf "target"
@premek
premek / AT
Created April 18, 2017 21:27
ESP8266 AT
AT+CWMODE=1
AT+CWJAP="SSID","secret"
AT+CIPSTART=1,"TCP","google.com",80
1,CONNECT
OK
AT+CIPSEND=1,9 (GET /)
OK
>
Recv 9 bytes
SEND OK
local lpeg = require "lpeg"
lpeg.locale(lpeg)
local S,C,Ct,Cc,Cg,Cb,Cf,Cmt,P,V =
lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.Cg, lpeg.Cb, lpeg.Cf, lpeg.Cmt,
lpeg.P, lpeg.V
local eof = -1
local sp = S" \t" ^0 + eof
local wh = S" \t\r\n" ^0 + eof
mpv https://www.youtube.com/watch?v=pF-3S-HTJSg -ao none -fullscreen -loop 0
Outer window is 0x2800001, inner window is 0x2800002
ButtonPress event, serial 25, synthetic NO, window 0x2800001,
root 0xdf, subw 0x0, time 1502519276, (82,51), root:(884,310),
state 0x0, button 8, same_screen YES
ButtonRelease event, serial 25, synthetic NO, window 0x2800001,
root 0xdf, subw 0x0, time 1502519424, (82,51), root:(884,310),
state 0x0, button 8, same_screen YES