class Musicality::SuperCollider::Synth
Attributes
freed[R]
group[R]
id[R]
running[R]
server[R]
Public Class Methods
after(target, synthdef_name, args = {})
click to toggle source
# 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 = {})
click to toggle source
# 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 = {})
click to toggle source
# 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
new(server, group, synthdef_name, add_action, target_id, args)
click to toggle source
Calls superclass method
Musicality::SuperCollider::Node::new
# 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
replace(target, synthdef_name, args = {})
click to toggle source
# 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
tail(target, synthdef_name, args = {})
click to toggle source
# File lib/musicality/performance/supercollider/synth.rb, line 30 def self.tail target, synthdef_name, args = {} raise ArgumentError unless target.is_a?(Group) new target.server, target, synthdef_name, ADD_TAIL, target.id, args end