Skip to content

Instantly share code, notes, and snippets.

midimap v1
forward-unmatched
# Dyn, expr, Vibrato, Reverb
CC 73 ANY | CHN0 1 SAME
CC 75 ANY | CHN0 11 SAME
CC 72 ANY | CHN0 21 SAME
CC 91 ANY | CHN0 66 SAME
# Mics
<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="Nektar Impact LX - Enhanced2">
<DeviceInfo bank-size="8"/>
<!-- Transport controls -->
<Binding channel="16" ctl="102" function="loop-toggle"/>
<Binding channel="16" ctl="103" action="Transport/Rewind"/>
<Binding channel="16" ctl="104" action="Transport/Forward"/>
<Binding channel="16" ctl="105" function="transport-stop"/>
<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="Nektar Impact LX">
<DeviceInfo bank-size="8"/>
<!-- Buttons labelled 'track-' and 'track+' mapped to switch banks -->
<Binding channel="16" ctl="109" function="prev-bank"/>
<Binding channel="16" ctl="110" function="next-bank"/>
<!-- MixerMode -->
@kbhaines
kbhaines / cdrecord.sh
Created September 15, 2019 09:07
Simple CD recording script, also converting wav to 44.1KHz
#!/bin/sh
set -e
echo "Recording CD for the following tracks:"
tracks=`ls *wav`
echo $tracks
echo "Press ENTER"
on init
declare $portamentoTime := 60000
declare $pitchChange
declare const $Off := 0
declare const $Arm := 1
declare const $Aon := 2
declare const $ABon := 3
declare const $evtCCOff := 0
#!/bin/sh
if [ $# -ne 3 ];then
echo "Usage: $0 <mount|unmount> <crypt-volume> <target-name>"
exit 0
fi
ACTION=$1
SRC=$2
TARGET=$3
@kbhaines
kbhaines / main.go
Last active October 4, 2017 08:55
GoLang Oauth2 using Google Application Default Credentials
package main
import (
"context"
"fmt"
"log"
"net/http"
"golang.org/x/oauth2/google"
"google.golang.org/api/oauth2/v2"
@kbhaines
kbhaines / openvpn.sh
Last active March 4, 2017 11:58
OpenVPN config to randomise vpn connections
# Put this at the end of /etc/default/openvpn
AUTOSTART="nordvpn"
prefix=uk[0-9][0-9]
VPN_HOME=/etc/openvpn
target=`ls $VPN_HOME/${prefix}.nordvpn*udp*|shuf -n 1`
VPN_CONF=$VPN_HOME/nordvpn.conf
cp $target $VPN_CONF
sed -i "s/auth-user-pass.*/auth-user-pass \/etc\/openvpn\/nordvpn-auth/" $VPN_CONF
echo "up $VPN_HOME/update-resolv-conf" >> $VPN_CONF
@kbhaines
kbhaines / nord.sh
Created February 11, 2017 15:30
NordVpn connection starter
# Assumes you've installed the nordvpn zip file into /etc/openvpn
#
# To use:
# 1) create a file /etc/openvpn/nordvpn with username on line 1, password on line 2
# 2) source this into your shell
# 3) Run:
# vpn # defaults to a random VPN in the UK
# vpn nl # connects to random VPN in Netherlands
# vpn uk1 # connects to random VPN starting with 'uk1'
@kbhaines
kbhaines / backup.sh
Last active September 24, 2016 11:11
Simple backup script, using hard-links and rsync to efficiently backup entire directories
#!/bin/sh
set -e
usage() {
echo "$0 <backup-media> <source-dir> [<source-dir>...]"
echo "where backup-media = directory to backup to"
echo "and source-dir = one or more directories to backup"
}
get_last_id() {