Skip to content

Instantly share code, notes, and snippets.

@rogerrohrbach
Created November 16, 2010 11:08
Show Gist options
  • Save rogerrohrbach/701703 to your computer and use it in GitHub Desktop.
Save rogerrohrbach/701703 to your computer and use it in GitHub Desktop.
Sound like U2's guitarist by using Euler's number to set delay effect (in ms)
require 'singleton'
module U2
class Edge
include Singleton
attr_accessor :delay
def set_delay_for_tempo(bpm)
# http://5cense.com/Edge_Delay.htm
@delay = ((60.0 / bpm / Math::E) * 1000).ceil
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment