Class: Scruby::Ugens::Out

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

Direct Known Subclasses

ReplaceOut

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

Instance Method Summary collapse

Methods inherited from Ugen

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

Constructor Details

#initialize(*args) ⇒ Out

ar and kr should be use for instantiation



20
21
22
23
# File 'lib/scruby/ugens/in_out.rb', line 20

def initialize *args
  super
  @channels = []
end

Class Method Details

.ar(bus, *inputs) ⇒ Object

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



30
31
32
33
# File 'lib/scruby/ugens/in_out.rb', line 30

def ar bus, *inputs
  inputs.peel!
  new :audio, bus, *inputs; 0.0 #Out has no output
end

.kr(bus, *inputs) ⇒ Object

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



36
37
38
39
# File 'lib/scruby/ugens/in_out.rb', line 36

def kr bus, *inputs
  inputs.peel!
  new :control, bus, *inputs; 0.0 #Out has no output
end

Instance Method Details

#output_specsObject

:nodoc:



26
# File 'lib/scruby/ugens/in_out.rb', line 26

def output_specs; []; end