Class: Ruck::UGen::Generators::Step

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

Instance Attribute Summary

Attributes included from UGenBase

#name

Instance Method Summary collapse

Methods included from Source

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

Methods included from UGenBase

#to_s

Constructor Details

#initialize(attrs = {}) ⇒ Step

Returns a new instance of Step.



40
41
42
43
# File 'lib/ruck/ugen/basic.rb', line 40

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

Instance Method Details

#attr_namesObject



51
52
53
# File 'lib/ruck/ugen/basic.rb', line 51

def attr_names
  [:value]
end

#next(now) ⇒ Object



45
46
47
48
49
# File 'lib/ruck/ugen/basic.rb', line 45

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