Skip to content

Instantly share code, notes, and snippets.

View madskjeldgaard's full-sized avatar

Mads Kjeldgaard madskjeldgaard

View GitHub Profile
@madskjeldgaard
madskjeldgaard / build-sc3-plugins-pi.sh
Last active March 12, 2026 02:59
Install SuperCollider and SC3-plugins headless on Raspberry Pi
#!/bin/sh
# Taken from: https://github.com/lvm/build-supercollider
###
#
# Variables
#
INSTALL_DIR=/tmp
SUPERCOLLIDER_VER=main
SC3PLUGINS_DIR=$INSTALL_DIR/sc3-plugins
@madskjeldgaard
madskjeldgaard / composition-instruments-notam-meetup.scd
Last active January 7, 2026 16:43
Notes for talk about making Composition Instruments at the Notam SuperCollider meetup May 2024

/*

Examples used in talk about composition-instruments at the Notam SuperCollider meetup May 22nd 2024.

*/

/**************************************************

Part 1: Using vanilla SuperCollider classes

@madskjeldgaard
madskjeldgaard / of-nvim.md
Last active November 13, 2025 16:53
Notes on getting NeoVim and openFrameworks to play nice (work in progress)

Install clang formatting

On Arch Linux I had to install clang to make this work: sudo pacman -Syu clang

There's some really nice autoformatting plugins from Google. Add these to your init.vim and install:

" Code formatting (for c++)
Plug 'google/vim-maktaba'
Plug 'google/vim-codefmt'
@madskjeldgaard
madskjeldgaard / west.scd
Last active July 30, 2025 20:12
Buchla inspired supercollider synth
// A west coast / Buchla inspired synth originally by Mark Wheeler, released in their Norns synth "passersby" https://github.com/markwheeler/passersby/blob/master/lib/Engine_Passersby.sc
/*
// Test
(
Pmono(\west,
\freq, Pwhite(100.0,400.0),
\dur, 0.125,
\gate, 1,
\pitchBendRatio, 1,
@madskjeldgaard
madskjeldgaard / raspi_sc_install.sh
Created November 3, 2018 22:40
Raspberry pi 3 SuperCollider installation and setup script
#!/bin/bash
#
# Steps to install and set up a headless raspberry pi (3) for SuperCollider use
# This is primarily copied from https://supercollider.github.io/development/building-raspberrypi
#
#
# Get updated
sudo apt-get update
@madskjeldgaard
madskjeldgaard / UserConfiguration.txt
Last active May 24, 2025 04:23
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 / imgplusaudio2video.sh
Created January 31, 2025 11:25
Combine a still image with an audio file into a video file for social media using ffmpeg
#!/bin/bash
# This script combines an image and an audio file into a video using ffmpeg.
# It prompts the user for the paths to the image and audio files, an optional
# fixed length in seconds, and the output file name. The script ensures that
# the paths are properly quoted and constructs the appropriate ffmpeg command.
# Function to add quotes around a path if not already present
add_quotes() {
local path="$1"
@madskjeldgaard
madskjeldgaard / double-clouds-nanokorg.scd
Last active December 16, 2024 19:44
Using the mi ugens and Modality toolkit to create a double Clouds granulator synth with a korg Nanokontrol2 as the interface
(
///////////////////////////////
// Korg nanokontrol2 Clouds interface
///////////////////////////////
/*
By Mads Kjeldgaard, 08-11-2020
Dependencies:
- mi ugens: https://github.com/v7b1/mi-UGens
@madskjeldgaard
madskjeldgaard / supercollider2live.scd
Last active November 28, 2024 09:44
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 / 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