Class: Beeps::Envelope
- Inherits:
-
Object
- Object
- Beeps::Envelope
- Defined in:
- lib/beeps/processor.rb
Instance Method Summary collapse
-
#initialize(attack = nil, decay = nil, sustain = nil, release = nil, *args, **kwargs, &block) ⇒ Envelope
constructor
A new instance of Envelope.
- #note_off(delay = 0) ⇒ Object
- #note_on(delay = 0) ⇒ Object
Constructor Details
#initialize(attack = nil, decay = nil, sustain = nil, release = nil, *args, **kwargs, &block) ⇒ Envelope
Returns a new instance of Envelope.
127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/beeps/processor.rb', line 127 def initialize( attack = nil, decay = nil, sustain = nil, release = nil, *args, **kwargs, &block) attack_time attack if attack decay_time decay if decay sustain_level sustain if sustain release_time release if release super(*args, **kwargs, &block) end |
Instance Method Details
#note_off(delay = 0) ⇒ Object
143 144 145 |
# File 'lib/beeps/processor.rb', line 143 def note_off(delay = 0) note_off! delay end |
#note_on(delay = 0) ⇒ Object
139 140 141 |
# File 'lib/beeps/processor.rb', line 139 def note_on(delay = 0) note_on! delay end |