Class: LFOSquare
- Inherits:
-
Base
show all
- Defined in:
- lib/functions/lfo_square.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#frame_optimized, #name
Instance Method Summary
collapse
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
#cycle_ms ⇒ Object
Returns the value of attribute cycle_ms.
12
13
14
|
# File 'lib/functions/lfo_square.rb', line 12
def cycle_ms
@cycle_ms
end
|
Instance Method Details
#arduino_code ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/functions/lfo_square.rb', line 18
def arduino_code
unless @frame_optimized
[
"lfo_square(mils, #{@cycle_ms.name}, #{@name});"
]
else
[]
end
end
|
#cycle_level_arduino_code ⇒ Object
28
29
30
31
32
33
34
35
36
|
# File 'lib/functions/lfo_square.rb', line 28
def cycle_level_arduino_code
if @frame_optimized
[
"lfo_square(mils, #{@cycle_ms.name}, #{@name});"
]
else
[]
end
end
|
#param_keys ⇒ Object
14
15
16
|
# File 'lib/functions/lfo_square.rb', line 14
def param_keys
[:cycle_ms]
end
|
#top_level_scope_code ⇒ Object
38
39
40
41
42
|
# File 'lib/functions/lfo_square.rb', line 38
def top_level_scope_code
[
"long #{@name}[3];"
]
end
|