Class: Musicality::Transition
- Inherits:
-
Function::Piecewise
- Object
- Function
- Function::Piecewise
- Musicality::Transition
- Defined in:
- lib/musicality/notation/util/transition.rb
Instance Attribute Summary
Attributes inherited from Function::Piecewise
Attributes inherited from Function
Instance Method Summary collapse
-
#initialize(func, transition_domain) ⇒ Transition
constructor
A new instance of Transition.
Methods inherited from Function::Piecewise
#==, #add_piece, #at, #domain_include?
Methods inherited from Function
#==, #at, #sample, transform_domains
Constructor Details
#initialize(func, transition_domain) ⇒ Transition
Returns a new instance of Transition.
4 5 6 7 8 9 |
# File 'lib/musicality/notation/util/transition.rb', line 4 def initialize func, transition_domain super() add_piece(transition_domain, func) add_piece(transition_domain.last..DOMAIN_MAX, Function::Constant.new(func.at(transition_domain.last))) end |