Class: Scruby::Synth

Inherits:
Node show all
Defined in:
lib/scruby/audio/synth.rb

Instance Attribute Summary

Attributes inherited from Node

#name, #servers

Instance Method Summary collapse

Methods inherited from Node

#id, reset!

Constructor Details

#initialize(name, opts = {}) ⇒ Synth

Returns a new instance of Synth.



4
5
6
7
# File 'lib/scruby/audio/synth.rb', line 4

def initialize( name, opts = {} )
  super( name, opts.delete(:servers) )
  @servers.each{ |s| s.send '/s_new', *([@name, self.id, 0, 1] + opts.to_a.flatten) }
end

Instance Method Details

#set(args = {}) ⇒ Object



9
10
11
12
# File 'lib/scruby/audio/synth.rb', line 9

def set( args = {} )
  @servers.each{ |s| s.send '/n_set', *([self.id] + args.to_a.flatten) }
  self
end