Module: Muse::Envelope

Defined in:
lib/muse/config/envelope.rb

Class Method Summary collapse

Class Method Details

.default(input, duration) ⇒ Object



20
21
22
# File 'lib/muse/config/envelope.rb', line 20

def default(input, duration)
  Math.cos((Math::PI*input)/(2*duration.to_f))
end

.sine(input, duration) ⇒ Object



24
25
26
# File 'lib/muse/config/envelope.rb', line 24

def sine(input, duration)
  Math.sin((Math::PI*input)/duration.to_f)
end