Module: Ruck::UGen::Target

Included in:
Generators::ADSR, Generators::Delay, Generators::Gain, InChannel
Defined in:
lib/ruck/ugen/ugen.rb

Instance Method Summary collapse

Instance Method Details

#add_source(ugen) ⇒ Object



81
82
83
84
85
86
87
88
89
# File 'lib/ruck/ugen/ugen.rb', line 81

def add_source(ugen)
  if ugen.is_a? Array
    ugen.each { |u| add_source u }
  else
    @ins << ugen
  end

  self
end

#remove_source(ugen) ⇒ Object



91
92
93
94
95
96
97
98
99
# File 'lib/ruck/ugen/ugen.rb', line 91

def remove_source(ugen)
  if ugen.is_a? Array
    ugen.each { |u| remove_source u }
  else
    @ins.delete(ugen)
  end

  self
end