Skip to content

Instantly share code, notes, and snippets.

@salkin-mada
salkin-mada / skimcode.sh
Last active November 21, 2020 13:41
skim file content and edit with nvim
function skimcode() {
local cmd='rg -S -n --color=always "{}"'
local pcmd='export LINE_NR=$(echo {} | awk -F: '"'"'{print $2}'"'"') && echo {} | sed "s/:.*//" | xargs -d "\n" bat -f -H $LINE_NR'
sk --ansi -i -c $cmd --preview $pcmd \
--bind 'ctrl-e:execute[export LINE_NR=$(echo {} | awk -F: '"'"'{print $2}'"'"') && nvim +$LINE_NR $(echo {} | sed "s/:.*//")]' \
--bind 'enter:execute(echo {} | sed "s/:.*//")+abort'
}
alias skc='skimcode'
@madskjeldgaard
madskjeldgaard / PKGBUILD
Last active October 27, 2020 21:26
Arch linux package for installing the mi-UGens mutable instruments ugens for SuperCollider
# Maintainer: Mads Kjeldgaard <mail@madskjeldgaard.dk>
pkgname=mi-ugens-git
pkgver=r27.d9ff7f7
pkgrel=1
pkgdesc="SuperCollider UGen versions of Mutable Instruments synthesizer modules"
arch=('x86_64')
url="https://github.com/v7b1/mi-UGens"
license=('GPL')
groups=('pro-audio')
depends=()
@madskjeldgaard
madskjeldgaard / PKGBUILD
Last active October 23, 2020 22:17
emissioncontrol2-git pkgbuild
# Maintainer: Mads Kjeldgaard <mail@madskjeldgaard.dk>
pkgname=emissioncontrol2-git
pkgver=r647.fca70f5
pkgrel=1
pkgdesc="EmissionControl2 (EC2) is a standalone interactive real-time application for granular synthesis and sound file granulation"
arch=('x86_64')
url="https://github.com/EmissionControl2/EmissionControl2"
license=('GPL')
groups=('pro-audio')
depends=()
@madskjeldgaard
madskjeldgaard / cpp.snippets
Last active April 18, 2020 00:07
Simple and sensible snippet for openframeworks classes in Vim/Ultisnips
snippet ofclass "Class for open frameworks"
#include "${1:`!p snip.rv = snip.basename`}.h"
$1::$1(){}
void $1::setup(){${2:}}
void $1::update(){${3:}}
void $1::draw(){${4:}}
@madskjeldgaard
madskjeldgaard / safe-benjolin.scd
Last active July 1, 2024 11:38
A safer version of Alejandro Olartes benjolin

/* Instrument inspired from Rob Hordijk's Benjolin, it requires sc3-plugins (PulseDPW, SVF and DFM1)

outSignal: 1-triangle osc1, 2-square osc1, 3-triangle osc2, 4-pulse osc2, 5-XOR output, 6-Filter output

#!/bin/bash
set -e
if [ $(id -u) -eq 0 ]; then
echo 'Please execute this script as a regular user.'
exit 1
fi
which sudo >/dev/null
if [ $? -ne 0 ]; then
@carltesta
carltesta / FourteenBitCC.sc
Last active January 23, 2023 17:15
14-bit MIDI Handler for SuperCollider
FourteenBitCC {
/*
//Use Case:
MIDIIn.connectAll;
~x = FourteenBitCC.new("x", 72, 104);
~x.func = {|val| ("x: "++val).postln};
//MPE Example with Sensel Morph
MIDIIn.connectAll