Class: Scruby::Ugens::EnvGen

Inherits:
Ugen show all
Defined in:
lib/scruby/ugens/env_gen.rb

Overview

Done Actions:

  • 0 do nothing when the UGen is finished

  • 1 pause the enclosing synth, but do not free it

  • 2 free the enclosing synth

  • 3 free both this synth and the preceding node

  • 4 free both this synth and the following node

  • 5 free this synth; if the preceding node is a group then do g_freeAll on it, else free it

  • 6 free this synth; if the following node is a group then do g_freeAll on it, else free it

  • 7 free this synth and all preceding nodes in this group

  • 8 free this synth and all following nodes in this group

  • 9 free this synth and pause the preceding node

  • 10 free this synth and pause the following node

  • 11 free this synth and if the preceding node is a group then do g_deepFree on it, else free it

  • 12 free this synth and if the following node is a group then do g_deepFree on it, else free it

  • 13 free this synth and all other nodes in this group (before and after)

  • 14 free the enclosing group and all nodes within it (including this synth)

Constant Summary

Constant Summary

Constants inherited from Ugen

Ugen::E_RATES, Ugen::RATES, Ugen::VALID_INPUTS

Instance Attribute Summary

Attributes inherited from Ugen

#channels, #index, #inputs, #output_index, #rate, #special_index

Class Method Summary collapse

Methods inherited from Ugen

#==, #encode, #initialize, #muladd, params, synthdef, synthdef=, valid_input?

Constructor Details

This class inherits a constructor from Scruby::Ugens::Ugen

Class Method Details

.ar(envelope, gate = 1, levelScale = 1, levelBias = 0, timeScale = 1, doneAction = 0) ⇒ Object

New EnvGen with :audio rate, inputs should be valid Ugen inputs or Ugens, arguments can be passed as an options hash or in the given order



23
24
25
# File 'lib/scruby/ugens/env_gen.rb', line 23

def ar envelope, gate = 1, levelScale = 1, levelBias = 0, timeScale = 1, doneAction = 0
  new :audio, gate, levelScale, levelBias, timeScale, doneAction, *envelope.to_array
end

.kr(envelope, gate = 1, levelScale = 1, levelBias = 0, timeScale = 1, doneAction = 0) ⇒ Object

New EnvGen with :control rate, inputs should be valid Ugen inputs or Ugens, arguments can be passed as an options hash or in the given order



27
28
29
# File 'lib/scruby/ugens/env_gen.rb', line 27

def kr envelope, gate = 1, levelScale = 1, levelBias = 0, timeScale = 1, doneAction = 0
  new :control, gate, levelScale, levelBias, timeScale, doneAction, *envelope.to_array
end