Class: Scruby::Ugens::BufWr

Inherits:
Ugen show all
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

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(input, bufnum = 0, phase = 0.0, loop = 1.0) ⇒ Object



55
56
57
# File 'lib/scruby/ugens/buffer_read_write.rb', line 55

def ar input, bufnum = 0, phase = 0.0, loop = 1.0
  new :audio, bufnum, phase, loop, *input.to_array
end

.kr(input, bufnum = 0, phase = 0.0, loop = 1.0) ⇒ Object



51
52
53
# File 'lib/scruby/ugens/buffer_read_write.rb', line 51

def kr input, bufnum = 0, phase = 0.0, loop = 1.0
  new :control, bufnum, phase, loop, *input.to_array
end