Class: Scruby::Audio::Ugens::In

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

Constant Summary

Constants inherited from Ugen

Ugen::E_RATES, Ugen::RATES

Constants included from UgenOperations

UgenOperations::BINARY, UgenOperations::OP_SYMBOLS, UgenOperations::UNARY

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 MultiOutUgen

new

Methods inherited from Ugen

#encode, instantiate, #muladd, new, synthdef, synthdef=, #to_s, #ugen?

Methods included from UgenOperations

included, #valid_ugen_input?

Constructor Details

#initialize(rate, channels, bus) ⇒ In

:nodoc:



6
7
8
9
# File 'lib/scruby/audio/ugens/in_out.rb', line 6

def initialize( rate, channels, bus ) #:nodoc:
  super rate, *(0...channels).map{ |i| OutputProxy.new rate, self, i }
  @inputs = [bus]
end

Class Method Details

.ar(bus, channels = 1) ⇒ Object



11
12
13
# File 'lib/scruby/audio/ugens/in_out.rb', line 11

def self.ar( bus, channels = 1 )
  new :audio, channels, bus
end

.kr(bus, num_channels = 1) ⇒ Object



15
16
17
# File 'lib/scruby/audio/ugens/in_out.rb', line 15

def self.kr( bus, num_channels = 1 )
  new :control, channels, bus
end