Skip to content

Instantly share code, notes, and snippets.

View krono's full-sized avatar

Tobias Pape krono

View GitHub Profile
@emlyn
emlyn / guitar.rb
Last active November 18, 2023 02:53
Strumming guitar chords in Sonic Pi
# Guitar Strumming - by Emlyn
# This tries to work out the guitar (or ukulele etc.) fingering for arbitrary chords (and tuning).
# It seems to work reasonably well for basic chords, but is quite naive and probably makes many mistakes.
# Ideas, bug reports, fixes etc. gratefully received, just comment below, or tweet @emlyn77.
# Feel free to make use of this code as you like (with attribution if you feel like it, but you don't have to).
# Thanks to @Project_Hell_CK for fixing the tuning, and spotting that it gets chord(:f, :major) not quite right.
# Next note higher or equal to base note n, that is in the chord c
define :next_note do |n, c|
# Make sure n is a number
Ahhhhhhhhh
Ya ya yaaaah
Ya ya yaaah
Yaaah ya yah
Ohohohohoooo
Oh ya yaaah
Ya ya yaaah
Yaaah ya yah
@eMaringolo
eMaringolo / gist:3228968
Created August 1, 2012 17:23
Smalltalk Quine
[ :s | Transcript show: s; show: s printString ] value: '[ :s | Transcript show: s; show: s printString ] value: '