Class: Musicality::SuperCollider::Synth
- Defined in:
- lib/musicality/performance/supercollider/synth.rb
Instance Attribute Summary collapse
-
#freed ⇒ Object
readonly
Returns the value of attribute freed.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#running ⇒ Object
readonly
Returns the value of attribute running.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Class Method Summary collapse
- .after(target, synthdef_name, args = {}) ⇒ Object
- .before(target, synthdef_name, args = {}) ⇒ Object
- .head(target, synthdef_name, args = {}) ⇒ Object
- .replace(target, synthdef_name, args = {}) ⇒ Object
- .tail(target, synthdef_name, args = {}) ⇒ Object
Instance Method Summary collapse
-
#initialize(server, group, synthdef_name, add_action, target_id, args) ⇒ Synth
constructor
A new instance of Synth.
Methods inherited from Node
#after, #before, #bundle_queue, #fill, #free, next_id, reset_id_counter, #send_msg, #set, #setn, #start, #stop, #trace
Constructor Details
#initialize(server, group, synthdef_name, add_action, target_id, args) ⇒ Synth
Returns a new instance of Synth.
8 9 10 11 12 13 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 8 def initialize server, group, synthdef_name, add_action, target_id, args raise ArgumentError unless ADD_ACTIONS.include?(add_action) super server, group send_msg(Message.new('/s_new', synthdef_name, id, add_action, target_id, *args.to_a.flatten)) end |
Instance Attribute Details
#freed ⇒ Object (readonly)
Returns the value of attribute freed.
5 6 7 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 5 def freed @freed end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
5 6 7 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 5 def group @group end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 5 def id @id end |
#running ⇒ Object (readonly)
Returns the value of attribute running.
5 6 7 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 5 def running @running end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
5 6 7 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 5 def server @server end |
Class Method Details
.after(target, synthdef_name, args = {}) ⇒ Object
15 16 17 18 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 15 def self.after target, synthdef_name, args = {} raise ArgumentError unless target.is_a?(Node) new target.server, target.group, synthdef_name, ADD_AFTER, target.id, args end |
.before(target, synthdef_name, args = {}) ⇒ Object
20 21 22 23 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 20 def self.before target, synthdef_name, args = {} raise ArgumentError unless target.is_a?(Node) new target.server, target.group, synthdef_name, ADD_BEFORE, target.id, args end |
.head(target, synthdef_name, args = {}) ⇒ Object
25 26 27 28 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 25 def self.head target, synthdef_name, args = {} raise ArgumentError unless target.is_a?(Group) new target.server, target, synthdef_name, ADD_HEAD, target.id, args end |
.replace(target, synthdef_name, args = {}) ⇒ Object
35 36 37 38 |
# File 'lib/musicality/performance/supercollider/synth.rb', line 35 def self.replace target, synthdef_name, args = {} raise ArgumentError unless target.is_a?(Node) new target.server, target.group, synthdef_name, ADD_REPLACE, target.id, args end |