Skip to content

Instantly share code, notes, and snippets.

View mtmccrea's full-sized avatar
🦚
☁️_☁️

Mike McCrea mtmccrea

🦚
☁️_☁️
  • Helsinki, Finland
View GitHub Profile
@mtmccrea
mtmccrea / ATK Style Reference - Receiver Verbose.scd
Created August 30, 2019 14:25
Working reference for ATK coding style: Receiver-verbose

/* Working reference for ATK coding style: Receiver-verbose

General Hierarchy:

  1. Receiver-verbose
  2. unless it is clearer in Functional-verbose

*/

// ~~~~~~~~~~~~~~~~~~~~

@mtmccrea
mtmccrea / ATK Style Reference - Receiver Sparse.scd
Created August 30, 2019 14:23
Working reference for ATK coding style: Receiver-sparse

/* Working reference for ATK coding style: Receiver-sparse

General Hierarchy:

  1. Receiver-sparse
  2. unless it is clearer in Functional-sparse
  3. lastly, Functional-verbose as needed

*/

@mtmccrea
mtmccrea / ddwSnippets.scd
Created August 9, 2019 20:38
DDWSnippets config file for SC
/*** DDWSnippets config ***/
DDWSnippets.autoEnable = nil;
DDWSnippets.verbose = true;
DDWSnippets.hotkeyCode = 50; // `
DDWSnippets.hotkeyMods = 262144; // control key
DDWSnippets.put("SynthDef",
"SynthDef(\\##name##, { arg outbus = 0;
@mtmccrea
mtmccrea / ATK code style options.scd
Created August 3, 2019 23:02
Some options of code style to choose for ATK's style guidelines.

// ~~~~~~~~~~~~~~~~~~~~ /* switch statements */ // ~~~~~~~~~~~~~~~~~~~~ ( var a = \two;

// 1a. functional style switch(a, \one, { 1 }, \two, {

@mtmccrea
mtmccrea / Hilbert_phase_rotation_amp_response.scd
Last active July 24, 2019 22:46
Preview the amplitude modulation of various phase rotation methods

/* Michael McCrea, Jo Anderson 2019 The code below is a modification of examples found in SuperCollider's Hilbert quark by Jo Anderson: https://github.com/ambisonictoolkit/Hilbert */

/* Preview the amplitude modulation of various phase rotation methods. */

@mtmccrea
mtmccrea / BufWr_bug.scd
Last active July 15, 2019 22:17
SuperCollider bug in BufWr loop flag
(
~bufDur = 0.1;
b = Buffer.alloc(s, ~bufDur * s.sampleRate, 1);
)
// write a line to buffer: 5> 500 over FOUR seconds
// BufWr:loop = 0, so only the ramp from 0 > ~bufDur should be written
// but... run the synth (longer than the buffer duration), and value 500
// is written to the buffer for some number of frames (which is less
// than a block size)
(
@mtmccrea
mtmccrea / sc_ide_conf.yaml
Created July 15, 2019 18:26
My SC IDE configuration
IDE:
editor:
blinkDuration: 600
disableBlinkingCursor: false
font:
antialias: 2
family: Source Code Pro
size: 15
highlightBracketContents: true
highlightCurrentLine: false
@mtmccrea
mtmccrea / swap_sc_class_lib.scd
Last active July 9, 2019 19:48
Swap SuperCollider's class library with one from another location (e.g. SC repo fork)

( // enable repo class lib LanguageConfig.addExcludePath(Platform.resourceDir +/+ "SCClassLibrary"); LanguageConfig.addIncludePath("/Users/admin/src/supercollider-mtmccrea/SCClassLibrary"); LanguageConfig.store; thisProcess.recompile )

( // restore default class lib LanguageConfig.removeExcludePath(Platform.resourceDir +/+ "SCClassLibrary");

@mtmccrea
mtmccrea / terminal_stylesheet.txt
Created July 5, 2019 20:12
terminal prompt and output styling. copy into to .bash_profile
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
@mtmccrea
mtmccrea / PartConv-impulse-signal-test
Last active February 13, 2019 00:37
Testing PartConv, PartConv2 at specific locations against expected output position, amp and delay
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* PartConv, PartConv2: Test signal - Impulse or DC */
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing the kernel at specific locations against expected
// output position, amp and delay
// SOME RESULTS:
// DonConv has errors in certain impulse positions once the 'ksize' gets to 2**19 (~12s @ 44.1k) at 44100