Skip to content

Instantly share code, notes, and snippets.

@chrisboyle
chrisboyle / sick_of_losing_soulmates.rb
Last active August 29, 2022 05:10
My first Sonic Pi thing
# Run this in Sonic Pi: https://sonic-pi.net/
# Sick of Losing Soulmates by Dodie: https://youtu.be/mHUIoikgKT0
# Inspired by Deerful's cover: https://youtu.be/sfaEBsloiQk
use_synth :pluck
use_bpm 75
define :tab do |t|
t.split('').map {|n| note(:e2) + n.to_i }
end
@chrisboyle
chrisboyle / sonic_pi_utils.rb
Last active November 18, 2018 10:06
Helpers for sonic-pi
# riff(:c4, '5313555 333 555 ')
def riff(tonic, melody)
t = note(tonic) - 1
ring(*(melody.split('').map {|c| n = c.to_i; n.zero? ? :r : note(t + n)}))
end

Keybase proof

I hereby claim:

  • I am chrisboyle on github.
  • I am chrisboyle (https://keybase.io/chrisboyle) on keybase.
  • I have a public key whose fingerprint is EE61 16FF 05A7 83D6 E617 6B45 17B1 CA7D 6408 9528

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am chrisboyle on github.
  • I am chrisboyle (https://keybase.io/chrisboyle) on keybase.
  • I have a public key whose fingerprint is C326 7C30 7B6D FBF8 6BA8 9107 462E 80AC B7D8 6E0F

To claim this, I am signing this object: