Module: Scruby::Audio::Ugens::UgenOperations
- Included in:
- Ugen
- Defined in:
- lib/scruby/audio/ugens/ugen_operations.rb
Defined Under Namespace
Modules: BinaryOperations, UnaryOperators
Constant Summary
collapse
- UNARY =
operation_indices['unary']
- BINARY =
operation_indices['binary']
- OP_SYMBOLS =
{ :+ => :plus, :- => :minus, :* => :mult, :/ => :div2, :<= => :less_than_or_eql, :>= => :more_than_or_eql }
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(klass) ⇒ Object
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/scruby/audio/ugens/ugen_operations.rb', line 14
def self.included( klass )
klass.send( :include, BinaryOperations )
begin; klass.send( :include, UnaryOperators ) if klass.new.ugen?; rescue; end
BINARY.each_key do |operator|
override = OP_SYMBOLS[operator] || operator
begin; klass.send :alias_method, "original_#{override}", operator; rescue; end
klass.send :alias_method, operator, "ugen_#{override}"
end
end
|
Instance Method Details
10
11
12
|
# File 'lib/scruby/audio/ugens/ugen_operations.rb', line 10
def valid_ugen_input?
true
end
|