Skip to content

Instantly share code, notes, and snippets.

View amiika's full-sized avatar

Miika Alonen amiika

  • CSC - IT Center for Science
  • Espoo
View GitHub Profile
@amiika
amiika / .gitignore
Last active December 11, 2015 17:09 — forked from GerHobbelt/.gitignore
# Editor backup files
*.bak
*~
@amiika
amiika / guitar.rb
Last active September 17, 2022 12:29 — forked from emlyn/guitar.rb
Strumming guitar chords in Sonic Pi
# Guitar Strumming - by Emlyn (modified by amiika)
# 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.
define :next_note do |n, c|
# Make sure n is a number
n = note(n)
@amiika
amiika / drum_tab_player.rb
Last active September 5, 2018 16:22 — forked from xavriley/drum_tab_player.rb
Playing ASCII Drum Tabs with Sonic Pi
# Transposed tab array and changed type to ring to play nicely in live_loop
# Playing ASCII drum tabs with Sonic Pi
# Ruby is an awesome language for String manipulation.
# Lets use that fact to play some drums!
# Tab for the Amen break taken from Wikipedia
# http://en.wikipedia.org/wiki/Amen_break