Class: Scruby::Ugens::TGrains

Inherits:
Ugen show all
Includes:
MultiOut
Defined in:
lib/scruby/ugens/buffer_read_write.rb

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 included from MultiOut

included, #output_specs

Methods inherited from Ugen

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

Constructor Details

#initialize(rate, channels, *inputs) ⇒ TGrains

Returns a new instance of TGrains.

Raises:

  • (ArgumentError)


21
22
23
24
# File 'lib/scruby/ugens/buffer_read_write.rb', line 21

def initialize rate, channels, *inputs
  raise ArgumentError.new("#{ self.class } instance needs at least two channels.") unless channels > 1 
  super
end

Class Method Details

.ar(channels, trigger = 0, bufnum = 0, rate = 1, center_pos = 0, dur = 0.1, pan = 0, amp = 0.1, interp = 4) ⇒ Object



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

def ar channels, trigger = 0, bufnum = 0, rate = 1, center_pos = 0, dur = 0.1, pan = 0, amp = 0.1, interp = 4
  new :audio, channels, trigger, bufnum, rate, center_pos, dur, pan, amp, interp
end