Class: Ruck::UGen::InChannel

Inherits:
Object
  • Object
show all
Includes:
Target, UGenBase
Defined in:
lib/ruck/ugen/ugen.rb

Instance Attribute Summary

Attributes included from UGenBase

#name

Instance Method Summary collapse

Methods included from Target

#add_source, #remove_source

Methods included from UGenBase

#to_s

Constructor Details

#initialize(attrs = {}) ⇒ InChannel

Returns a new instance of InChannel.



191
192
193
194
195
# File 'lib/ruck/ugen/ugen.rb', line 191

def initialize(attrs = {})
  parse_attrs attrs
  @ins = []
  @last = 0.0
end

Instance Method Details

#attr_namesObject



203
204
205
# File 'lib/ruck/ugen/ugen.rb', line 203

def attr_names
  []
end

#next(now) ⇒ Object



197
198
199
200
201
# File 'lib/ruck/ugen/ugen.rb', line 197

def next(now)
  return @last if @now == now
  @now = now
  @last = @ins.inject(0) { |samp, ugen| samp += ugen.next(now) }
end