Method: Musicality::SuperCollider::SynthDef#initialize

Defined in:
lib/musicality/performance/supercollider/synthdef.rb

#initialize(name: "", params: {}, body: "", credit: "", source: "") ⇒ SynthDef

Returns a new instance of SynthDef.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
# File 'lib/musicality/performance/supercollider/synthdef.rb', line 8

def initialize name: "", params: {}, body: "", credit: "", source: ""
  raise ArgumentError if name.empty?
  raise ArgumentError if body.empty?

  @name, @params, @body = name, params, body
  @credit, @source = credit, source
end