Module: Muse::Harmonic

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

Class Method Summary collapse

Class Method Details

.base(input) ⇒ Object



21
22
23
# File 'lib/muse/config/harmonic.rb', line 21

def base(input)
  2 * Math::PI * input
end

.default(input) ⇒ Object



25
26
27
# File 'lib/muse/config/harmonic.rb', line 25

def default(input)
  Math.sin(base(input))
end

.guitar(input) ⇒ Object



40
41
42
43
44
# File 'lib/muse/config/harmonic.rb', line 40

def guitar(input)
  Math.sin(base(input)) + 
  Math.sin(base(input) * 2) + 
  Math.sin(base(input) * 0.5)
end

.second(input) ⇒ Object



29
30
31
32
# File 'lib/muse/config/harmonic.rb', line 29

def second(input)
  Math.sin(base(input))
  Math.sin(base(input) * 3)
end

.third(input) ⇒ Object



34
35
36
37
38
# File 'lib/muse/config/harmonic.rb', line 34

def third(input)
  Math.sin(base(input)) + 
  Math.sin(base(input) * 3) + 
  Math.sin(base(input) * 5)
end