Skip to content

Instantly share code, notes, and snippets.

Martin Gondermann magicmonty

Block or report user

Report or block magicmonty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@magicmonty
magicmonty / sonic-pi.rb
Last active Sep 24, 2018
Frankfurt Live Coding Set
View sonic-pi.rb
# -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
#
# .:-`
# `+oooo`
# +- :o+
# /o-
# .oo`
# /oo: dP oo
# `oo+o` 88
# :o:.o/ 88d888b. 88d888b. .d8888b. 88d888b. dP .d8888b.
@magicmonty
magicmonty / sonic-pi-synths-for-vim.rb
Created Aug 24, 2018
Inquiry Script output fpr Sonic-Pi 3.1
View sonic-pi-synths-for-vim.rb
# The synths
@synths = []
@context = {}
context_common = [ 'amp', 'amp_slide', 'amp_slide_shape', 'amp_slide_curve', 'pan', 'pan_slide', 'pan_slide_shape', 'pan_slide_curve', 'attack', 'decay', 'sustain', 'release', 'attack_level', 'decay_level', 'sustain_level' ]
context_note = [ 'note', 'note_slide', 'note_slide_shape', 'note_slide_curve' ]
context_cutoff = [ 'cutoff', 'cutoff_slide', 'cutoff_slide_shape', 'cutoff_slide_curve' ]
context_cutoff_min = [ 'cutoff_min', 'cutoff_min_slide', 'cutoff_min_slide_shape', 'cutoff_min_slide_curve', 'cutoff_attack', 'cutoff_decay', 'cutoff_sustain', 'cutoff_release', 'cutoff_attack_level', 'cutoff_decay_level', 'cutoff_sustain_level' ]
context_pulse_width = [ 'pulse_width', 'pulse_width_slide', 'pulse_width_slide_shape', 'pulse_width_slide_curve' ]
context_sub_amp = [ 'sub_amp', 'sub_amp_slide', 'sub_amp_slide_shape', 'sub_amp_slide_curve' ]
context_sub_detune = [ 'sub_detune', 'sub_detune_slide', 'sub_detune_slide_shape', 'sub_detune_slide_curve' ]
@magicmonty
magicmonty / synths_inquiry.rb
Created Aug 24, 2018
Better Inquiry Script for sonicpi.vim
View synths_inquiry.rb
# We should probably find the SynthInfo class relatively
# Presently assumes we're in <sonic-pi-path>/server/sonicpi/lib/sonicpi
require './synths/synthinfo'
fp = File.open("#{Dir.tmpdir}/sonic-pi-synths-for-vim.rb", "w")
synths = []
context = {}
# Collect all synth info
@magicmonty
magicmonty / init.rb
Created Jan 15, 2018
Sonic PI init.rb with some useful helpers
View init.rb
# Sonic Pi init file
# Code in here will be evaluated on launch.
$root = :A
$octave = 4
$tonic = :minor
$progression = :I
def cur_root
note $root, octave: $octave
View l_spread.rb
def l_spread (num_accents, size)
(spread num_accents, size)
.chunk_while { |i,j| !j }
.map { |ary| ary.map { |a| if a then ary.length else 0 end } }
.flatten
.map { |i| [ i != 0, i ] }
.ring
end
View FableMIDItest.fs
open Fable.Core
open Fable.Core.JsInterop
open Fable.Import
[<StringEnum>]
type MIDIPortType =
| Input
| Output
[<StringEnum>]
View gist:b0c28a9a2a0c43a953a42a8eb3740c30
Verifying my Blockstack ID is secured with the address 1JoKfDud5V1b55tE91tPzdznWdG5xa9GC9 https://explorer.blockstack.org/address/1JoKfDud5V1b55tE91tPzdznWdG5xa9GC9
View gist:849e7610336dcdac22cc549d36eae0ef
Verifying that "19QY43rp45dpjDihPaSx3hDM5hEL6qZN1P.id" is my Blockstack ID. https://onename.com/19QY43rp45dpjDihPaSx3hDM5hEL6qZN1P
View gist:851f165fc4c9328d6482aefcfafc6af6
Solarized Dark
{"awayIndicator":"#E0B333","buttonBg":"#859900","buttonColor":"#fdf6e3","centerChannelBg":"#073642","centerChannelColor":"#93a1a1","codeTheme":"solarized-dark","linkColor":"#268bd2","mentionBj":"#dc322f","mentionColor":"#ffffff","mentionHighlightBg":"#d33682","mentionHighlightLink":"#268bd2","newMessageSeparator":"#cb4b16","onlineIndicator":"#2AA198","sidebarBg":"#073642","sidebarHeaderBg":"#002B36","sidebarHeaderTextColor":"#FDF6E3","sidebarText":"#FDF6E3","sidebarTextActiveBorder":"#B58900","sidebarTextActiveColor":"#FDF6E3","sidebarTextHoverBg":"#CB4B16","sidebarUnreadText":"#FDF6E3","errorTextColor":"#dc322f"}
GruvBox Dark
{"awayIndicator":"#fabd2f","buttonBg":"#689d6a","buttonColor":"#ebdbb2","centerChannelBg":"#3c3836","centerChannelColor":"#ebdbb2","codeTheme":"monokai","linkColor":"#83a598","mentionBj":"#b16286","mentionColor":"#fbf1c7","mentionHighlightBg":"#d65d0e","mentionHighlightLink":"#fbf1c7","newMessageSeparator":"#d65d0e","onlineIndicator":"#b8bb26","sidebarBg":"#282828","si
@magicmonty
magicmonty / paket.bat
Last active May 14, 2016
Handling TFS checkout on paket install, paket update and paket add
View paket.bat
@ECHO OFF
.paket\paket.bootstrapper.exe
IF ERRORLEVEL 1 (
EXIT /B %ERRORLEVEL%
)
IF "%1" == "update" GOTO checkout
IF "%1" == "add" GOTO checkout
IF "%1" == "install" GOTO checkout
You can’t perform that action at this time.