Skip to content

Instantly share code, notes, and snippets.

@dmorgan-github
dmorgan-github / Pdv.sc
Last active March 2, 2023 04:00
SuperCollider mini dsl for durations and values
/*
NOTE: There is a Quark for this - https://github.com/dmorgan-github/Pdv
Copy to Extensions folder and re-compile
Ryhthmically sequences numeric values which can then be used with any event key, e.g. degree or midinote.
operators:
" " - empty space separates beats/values
~ - rest
// Only pull a value once per clock time - else, return the previous value
PtimeClutch : FilterPattern {
var <>delta;
*new {
|pattern, delta=0.0|
^super.new(pattern).delta_(delta);
}
embedInStream {
@scztt
scztt / Pmod-tests.scd
Last active September 17, 2021 14:03
Pmod.sc
(
SynthDef(\saw, {
var env, sig;
sig = Saw.ar(
\freq.kr(440) * (\fmod.ar(0).midiratio * [-1, 1]),
\amp.kr(1)
);
env = Env.adsr(releaseTime: \release.kr(1));
env = env.kr(
@scztt
scztt / SAMP.sc
Last active February 23, 2024 20:33
SAMP : Singleton {
classvar <>root, <>extensions, <>lazyLoading=true;
var <paths, buffers, <channels, <foundRoot, <foundRootModTime, markersCache, atCache;
var metadata;
*initClass {
root = "/Users/Shared/_sounds".standardizePath;
extensions = ["wav", "aiff", "aif", "flac", "ogg"];
}
@jdarpinian
jdarpinian / executable.c
Last active March 20, 2024 15:28
Add one line to your C/C++ source to make it executable.
///bin/true;COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@"
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
@adcxyz
adcxyz / Making_A_Standalone_w_3.7.0.scd
Created April 29, 2016 19:38
Making A Standalone with SC 3.7.0

/****

A full script for creating a standalone app based on the current setup and config of a SuperCollider.app - tested with 3.7.0.

c Alberto de Campo 2016

HOW TO USE this:

@digitalshadow
digitalshadow / OpenSimplexNoise.cs
Last active April 17, 2024 23:06
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 24, 2024 12:29
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@mbinna
mbinna / include-version-info.sh
Last active November 12, 2021 20:59
Include Version Info from Git into Info.plist at build time
Add the script include-version-info.sh into a new run script build phase of your application target. The build phase
should be located after the build phase "Copy Bundle Resources".
@awidegreen
awidegreen / vim_cheatsheet.md
Last active April 12, 2024 02:26
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close