Class: Ruck::Generators::Step

Inherits:
Object
  • Object
show all
Includes:
Source, UGen
Defined in:
lib/ruck/ugen/general.rb

Instance Attribute Summary

Attributes included from UGen

#name

Instance Method Summary collapse

Methods included from Source

#<<, #>>, #last, #out, #out_channels

Methods included from UGen

#to_s

Constructor Details

#initialize(attrs = {}) ⇒ Step

Returns a new instance of Step.



210
211
212
213
# File 'lib/ruck/ugen/general.rb', line 210

def initialize(attrs = {})
  parse_attrs({ :value => 0.0 }.merge(attrs))
  @last = value
end

Instance Method Details

#attr_namesObject



221
222
223
# File 'lib/ruck/ugen/general.rb', line 221

def attr_names
  [:value]
end

#next(now) ⇒ Object



215
216
217
218
219
# File 'lib/ruck/ugen/general.rb', line 215

def next(now)
  return @last if @now == now
  @now = now
  @last = value
end