Module: Rampi::Helpers

Included in:
DSL
Defined in:
lib/rampi/helpers.rb

Instance Method Summary collapse

Instance Method Details

#expe(value) ⇒ Object

Exponential envelope



12
13
14
# File 'lib/rampi/helpers.rb', line 12

def expe(value)
  1 - pow((v1 % 1000) / 1000, value)
end

#invexpe(value) ⇒ Object

Inverse exponential envelope



17
18
19
# File 'lib/rampi/helpers.rb', line 17

def invexpe(value)
  pow((v1 % 1000) / 1000, value)
end

#step(value) ⇒ Object

Step semiquaver counter



7
8
9
# File 'lib/rampi/helpers.rb', line 7

def step(value)
  (v1 / 1000) % value
end