Class: Deftones::Component::PanVol
- Inherits:
-
Deftones::Core::AudioNode
- Object
- Deftones::Core::AudioNode
- Deftones::Component::PanVol
- Defined in:
- lib/deftones/component/pan_vol.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#panner ⇒ Object
readonly
Returns the value of attribute panner.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
Attributes inherited from Deftones::Core::AudioNode
Instance Method Summary collapse
-
#initialize(pan: 0.0, volume: 0.0, context: Deftones.context) ⇒ PanVol
constructor
A new instance of PanVol.
- #render(num_frames, start_frame = 0, cache = {}) ⇒ Object
- #render_block(num_frames, start_frame = 0, cache = {}) ⇒ Object
Methods inherited from Deftones::Core::AudioNode
#>>, #attach_destination, #attach_source, #block_time, #chain, #channel_count, #channel_count_mode, #channel_interpretation, #connect, #connected?, #default_input_channels, #default_output_channels, #destination_for_connection, #detach_all_destinations, #detach_destination, #detach_source, #disconnect, #dispose, #disposed?, #fan, #get, #immediate, #input_for_index, #inputs, #mix_source_blocks, #multichannel_process?, #name, #normalize_connection_index, #normalize_output_block, #now, #number_of_inputs, #number_of_outputs, #output_for_connection, #output_for_index, #outputs, #process, #raise_connection_index_error!, #reaches_node?, #sample_time, #set, #to_destination, #to_frequency, #to_master, #to_midi, #to_output, #to_s, #to_seconds, #to_ticks, #uses_legacy_render_for_block?, #validate_connectable!, #validate_connection_index!
Constructor Details
#initialize(pan: 0.0, volume: 0.0, context: Deftones.context) ⇒ PanVol
Returns a new instance of PanVol.
8 9 10 11 12 13 14 15 |
# File 'lib/deftones/component/pan_vol.rb', line 8 def initialize(pan: 0.0, volume: 0.0, context: Deftones.context) super(context: context) @panner = Panner.new(pan: pan, context: context) @volume = Volume.new(volume: volume, context: context) @input = @panner @output = @volume @panner >> @volume end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
6 7 8 |
# File 'lib/deftones/component/pan_vol.rb', line 6 def input @input end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
6 7 8 |
# File 'lib/deftones/component/pan_vol.rb', line 6 def output @output end |
#panner ⇒ Object (readonly)
Returns the value of attribute panner.
6 7 8 |
# File 'lib/deftones/component/pan_vol.rb', line 6 def panner @panner end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
6 7 8 |
# File 'lib/deftones/component/pan_vol.rb', line 6 def volume @volume end |
Instance Method Details
#render(num_frames, start_frame = 0, cache = {}) ⇒ Object
17 18 19 |
# File 'lib/deftones/component/pan_vol.rb', line 17 def render(num_frames, start_frame = 0, cache = {}) @output.render(num_frames, start_frame, cache) end |
#render_block(num_frames, start_frame = 0, cache = {}) ⇒ Object
21 22 23 |
# File 'lib/deftones/component/pan_vol.rb', line 21 def render_block(num_frames, start_frame = 0, cache = {}) @output.send(:render_block, num_frames, start_frame, cache) end |