Class: Crossfade
Instance Attribute Summary collapse
-
#channel1 ⇒ Object
Returns the value of attribute channel1.
-
#channel2 ⇒ Object
Returns the value of attribute channel2.
-
#fader ⇒ Object
Returns the value of attribute fader.
Attributes inherited from Base
Instance Method Summary collapse
- #arduino_code ⇒ Object
- #cycle_level_arduino_code ⇒ Object
- #param_keys ⇒ Object
- #top_level_scope_code ⇒ Object
Methods inherited from Base
#add_arduino_code, #add_cycle_level_scope, #add_top_level_scope, #append_tsortable, #buildit, #depends_on, #initialize, #resolve_frame_optimized, #top_level_scope_arduino_code
Constructor Details
This class inherits a constructor from Base
Instance Attribute Details
#channel1 ⇒ Object
Returns the value of attribute channel1.
13 14 15 |
# File 'lib/functions/crossfade.rb', line 13 def channel1 @channel1 end |
#channel2 ⇒ Object
Returns the value of attribute channel2.
14 15 16 |
# File 'lib/functions/crossfade.rb', line 14 def channel2 @channel2 end |
#fader ⇒ Object
Returns the value of attribute fader.
12 13 14 |
# File 'lib/functions/crossfade.rb', line 12 def fader @fader end |
Instance Method Details
#arduino_code ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/functions/crossfade.rb', line 20 def arduino_code unless @frame_optimized [ "crossfade(#{@fader.name}, #{@channel1.name}, #{@channel2.name}, #{@name});" ] else [] end end |
#cycle_level_arduino_code ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/functions/crossfade.rb', line 30 def cycle_level_arduino_code if @frame_optimized [ "crossfade(#{@fader.name}, #{@channel1.name}, #{@channel2.name}, #{@name});" ] else [] end end |
#param_keys ⇒ Object
16 17 18 |
# File 'lib/functions/crossfade.rb', line 16 def param_keys [:fader, :channel1, :channel2] end |
#top_level_scope_code ⇒ Object
40 41 42 43 44 |
# File 'lib/functions/crossfade.rb', line 40 def top_level_scope_code [ "long #{@name}[3];", ] end |