Skip to content

Instantly share code, notes, and snippets.

View madskjeldgaard's full-sized avatar

Mads Kjeldgaard madskjeldgaard

View GitHub Profile
@madskjeldgaard
madskjeldgaard / playbuf.scd
Last active May 16, 2023 15:47
My SuperCollider Buffer player synth

/*

This is the buffer player synth to end all buffer player synths

b = Buffer.read(s, "/Users/mads/test-sounds/Ellen-piano-001.wav")

Synth(\playbuf2, [\buffer, b, \dur, 2.5, \loop, 1, \playrate, 2, \pitchEnvAmount, 0.5, \pitchModAmount, 0.0, \modFreq, 0.1, \modEnvAmount, 0.2, \panModAmount, 1.0, \pan, 0.5, \lowPassFreq, 550, \filterModAmount, 0.9, \filterEnvAmount, 1, \filterEnvScale, 1, \lowPassRes, 0.5, \fmAmount, 0.9, \fmEnvAmount, 1])

TODO:

  • Seperate filter envelope?
@madskjeldgaard
madskjeldgaard / supercollider2live.scd
Last active January 17, 2023 10:35
SuperCollider to Ableton Live setup

/*

This small patch is an example of how to nicely send midi to Ableton Live from SuperCollider.

It includes how to set up Ableton Link (don't forget to press the "LINK" button in Live) and play a pattern using Link and midi.

It is assumed that you do this on MacOS and you have created a midi driver called "IAC Driver".

*/ (

@madskjeldgaard
madskjeldgaard / UserConfiguration.txt
Last active January 2, 2023 15:18
Setup auto mapping of the Torso Electronics T-1 in Ableton Live using UserConfiguration.txt
# ======================================================
# Config File for User-defined InstantMappings
# ======================================================
[Globals]
# The primary MIDI channel that the controller uses in
# the range of 0-15.
GlobalChannel: -1
# ======================================================
@madskjeldgaard
madskjeldgaard / .clang-tidy
Created December 22, 2022 19:08
A clang-tidy config file. Place at the root of your project
---
# Enable ALL the things! Except not really
# misc-non-private-member-variables-in-classes: the options don't do anything
# modernize-use-nodiscard: too aggressive, attribute is situationally useful
Checks: "*,\
-google-readability-todo,\
-altera-*,\
-fuchsia-*,\
fuchsia-multiple-inheritance,\
-llvm-header-guard,\
@madskjeldgaard
madskjeldgaard / lsbrew
Created July 15, 2022 16:44
FZF + HomeBrew: Fuzzy find and install packages
#!/bin/zsh
# Made by Niklas Adam <3
brew search // | fzf --preview 'brew info {}' -e -m --reverse --pointer='▓' --prompt='~ ' --marker='<>' --preview-window=right:60% --border=sharp --bind 'ctrl-w:toggle-preview-wrap' --bind 'ctrl-l:clear-query' --bind 'ctrl-d:deselect-all' --bind 'ctrl-space:toggle' --bind 'ctrl-p:toggle-preview' --bind 'shift-right:preview-page-down' --bind 'shift-left:preview-page-up' --header=$'╔════════════════════╗ \n║░ lsbrew ░║\n╚════════════════════╝\n ' | awk '{print $1}' | xargs -ro brew install
@madskjeldgaard
madskjeldgaard / faust2supercolliderx86
Created September 30, 2021 12:12
faust2supercolliderx86: Force macOS x86 compilation on M1
#! /bin/bash -e
#set -x
#####################################################################
# #
# Compiles Faust programs to supercollider #
# (c) Grame, 2010 #
# #
#####################################################################
@madskjeldgaard
madskjeldgaard / extJITLibGuiHotfixes.sc
Last active July 22, 2021 21:03
A number of overwrites to make JITLib gui (especially NdefGui) more readable on HiDPI screens + responsive to local specs
// Some patches to make JitLib gui stuff more easy on the eyes. Mostly: Larger!
// Also: Make it respond to local specs if defined using the NamedControl style
// FIX: Change font size, button heights and color scheme
+ JITGui {
*initClass {
Class.initClassTree(GUI);
GUI.skins.put(\jit, (
fontSpecs: ["Helvetica", 16],
@madskjeldgaard
madskjeldgaard / daisyproject
Last active March 13, 2021 18:24
Project generator script (UNIX) for the Daisy Seed platform
#! /usr/bin/bash
TARGET_DIR=/home/mads/code/mcu
PROJECT_NAME="$1"
PROJECT_NAME_LOWER=$(echo ${PROJECT_NAME} | awk '{ print tolower($0) }')
PROJECT_DIR=$TARGET_DIR/$PROJECT_NAME
function init(){
if [[ -z "$PROJECT_NAME" ]]; then
@madskjeldgaard
madskjeldgaard / build.yml
Last active January 4, 2022 20:07
Build, compile and release cross platform SuperCollider plugins using this Github Actions file. By adding this action, every time you push a new tag to your github repo containg `v*` GH will automatically compile and publish using that tag.
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
@madskjeldgaard
madskjeldgaard / west.scd
Last active January 14, 2023 20:18
Buchla inspired supercollider synth