You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.3 KiB
Python
60 lines
1.3 KiB
Python
FluidDataSet : FluidManipulationClient {
|
|
|
|
var <>synth, <>server, <>id;
|
|
|
|
*kr{ |name, dims|
|
|
^this.new1('control',name, dims);
|
|
}
|
|
|
|
*new { |server,name,dims|
|
|
^super.new(server,name,dims);
|
|
}
|
|
|
|
init { |name, dims|
|
|
var ascii = name.ascii;
|
|
this.id = name;
|
|
// specialIndex = -1;
|
|
inputs = [ascii.size].addAll(ascii)++dims++Done.none++FluidManipulationClient.nonBlocking;
|
|
}
|
|
|
|
asString {
|
|
^id.asString;
|
|
}
|
|
|
|
addPoint{|label, buffer, action|
|
|
this.pr_sendMsg(\addPoint,[label,buffer.asUGenInput],action);
|
|
}
|
|
|
|
getPoint{|label, buffer, action|
|
|
this.pr_sendMsg(\getPoint,[label,buffer.asUGenInput],action);
|
|
}
|
|
|
|
updatePoint{|label, buffer, action|
|
|
this.pr_sendMsg(\updatePoint,[label,buffer.asUGenInput],action);
|
|
}
|
|
|
|
deletePoint{|label, action|
|
|
this.pr_sendMsg(\deletePoint,[label],action);
|
|
}
|
|
|
|
cols {|action|
|
|
this.pr_sendMsg(\cols,[],action,[numbers(FluidMessageResponse,_,1,_)]);
|
|
}
|
|
|
|
read{|filename,action|
|
|
this.pr_sendMsg(\read,[filename],action);
|
|
}
|
|
|
|
write{|filename,action|
|
|
this.pr_sendMsg(\write,[filename],action);
|
|
}
|
|
|
|
size { |action|
|
|
this.pr_sendMsg(\size,[],action,[numbers(FluidMessageResponse,_,1,_)]);
|
|
}
|
|
|
|
clear { |action|
|
|
this.pr_sendMsg(\clear,[],action);
|
|
}
|
|
|
|
} |