Classes: uniform sc default indentation (#134)
SuperCollider code defaults to indentation using tab. All sc codebase is formatted like this. Here I just opened every .sc file in scide, selected all code, and automatically indent it pressing Tab.nix
parent
2678173661
commit
17067137fd
@ -1,49 +1,49 @@
|
||||
FluidBufChroma : FluidBufProcessor {
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0|
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufChroma: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufChroma: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufChroma: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufChroma: Invalid features buffer".throw};
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufChromaTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking);
|
||||
}
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufChroma: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufChroma: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufChroma: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufChroma: Invalid features buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufChroma: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufChroma: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufChroma: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufChroma: Invalid features buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
FluidBufChromaTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
FluidBufCompose : FluidBufProcessor {
|
||||
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, trig = 1, blocking = 1|
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, trig = 1, blocking = 1|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufComposeTrigger,-1, source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, trig, blocking);
|
||||
^FluidProxyUgen.kr(\FluidBufComposeTrigger,-1, source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, trig, blocking);
|
||||
}
|
||||
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, freeWhenDone = true, action|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
|
||||
|
||||
^this.new( server, nil, [destination]).processList([source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, 1], freeWhenDone, action);//NB always blocking
|
||||
^this.new( server, nil, [destination]).processList([source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, 1], freeWhenDone, action);//NB always blocking
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, gain = 1, destination, destStartFrame = 0, destStartChan = 0, destGain = 0, freeWhenDone = true, action|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufCompose: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufCompose: Invalid destination buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [destination]
|
||||
).processList([source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, 1], freeWhenDone, action);
|
||||
^this.new(
|
||||
server, nil, [destination]
|
||||
).processList([source, startFrame, numFrames, startChan, numChans, gain, destination, destStartFrame, destStartChan, destGain, 1], freeWhenDone, action);
|
||||
}
|
||||
}
|
||||
FluidBufComposeTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,47 +1,47 @@
|
||||
FluidBufFlatten : FluidBufProcessor {
|
||||
|
||||
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, axis = 1, trig = 1, blocking = 1|
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, axis = 1, trig = 1, blocking = 1|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufFlatten: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufFlatten: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufFlatten: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufFlatten: Invalid destination buffer".throw};
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufFlattenTrigger,-1, source, startFrame, numFrames, startChan, numChans, destination, axis, trig, blocking);
|
||||
^FluidProxyUgen.kr(\FluidBufFlattenTrigger,-1, source, startFrame, numFrames, startChan, numChans, destination, axis, trig, blocking);
|
||||
}
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, axis = 1, freeWhenDone = true, action|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufFlatten: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufFlatten: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufFlatten: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufFlatten: Invalid destination buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [destination],
|
||||
^this.new(
|
||||
server, nil, [destination],
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, destination, axis,0],freeWhenDone,action
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, axis = 1, freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, destination, axis = 1, freeWhenDone = true, action|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufFlatten: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufFlatten: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufFlatten: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufFlatten: Invalid destination buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [destination],
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, destination, axis,1],freeWhenDone,action
|
||||
);
|
||||
^this.new(
|
||||
server, nil, [destination],
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, destination, axis,1],freeWhenDone,action
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
FluidBufFlattenTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,76 +1,76 @@
|
||||
FluidBufLoudness : FluidBufProcessor{
|
||||
|
||||
const <features=#[\loudness, \peak];
|
||||
classvar featuresLookup;
|
||||
const <features=#[\loudness, \peak];
|
||||
classvar featuresLookup;
|
||||
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidLoudness -" + sym + "is not a recognised option").postln}
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidLoudness -" + sym + "is not a recognised option").postln}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, trig = 1, blocking = 0|
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, trig = 1, blocking = 0|
|
||||
|
||||
var maxwindowSize = windowSize.nextPowerOfTwo;
|
||||
var maxwindowSize = windowSize.nextPowerOfTwo;
|
||||
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"%: Invalid source buffer".format(this.class.name).throw};
|
||||
features.isNil.if {"%: Invalid features buffer".format(this.class.name).throw};
|
||||
source.isNil.if {"%: Invalid source buffer".format(this.class.name).throw};
|
||||
features.isNil.if {"%: Invalid features buffer".format(this.class.name).throw};
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufLoudnessTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize, trig, blocking);
|
||||
}
|
||||
^FluidProxyUgen.kr(\FluidBufLoudnessTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize, trig, blocking);
|
||||
}
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action|
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action|
|
||||
|
||||
var maxwindowSize = windowSize.nextPowerOfTwo;
|
||||
var maxwindowSize = windowSize.nextPowerOfTwo;
|
||||
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"%: Invalid source buffer".format(this.class.name).throw};
|
||||
features.isNil.if {"%: Invalid features buffer".format(this.class.name).throw};
|
||||
source.isNil.if {"%: Invalid source buffer".format(this.class.name).throw};
|
||||
features.isNil.if {"%: Invalid features buffer".format(this.class.name).throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,0],freeWhenDone,action
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action|
|
||||
|
||||
var maxwindowSize = windowSize.nextPowerOfTwo;
|
||||
var maxwindowSize = windowSize.nextPowerOfTwo;
|
||||
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"%: Invalid source buffer".format(this.class.name).throw};
|
||||
features.isNil.if {"%: Invalid features buffer".format(this.class.name).throw};
|
||||
source.isNil.if {"%: Invalid source buffer".format(this.class.name).throw};
|
||||
features.isNil.if {"%: Invalid features buffer".format(this.class.name).throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features,padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,1],freeWhenDone,action
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
FluidBufLoudnessTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,46 +1,46 @@
|
||||
FluidBufMFCC : FluidBufProcessor{
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0|
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw};
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufMFCCTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,trig, blocking);
|
||||
}
|
||||
^FluidProxyUgen.kr(\FluidBufMFCCTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,trig, blocking);
|
||||
}
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone=true, action |
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone=true, action |
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil,[features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,0],freeWhenDone,action
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,0],freeWhenDone,action
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone=true, action |
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone=true, action |
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil,[features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,1],freeWhenDone,action
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,1],freeWhenDone,action
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
FluidBufMFCCTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,51 +1,51 @@
|
||||
FluidBufMelBands : FluidBufProcessor {
|
||||
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0|
|
||||
*kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufMelBands: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufMelBands: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw};
|
||||
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufMelBandsTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking);
|
||||
}
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufMelBands: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufMelBands: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action|
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufMelBands: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw};
|
||||
source.isNil.if {"FluidBufMelBands: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw};
|
||||
|
||||
^this.new(
|
||||
server, nil, [features]
|
||||
).processList(
|
||||
[source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
FluidBufMelBandsTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,37 +1,37 @@
|
||||
FluidBufNMF : FluidBufProcessor
|
||||
{
|
||||
*kr {|source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth, resynthMode = 0, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0|
|
||||
*kr {|source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth, resynthMode = 0, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0|
|
||||
|
||||
source.isNil.if {"FluidBufNMF: Invalid source buffer".throw};
|
||||
resynth = resynth ? -1;
|
||||
bases = bases ? -1;
|
||||
activations = activations ? -1;
|
||||
source.isNil.if {"FluidBufNMF: Invalid source buffer".throw};
|
||||
resynth = resynth ? -1;
|
||||
bases = bases ? -1;
|
||||
activations = activations ? -1;
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufNMFTrigger,-1,source.asUGenInput, startFrame, numFrames, startChan, numChans, resynth.asUGenInput, resynthMode, bases.asUGenInput, basesMode, activations.asUGenInput, actMode, components, iterations, windowSize, hopSize, fftSize, fftSize, trig, blocking);
|
||||
}
|
||||
^FluidProxyUgen.kr(\FluidBufNMFTrigger,-1,source.asUGenInput, startFrame, numFrames, startChan, numChans, resynth.asUGenInput, resynthMode, bases.asUGenInput, basesMode, activations.asUGenInput, actMode, components, iterations, windowSize, hopSize, fftSize, fftSize, trig, blocking);
|
||||
}
|
||||
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, resynthMode = 0, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action|
|
||||
*process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, resynthMode = 0, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action|
|
||||
|
||||
source.isNil.if {"FluidBufNMF: Invalid source buffer".throw};
|
||||
resynth = resynth ? -1;
|
||||
bases = bases ? -1;
|
||||
activations = activations ? -1;
|
||||
source.isNil.if {"FluidBufNMF: Invalid source buffer".throw};
|
||||
resynth = resynth ? -1;
|
||||
bases = bases ? -1;
|
||||
activations = activations ? -1;
|
||||
|
||||
^this.new(
|
||||
server,nil,[resynth, bases, activations].select{|x| x!= -1}
|
||||
).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone,action);
|
||||
}
|
||||
^this.new(
|
||||
server,nil,[resynth, bases, activations].select{|x| x!= -1}
|
||||
).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone,action);
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, resynthMode = 0, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, resynthMode = 0, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action|
|
||||
|
||||
source.isNil.if {"FluidBufNMF: Invalid source buffer".throw};
|
||||
resynth = resynth ? -1;
|
||||
bases = bases ? -1;
|
||||
activations = activations ? -1;
|
||||
source.isNil.if {"FluidBufNMF: Invalid source buffer".throw};
|
||||
resynth = resynth ? -1;
|
||||
bases = bases ? -1;
|
||||
activations = activations ? -1;
|
||||
|
||||
^this.new(
|
||||
server,nil,[resynth, bases, activations].select{|x| x!= -1}
|
||||
).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone,action);
|
||||
}
|
||||
^this.new(
|
||||
server,nil,[resynth, bases, activations].select{|x| x!= -1}
|
||||
).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone,action);
|
||||
}
|
||||
}
|
||||
FluidBufNMFTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,62 +1,62 @@
|
||||
FluidBufSelect : FluidBufProcessor {
|
||||
|
||||
*kr { |source, destination, indices=#[-1], channels=#[-1], trig = 1, blocking = 1|
|
||||
*kr { |source, destination, indices=#[-1], channels=#[-1], trig = 1, blocking = 1|
|
||||
|
||||
var params;
|
||||
var params;
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
indices = indices.asArray;
|
||||
channels = channels.asArray;
|
||||
indices = indices.asArray;
|
||||
channels = channels.asArray;
|
||||
|
||||
indices = [indices.size] ++ indices;
|
||||
channels = [channels.size] ++ channels;
|
||||
indices = [indices.size] ++ indices;
|
||||
channels = [channels.size] ++ channels;
|
||||
|
||||
source.isNil.if {"FluidBufSelect: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufSelect: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufSelect: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufSelect: Invalid destination buffer".throw};
|
||||
|
||||
params = indices ++ channels ++ [trig, blocking]
|
||||
params = indices ++ channels ++ [trig, blocking]
|
||||
|
||||
^FluidProxyUgen.kr(\FluidBufSelectTrigger,-1, source, destination, *params);
|
||||
^FluidProxyUgen.kr(\FluidBufSelectTrigger,-1, source, destination, *params);
|
||||
}
|
||||
|
||||
|
||||
*process { |server, source, destination, indices=#[-1], channels=#[-1], freeWhenDone = true, action|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufSelect: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufSelect: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufSelect: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufSelect: Invalid destination buffer".throw};
|
||||
|
||||
indices = indices.asArray;
|
||||
channels = channels.asArray;
|
||||
indices = indices.asArray;
|
||||
channels = channels.asArray;
|
||||
|
||||
indices = [indices.size] ++ indices;
|
||||
channels = [channels.size] ++ channels;
|
||||
channels = [channels.size] ++ channels;
|
||||
|
||||
^this.new(server, nil, [destination]).processList([source, destination]++ indices ++ channels ++ [1], freeWhenDone, action);//NB always blocking
|
||||
^this.new(server, nil, [destination]).processList([source, destination]++ indices ++ channels ++ [1], freeWhenDone, action);//NB always blocking
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, destination, indices=#[-1], channels=#[-1], freeWhenDone = true, action|
|
||||
*processBlocking { |server, source, destination, indices=#[-1], channels=#[-1], freeWhenDone = true, action|
|
||||
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
source = source.asUGenInput;
|
||||
destination = destination.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufSelect: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufSelect: Invalid destination buffer".throw};
|
||||
source.isNil.if {"FluidBufSelect: Invalid source buffer".throw};
|
||||
destination.isNil.if {"FluidBufSelect: Invalid destination buffer".throw};
|
||||
|
||||
indices = indices.asArray;
|
||||
channels = channels.asArray;
|
||||
indices = indices.asArray;
|
||||
channels = channels.asArray;
|
||||
|
||||
indices = [indices.size] ++ indices;
|
||||
channels = [channels.size] ++ channels;
|
||||
indices = [indices.size] ++ indices;
|
||||
channels = [channels.size] ++ channels;
|
||||
|
||||
|
||||
^this.new(
|
||||
server, nil, [destination]
|
||||
).processList([source, destination]++ indices ++ channels ++ [1], freeWhenDone, action);//NB always blocking
|
||||
^this.new(
|
||||
server, nil, [destination]
|
||||
).processList([source, destination]++ indices ++ channels ++ [1], freeWhenDone, action);//NB always blocking
|
||||
}
|
||||
}
|
||||
FluidBufSelectTrigger : FluidProxyUgen {}
|
||||
|
||||
@ -1,85 +1,84 @@
|
||||
|
||||
FluidDataSetQuery : FluidDataObject {
|
||||
*new{|server| ^super.new(server) }
|
||||
*new{|server| ^super.new(server) }
|
||||
|
||||
addColumnMsg { |column|
|
||||
^this.prMakeMsg(\addColumn,id,column);
|
||||
}
|
||||
addColumnMsg { |column|
|
||||
^this.prMakeMsg(\addColumn,id,column);
|
||||
}
|
||||
|
||||
addColumn{|column, action|
|
||||
actions[\addColumn] = [nil,action];
|
||||
this.prSendMsg(this.addColumnMsg(column));
|
||||
actions[\addColumn] = [nil,action];
|
||||
this.prSendMsg(this.addColumnMsg(column));
|
||||
}
|
||||
|
||||
addRangeMsg{|start,count|
|
||||
^this.prMakeMsg(\addRange,id,start,count);
|
||||
}
|
||||
addRangeMsg{|start,count|
|
||||
^this.prMakeMsg(\addRange,id,start,count);
|
||||
}
|
||||
|
||||
addRange{|start, count, action|
|
||||
actions[\addRange] = [nil, action];
|
||||
actions[\addRange] = [nil, action];
|
||||
this.prSendMsg(this.addRangeMsg(start, count));
|
||||
}
|
||||
|
||||
filterMsg{|column, condition, value, action|
|
||||
^this.prMakeMsg(\filter,id,column,condition.asSymbol,value);
|
||||
}
|
||||
filterMsg{|column, condition, value, action|
|
||||
^this.prMakeMsg(\filter,id,column,condition.asSymbol,value);
|
||||
}
|
||||
|
||||
filter{|column, condition, value, action|
|
||||
actions[\filter] = [nil, action];
|
||||
actions[\filter] = [nil, action];
|
||||
this.prSendMsg(this.filterMsg(column, condition, value));
|
||||
}
|
||||
|
||||
andMsg{ |column, condition, value|
|
||||
^this.prMakeMsg(\and,id,column, condition.asSymbol, value);
|
||||
}
|
||||
andMsg{ |column, condition, value|
|
||||
^this.prMakeMsg(\and,id,column, condition.asSymbol, value);
|
||||
}
|
||||
|
||||
and{|column, condition, value, action|
|
||||
actions[\and] = [nil, action];
|
||||
actions[\and] = [nil, action];
|
||||
this.prSendMsg(this.andMsg(column,condition,value));
|
||||
}
|
||||
|
||||
orMsg{|column, condition, value|
|
||||
^this.prMakeMsg(\or,id,column, condition.asSymbol, value)
|
||||
}
|
||||
orMsg{|column, condition, value|
|
||||
^this.prMakeMsg(\or,id,column, condition.asSymbol, value)
|
||||
}
|
||||
|
||||
or{|column, condition, value, action|
|
||||
actions[\or] = [nil,action];
|
||||
actions[\or] = [nil,action];
|
||||
this.prSendMsg(this.orMsg(column, condition, value));
|
||||
}
|
||||
|
||||
clearMsg{
|
||||
^this.prMakeMsg(\clear,id);
|
||||
}
|
||||
clearMsg{
|
||||
^this.prMakeMsg(\clear,id);
|
||||
}
|
||||
|
||||
clear{|action|
|
||||
actions[\clear] = [nil, action];
|
||||
actions[\clear] = [nil, action];
|
||||
this.prSendMsg(this.clearMsg);
|
||||
}
|
||||
|
||||
limitMsg{|rows|
|
||||
^this.prMakeMsg(\limit,id,rows);
|
||||
}
|
||||
limitMsg{|rows|
|
||||
^this.prMakeMsg(\limit,id,rows);
|
||||
}
|
||||
|
||||
limit{|rows, action|
|
||||
actions[\limit] = [nil,action];
|
||||
actions[\limit] = [nil,action];
|
||||
this.prSendMsg(this.limitMsg(rows));
|
||||
}
|
||||
|
||||
transformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\transform,id,sourceDataSet.id,destDataSet.id);
|
||||
}
|
||||
transformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\transform,id,sourceDataSet.id,destDataSet.id);
|
||||
}
|
||||
|
||||
transform{|sourceDataSet, destDataSet, action|
|
||||
actions[\transform] = [nil,action];
|
||||
this.prSendMsg(this.transformMsg(sourceDataSet,destDataSet));
|
||||
}
|
||||
transform{|sourceDataSet, destDataSet, action|
|
||||
actions[\transform] = [nil,action];
|
||||
this.prSendMsg(this.transformMsg(sourceDataSet,destDataSet));
|
||||
}
|
||||
|
||||
transformJoinMsg{|source1DataSet, source2DataSet, destDataSet|
|
||||
^this.prMakeMsg(\transformJoin,id,source1DataSet.id, source2DataSet.id, destDataSet.id);
|
||||
}
|
||||
transformJoinMsg{|source1DataSet, source2DataSet, destDataSet|
|
||||
^this.prMakeMsg(\transformJoin,id,source1DataSet.id, source2DataSet.id, destDataSet.id);
|
||||
}
|
||||
|
||||
transformJoin{|source1DataSet, source2DataSet, destDataSet, action|
|
||||
actions[\transformJoin] = [nil,action];
|
||||
this.prSendMsg(this.transformJoinMsg(source1DataSet, source2DataSet, destDataSet));
|
||||
}
|
||||
actions[\transformJoin] = [nil,action];
|
||||
this.prSendMsg(this.transformJoinMsg(source1DataSet, source2DataSet, destDataSet));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,59 +1,59 @@
|
||||
FluidKNNRegressor : FluidModelObject {
|
||||
|
||||
var <>numNeighbours, <>weight;
|
||||
var <>numNeighbours, <>weight;
|
||||
|
||||
*new {|server, numNeighbours = 3, weight = 1|
|
||||
^super.new(server,[numNeighbours,weight])
|
||||
.numNeighbours_(numNeighbours)
|
||||
.weight_(weight);
|
||||
.numNeighbours_(numNeighbours)
|
||||
.weight_(weight);
|
||||
}
|
||||
|
||||
prGetParams{^[this.id,this.numNeighbours,this.weight,-1,-1];}
|
||||
prGetParams{^[this.id,this.numNeighbours,this.weight,-1,-1];}
|
||||
|
||||
fitMsg{|sourceDataSet, targetDataSet|
|
||||
^this.prMakeMsg(\fit,this.id,sourceDataSet.id,targetDataSet.id)
|
||||
}
|
||||
fitMsg{|sourceDataSet, targetDataSet|
|
||||
^this.prMakeMsg(\fit,this.id,sourceDataSet.id,targetDataSet.id)
|
||||
}
|
||||
|
||||
fit{|sourceDataSet, targetDataSet, action|
|
||||
actions[\fit] = [nil,action];
|
||||
this.prSendMsg(this.fitMsg(sourceDataSet, targetDataSet));
|
||||
actions[\fit] = [nil,action];
|
||||
this.prSendMsg(this.fitMsg(sourceDataSet, targetDataSet));
|
||||
}
|
||||
|
||||
predictMsg{ |sourceDataSet, targetDataSet|
|
||||
^this.prMakeMsg(\predict,this.id,sourceDataSet.id,targetDataSet.id)
|
||||
}
|
||||
predictMsg{ |sourceDataSet, targetDataSet|
|
||||
^this.prMakeMsg(\predict,this.id,sourceDataSet.id,targetDataSet.id)
|
||||
}
|
||||
|
||||
predict{ |sourceDataSet, targetDataSet,action|
|
||||
actions[\predict] = [nil, action];
|
||||
actions[\predict] = [nil, action];
|
||||
this.prSendMsg(this.predictMsg(sourceDataSet, targetDataSet));
|
||||
}
|
||||
|
||||
predictPointMsg { |buffer|
|
||||
^this.prMakeMsg(\predictPoint,id, this.prEncodeBuffer(buffer));
|
||||
}
|
||||
predictPointMsg { |buffer|
|
||||
^this.prMakeMsg(\predictPoint,id, this.prEncodeBuffer(buffer));
|
||||
}
|
||||
|
||||
predictPoint { |buffer, action|
|
||||
actions[\predictPoint] = [number(FluidMessageResponse,_,_),action];
|
||||
this.prSendMsg(this.predictPointMsg(buffer));
|
||||
}
|
||||
|
||||
kr{|trig, inputBuffer,outputBuffer|
|
||||
^FluidKNNRegressorQuery.kr(K2A.ar(trig),
|
||||
this, this.numNeighbours, this.weight,
|
||||
this.prEncodeBuffer(inputBuffer),
|
||||
this.prEncodeBuffer(outputBuffer));
|
||||
}
|
||||
kr{|trig, inputBuffer,outputBuffer|
|
||||
^FluidKNNRegressorQuery.kr(K2A.ar(trig),
|
||||
this, this.numNeighbours, this.weight,
|
||||
this.prEncodeBuffer(inputBuffer),
|
||||
this.prEncodeBuffer(outputBuffer));
|
||||
}
|
||||
}
|
||||
|
||||
FluidKNNRegressorQuery : FluidRTMultiOutUGen {
|
||||
|
||||
*kr{ |trig, model,numNeighbours = 3, weight = 1,inputBuffer, outputBuffer |
|
||||
^this.multiNew('control',trig, model.asUGenInput,
|
||||
numNeighbours,weight,
|
||||
inputBuffer.asUGenInput, outputBuffer.asUGenInput)
|
||||
}
|
||||
*kr{ |trig, model,numNeighbours = 3, weight = 1,inputBuffer, outputBuffer |
|
||||
^this.multiNew('control',trig, model.asUGenInput,
|
||||
numNeighbours,weight,
|
||||
inputBuffer.asUGenInput, outputBuffer.asUGenInput)
|
||||
}
|
||||
|
||||
init { arg ... theInputs;
|
||||
init { arg ... theInputs;
|
||||
inputs = theInputs;
|
||||
^this.initOutputs(1, rate);
|
||||
}
|
||||
|
||||
@ -1,43 +1,43 @@
|
||||
FluidLoudness : FluidRTMultiOutUGen {
|
||||
|
||||
const <features=#[\loudness, \peak];
|
||||
classvar featuresLookup;
|
||||
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidLoudness -" + sym + "is not a recognised option").postln}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
const <features=#[\loudness, \peak];
|
||||
classvar featuresLookup;
|
||||
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidLoudness -" + sym + "is not a recognised option").postln}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
|
||||
*kr { arg in = 0, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, maxWindowSize = 16384;
|
||||
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
|
||||
^this.multiNew('control', in.asAudioRateInput(this), selectbits, kWeighting, truePeak, windowSize, hopSize, maxWindowSize);
|
||||
}
|
||||
|
||||
init {arg ...theInputs;
|
||||
var numChannels;
|
||||
init {arg ...theInputs;
|
||||
var numChannels;
|
||||
inputs = theInputs;
|
||||
numChannels = inputs.at(1).asBinaryDigits.sum;
|
||||
numChannels = inputs.at(1).asBinaryDigits.sum;
|
||||
^this.initOutputs(numChannels,rate);
|
||||
}
|
||||
|
||||
checkInputs {
|
||||
if(inputs.at(6).rate != 'scalar') {
|
||||
^(": maxwindowSize cannot be modulated.");
|
||||
};
|
||||
};
|
||||
^this.checkValidInputs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,41 +1,41 @@
|
||||
FluidMessageResponse : Object
|
||||
{
|
||||
//selectors is an array of functions
|
||||
//my cunning thought is that those that need extra data (e..g numbers()) can
|
||||
//use partial applicaiton
|
||||
*collectArgs{ |selectors,a|
|
||||
var response = [];
|
||||
var idx = 0;
|
||||
selectors.do{ |selector|
|
||||
var newThings;
|
||||
# newThings,idx = selector.value(a, idx);
|
||||
response = response ++ newThings;
|
||||
};
|
||||
//selectors is an array of functions
|
||||
//my cunning thought is that those that need extra data (e..g numbers()) can
|
||||
//use partial applicaiton
|
||||
*collectArgs{ |selectors,a|
|
||||
var response = [];
|
||||
var idx = 0;
|
||||
selectors.do{ |selector|
|
||||
var newThings;
|
||||
# newThings,idx = selector.value(a, idx);
|
||||
response = response ++ newThings;
|
||||
};
|
||||
|
||||
if(response.size == 1,
|
||||
{^response[0]},{^response})
|
||||
}
|
||||
if(response.size == 1,
|
||||
{^response[0]},{^response})
|
||||
}
|
||||
|
||||
*string{ |a, offset|
|
||||
^[a]
|
||||
}
|
||||
*string{ |a, offset|
|
||||
^[a]
|
||||
}
|
||||
|
||||
*strings {|a,offset|
|
||||
//TODO add an n argument as with numbers() to make this less omnivorous
|
||||
^[a.drop(offset)];
|
||||
}
|
||||
*strings {|a,offset|
|
||||
//TODO add an n argument as with numbers() to make this less omnivorous
|
||||
^[a.drop(offset)];
|
||||
}
|
||||
|
||||
*numbers{ |a, n, offset|
|
||||
n = n ? a.size - offset; //send n = nil to consume everything
|
||||
^[a.copyRange(offset, offset + n),offset + n]
|
||||
}
|
||||
*numbers{ |a, n, offset|
|
||||
n = n ? a.size - offset; //send n = nil to consume everything
|
||||
^[a.copyRange(offset, offset + n),offset + n]
|
||||
}
|
||||
|
||||
*number{ |a,offset|
|
||||
^[a[offset]];
|
||||
}
|
||||
*number{ |a,offset|
|
||||
^[a[offset]];
|
||||
}
|
||||
|
||||
*buffer{ |a,server,offset|
|
||||
server = server ? Server.default ;
|
||||
^[Buffer.cachedBufferAt(server, a[offset]), offset + 1]
|
||||
}
|
||||
*buffer{ |a,server,offset|
|
||||
server = server ? Server.default ;
|
||||
^[Buffer.cachedBufferAt(server, a[offset]), offset + 1]
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,103 +1,103 @@
|
||||
FluidNormalize : FluidModelObject {
|
||||
|
||||
var <>min, <>max;
|
||||
var <>min, <>max;
|
||||
|
||||
*new {|server, min = 0, max = 1|
|
||||
^super.new(server,[min,max])
|
||||
.min_(min).max_(max);
|
||||
.min_(min).max_(max);
|
||||
}
|
||||
|
||||
prGetParams{
|
||||
^[this.id, this.min,this.max,-1,-1];
|
||||
}
|
||||
prGetParams{
|
||||
^[this.id, this.min,this.max,-1,-1];
|
||||
}
|
||||
|
||||
|
||||
fitMsg{|dataSet|
|
||||
^this.prMakeMsg(\fit,id,dataSet.id)
|
||||
}
|
||||
fitMsg{|dataSet|
|
||||
^this.prMakeMsg(\fit,id,dataSet.id)
|
||||
}
|
||||
|
||||
fit{|dataSet, action|
|
||||
actions[\fit] = [nil,action];
|
||||
actions[\fit] = [nil,action];
|
||||
this.prSendMsg(this.fitMsg(dataSet));
|
||||
}
|
||||
|
||||
transformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\transform,id,sourceDataSet.id,destDataSet.id);
|
||||
}
|
||||
transformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\transform,id,sourceDataSet.id,destDataSet.id);
|
||||
}
|
||||
|
||||
transform{|sourceDataSet, destDataSet, action|
|
||||
actions[\transform] = [nil,action];
|
||||
this.prSendMsg(this.transformMsg(sourceDataSet, destDataSet));
|
||||
this.prSendMsg(this.transformMsg(sourceDataSet, destDataSet));
|
||||
}
|
||||
|
||||
fitTransformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\fitTransform,id,sourceDataSet.id,destDataSet.id)
|
||||
}
|
||||
fitTransformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\fitTransform,id,sourceDataSet.id,destDataSet.id)
|
||||
}
|
||||
|
||||
fitTransform{|sourceDataSet, destDataSet, action|
|
||||
actions[\fitTransform] = [nil,action];
|
||||
actions[\fitTransform] = [nil,action];
|
||||
this.prSendMsg(this.fitTransformMsg(sourceDataSet, destDataSet));
|
||||
}
|
||||
|
||||
transformPointMsg{|sourceBuffer, destBuffer|
|
||||
^this.prMakeMsg(\transformPoint,id,
|
||||
this.prEncodeBuffer(sourceBuffer),
|
||||
this.prEncodeBuffer(destBuffer),
|
||||
["/b_query",destBuffer.asUGenInput]
|
||||
);
|
||||
}
|
||||
transformPointMsg{|sourceBuffer, destBuffer|
|
||||
^this.prMakeMsg(\transformPoint,id,
|
||||
this.prEncodeBuffer(sourceBuffer),
|
||||
this.prEncodeBuffer(destBuffer),
|
||||
["/b_query",destBuffer.asUGenInput]
|
||||
);
|
||||
}
|
||||
|
||||
transformPoint{|sourceBuffer, destBuffer, action|
|
||||
actions[\transformPoint] = [nil,{action.value(destBuffer)}];
|
||||
this.prSendMsg(this.transformPointMsg(sourceBuffer, destBuffer));
|
||||
actions[\transformPoint] = [nil,{action.value(destBuffer)}];
|
||||
this.prSendMsg(this.transformPointMsg(sourceBuffer, destBuffer));
|
||||
}
|
||||
|
||||
inverseTransformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\inverseTransform,id,sourceDataSet.id,destDataSet.id);
|
||||
}
|
||||
inverseTransformMsg{|sourceDataSet, destDataSet|
|
||||
^this.prMakeMsg(\inverseTransform,id,sourceDataSet.id,destDataSet.id);
|
||||
}
|
||||
|
||||
inverseTransform{|sourceDataSet, destDataSet, action|
|
||||
actions[\inverseTransform] = [nil,action];
|
||||
this.prSendMsg(this.inverseTransformMsg(sourceDataSet, destDataSet));
|
||||
this.prSendMsg(this.inverseTransformMsg(sourceDataSet, destDataSet));
|
||||
}
|
||||
|
||||
inverseTransformPointMsg{|sourceBuffer, destBuffer|
|
||||
^this.prMakeMsg(\inverseTransformPoint,id,
|
||||
this.prEncodeBuffer(sourceBuffer),
|
||||
this.prEncodeBuffer(destBuffer),
|
||||
["/b_query",destBuffer.asUGenInput]
|
||||
);
|
||||
}
|
||||
inverseTransformPointMsg{|sourceBuffer, destBuffer|
|
||||
^this.prMakeMsg(\inverseTransformPoint,id,
|
||||
this.prEncodeBuffer(sourceBuffer),
|
||||
this.prEncodeBuffer(destBuffer),
|
||||
["/b_query",destBuffer.asUGenInput]
|
||||
);
|
||||
}
|
||||
|
||||
inverseTransformPoint{|sourceBuffer, destBuffer, action|
|
||||
actions[\inverseTransformPoint] = [nil,{action.value(destBuffer)}];
|
||||
this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer));
|
||||
actions[\inverseTransformPoint] = [nil,{action.value(destBuffer)}];
|
||||
this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer));
|
||||
}
|
||||
|
||||
kr{|trig, inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0|
|
||||
kr{|trig, inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0|
|
||||
|
||||
min = min ? this.min;
|
||||
max = max ? this.max;
|
||||
min = min ? this.min;
|
||||
max = max ? this.max;
|
||||
|
||||
this.min_(min).max_(max);
|
||||
this.min_(min).max_(max);
|
||||
|
||||
^FluidNormalizeQuery.kr(trig,
|
||||
this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.min, this.max, invert);
|
||||
}
|
||||
^FluidNormalizeQuery.kr(trig,
|
||||
this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.min, this.max, invert);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
FluidNormalizeQuery : FluidRTMultiOutUGen {
|
||||
|
||||
*kr{ |trig, model,inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0|
|
||||
*kr{ |trig, model,inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0|
|
||||
// inputBuffer.asUGenInput.postln;
|
||||
^this.multiNew('control',trig, model.asUGenInput,
|
||||
min,max,invert,
|
||||
inputBuffer.asUGenInput, outputBuffer.asUGenInput)
|
||||
}
|
||||
^this.multiNew('control',trig, model.asUGenInput,
|
||||
min,max,invert,
|
||||
inputBuffer.asUGenInput, outputBuffer.asUGenInput)
|
||||
}
|
||||
|
||||
init { arg ... theInputs;
|
||||
init { arg ... theInputs;
|
||||
inputs = theInputs;
|
||||
^this.initOutputs(1, rate);
|
||||
}
|
||||
|
||||
@ -1,44 +1,44 @@
|
||||
FluidPitch : FluidRTMultiOutUGen {
|
||||
|
||||
const <features=#[\pitch, \confidence];
|
||||
classvar featuresLookup;
|
||||
const <features=#[\pitch, \confidence];
|
||||
classvar featuresLookup;
|
||||
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidPitch -" + sym + "is not a recognised option").postln}
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidPitch -" + sym + "is not a recognised option").postln}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
|
||||
|
||||
*kr { arg in = 0, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1;
|
||||
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
|
||||
^this.multiNew('control', in.asAudioRateInput(this), selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize);
|
||||
}
|
||||
|
||||
init {arg ...theInputs;
|
||||
var numChannels;
|
||||
var numChannels;
|
||||
inputs = theInputs;
|
||||
numChannels = inputs.at(1).asBinaryDigits.sum;
|
||||
numChannels = inputs.at(1).asBinaryDigits.sum;
|
||||
^this.initOutputs(numChannels,rate);
|
||||
}
|
||||
|
||||
checkInputs {
|
||||
if(inputs.at(9).rate != 'scalar') {
|
||||
^(": maxFFTSize cannot be modulated.");
|
||||
};
|
||||
};
|
||||
^this.checkValidInputs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,346 +1,346 @@
|
||||
FluidServerObject
|
||||
{
|
||||
classvar serverCaches;
|
||||
classvar count;
|
||||
classvar persistent = true;
|
||||
var <server,<id;
|
||||
|
||||
*version{|server|
|
||||
server ?? {server = Server.default};
|
||||
server.sendMsg("/cmd","/"++this.objectClassName++'/version');
|
||||
}
|
||||
|
||||
*initClass {
|
||||
serverCaches = IdentityDictionary.new;
|
||||
count = 0;
|
||||
ServerBoot.add({serverCaches[this]!?{serverCaches[this].cache.put(Server.internal,nil);}},Server.internal);
|
||||
}
|
||||
|
||||
*initCache {|server|
|
||||
serverCaches[this] ?? { serverCaches[this] = FluidServerCache.new};
|
||||
|
||||
if(server === Server.internal and: serverCaches[this].cache[Server.internal].isNil)
|
||||
{
|
||||
this.flush(Server.internal)
|
||||
};
|
||||
|
||||
serverCaches[this].initCache(server);
|
||||
NotificationCenter.register(server,\newAllocators,this,{ count = 0; });
|
||||
}
|
||||
|
||||
*newMsg{|id, params|
|
||||
params = params !? {params.collect(_.asUGenInput)};
|
||||
^this.prMakeMsg(\new,id,*params);
|
||||
}
|
||||
|
||||
*new{ |server, id, params, action, callNew = true|
|
||||
var newObj;
|
||||
server ?? {server = Server.default};
|
||||
if(server.serverRunning.not){"Server not running".warn};
|
||||
id !? { id = id.asInteger }
|
||||
?? { id = count; count = count + 1; };
|
||||
newObj = super.newCopyArgs(server,id,action);
|
||||
// params.postln;
|
||||
if(callNew) {server.listSendMsg(this.newMsg(id,params))};
|
||||
^newObj.cache
|
||||
}
|
||||
|
||||
cache {
|
||||
this.class.initCache(server);
|
||||
serverCaches[this.class].put(server,this.id,this);
|
||||
}
|
||||
|
||||
uncache{
|
||||
serverCaches[this.class].remove(server,id);
|
||||
}
|
||||
|
||||
*prMakeMsg{|msg,id...args|
|
||||
var commandName = "%/%".format(this.objectClassName,msg);
|
||||
^['/cmd', this.objectClassName,commandName,id].addAll(args);
|
||||
}
|
||||
|
||||
prMakeMsg{|msg,id...args| ^this.class.prMakeMsg(msg,id,*args) }
|
||||
|
||||
freeMsg {
|
||||
var msg;
|
||||
id ?? {" % already freed".format(this.class.name).warn; ^nil};
|
||||
this.uncache;
|
||||
msg = this.prMakeMsg(\free,id);
|
||||
id = nil;
|
||||
^msg;
|
||||
}
|
||||
|
||||
free{
|
||||
var msg = this.freeMsg;
|
||||
msg !? {server.listSendMsg(msg)} ?? {^nil};
|
||||
}
|
||||
|
||||
*freeAll{|server|
|
||||
serverCaches[this] !? {|cache|
|
||||
cache.clearCache(server ? Server.default);
|
||||
};
|
||||
count = 0;
|
||||
}
|
||||
|
||||
asUGenInput{ ^id }
|
||||
|
||||
asString {
|
||||
^"%(%)".format(this.class.name,id).asString;
|
||||
}
|
||||
|
||||
asSymbol {
|
||||
^id.asSymbol
|
||||
}
|
||||
|
||||
*objectClassName { ^this.name.asSymbol }
|
||||
|
||||
*flushMsg { ^['/cmd',this.objectClassName ++ '/flush'] }
|
||||
|
||||
*flush {|server| server.listSendMsg(this.flushMsg)}
|
||||
classvar serverCaches;
|
||||
classvar count;
|
||||
classvar persistent = true;
|
||||
var <server,<id;
|
||||
|
||||
*version{|server|
|
||||
server ?? {server = Server.default};
|
||||
server.sendMsg("/cmd","/"++this.objectClassName++'/version');
|
||||
}
|
||||
|
||||
*initClass {
|
||||
serverCaches = IdentityDictionary.new;
|
||||
count = 0;
|
||||
ServerBoot.add({serverCaches[this]!?{serverCaches[this].cache.put(Server.internal,nil);}},Server.internal);
|
||||
}
|
||||
|
||||
*initCache {|server|
|
||||
serverCaches[this] ?? { serverCaches[this] = FluidServerCache.new};
|
||||
|
||||
if(server === Server.internal and: serverCaches[this].cache[Server.internal].isNil)
|
||||
{
|
||||
this.flush(Server.internal)
|
||||
};
|
||||
|
||||
serverCaches[this].initCache(server);
|
||||
NotificationCenter.register(server,\newAllocators,this,{ count = 0; });
|
||||
}
|
||||
|
||||
*newMsg{|id, params|
|
||||
params = params !? {params.collect(_.asUGenInput)};
|
||||
^this.prMakeMsg(\new,id,*params);
|
||||
}
|
||||
|
||||
*new{ |server, id, params, action, callNew = true|
|
||||
var newObj;
|
||||
server ?? {server = Server.default};
|
||||
if(server.serverRunning.not){"Server not running".warn};
|
||||
id !? { id = id.asInteger }
|
||||
?? { id = count; count = count + 1; };
|
||||
newObj = super.newCopyArgs(server,id,action);
|
||||
// params.postln;
|
||||
if(callNew) {server.listSendMsg(this.newMsg(id,params))};
|
||||
^newObj.cache
|
||||
}
|
||||
|
||||
cache {
|
||||
this.class.initCache(server);
|
||||
serverCaches[this.class].put(server,this.id,this);
|
||||
}
|
||||
|
||||
uncache{
|
||||
serverCaches[this.class].remove(server,id);
|
||||
}
|
||||
|
||||
*prMakeMsg{|msg,id...args|
|
||||
var commandName = "%/%".format(this.objectClassName,msg);
|
||||
^['/cmd', this.objectClassName,commandName,id].addAll(args);
|
||||
}
|
||||
|
||||
prMakeMsg{|msg,id...args| ^this.class.prMakeMsg(msg,id,*args) }
|
||||
|
||||
freeMsg {
|
||||
var msg;
|
||||
id ?? {" % already freed".format(this.class.name).warn; ^nil};
|
||||
this.uncache;
|
||||
msg = this.prMakeMsg(\free,id);
|
||||
id = nil;
|
||||
^msg;
|
||||
}
|
||||
|
||||
free{
|
||||
var msg = this.freeMsg;
|
||||
msg !? {server.listSendMsg(msg)} ?? {^nil};
|
||||
}
|
||||
|
||||
*freeAll{|server|
|
||||
serverCaches[this] !? {|cache|
|
||||
cache.clearCache(server ? Server.default);
|
||||
};
|
||||
count = 0;
|
||||
}
|
||||
|
||||
asUGenInput{ ^id }
|
||||
|
||||
asString {
|
||||
^"%(%)".format(this.class.name,id).asString;
|
||||
}
|
||||
|
||||
asSymbol {
|
||||
^id.asSymbol
|
||||
}
|
||||
|
||||
*objectClassName { ^this.name.asSymbol }
|
||||
|
||||
*flushMsg { ^['/cmd',this.objectClassName ++ '/flush'] }
|
||||
|
||||
*flush {|server| server.listSendMsg(this.flushMsg)}
|
||||
}
|
||||
|
||||
FluidBufProcessor : FluidServerObject
|
||||
{
|
||||
var <processAction;
|
||||
var <outputBuffers;
|
||||
var <freeWhenDone;
|
||||
classvar responder;
|
||||
classvar count;
|
||||
|
||||
*cmdPeriod {
|
||||
serverCaches[this] !? {|cache|
|
||||
cache.doAll{|processor| processor !? { processor.free;} };
|
||||
serverCaches[this] = nil;
|
||||
};
|
||||
count = 0;
|
||||
}
|
||||
|
||||
*initCache {|server|
|
||||
// "initcache".postln;
|
||||
// this.done.postln;
|
||||
super.initCache(server);
|
||||
CmdPeriod.add(this);
|
||||
if(serverCaches[this].includesKey(server,\processResponder).not)
|
||||
{
|
||||
serverCaches[this].put(server,\processResponder,OSCFunc({|m|
|
||||
var id = m.last.asInteger;
|
||||
// "I'm in the pizza hut".postln;
|
||||
serverCaches[this].at(server,id) !? {|p|
|
||||
// "I'm in the taco bell".postln ;
|
||||
p!?{
|
||||
p.processAction!?{|a|
|
||||
var bufs = p.outputBuffers;
|
||||
|
||||
bufs = bufs.collect{|b|
|
||||
if(b.isKindOf(Buffer))
|
||||
{b}
|
||||
{Buffer.cachedBufferAt(server,b)};
|
||||
};
|
||||
a.valueArray(valueArray(bufs));
|
||||
};
|
||||
if(p.freeWhenDone){p.free};
|
||||
}
|
||||
}
|
||||
},this.done ,server.addr).fix)
|
||||
}
|
||||
}
|
||||
|
||||
*new {|server,id,outputBuffers|
|
||||
^super.new(server,id, nil, nil,false).init(outputBuffers);
|
||||
}
|
||||
|
||||
init{ |ob|
|
||||
outputBuffers = ob;
|
||||
}
|
||||
|
||||
*done {
|
||||
^"/%/process".format(this.objectClassName);
|
||||
}
|
||||
|
||||
wait {
|
||||
var condition = Condition.new;
|
||||
id ?? {Error("% already freed".format(this.class.name)).throw};
|
||||
OSCFunc({
|
||||
condition.unhang;
|
||||
},this.class.done,server.addr,argTemplate:[nil,id]).oneShot;
|
||||
condition.hang;
|
||||
}
|
||||
|
||||
processMsg {|params|
|
||||
var msg;
|
||||
var completionMsg = outputBuffers !? {
|
||||
[["/sync"]] ++ outputBuffers.collect{|b| ["/b_query", b.asUGenInput]}
|
||||
} ?? {[]};
|
||||
|
||||
// completionMsg.postln;
|
||||
id ?? {Error("% already freed".format(this.class.name)).throw};
|
||||
msg = this.prMakeMsg(\processNew,id).addAll(params).add(completionMsg);
|
||||
// msg.postln;
|
||||
^msg;
|
||||
}
|
||||
|
||||
processList { |params,shouldFree,action|
|
||||
freeWhenDone = shouldFree;
|
||||
processAction = action;
|
||||
params = params.collect(_.asUGenInput);
|
||||
server.listSendMsg(this.processMsg(params));
|
||||
}
|
||||
|
||||
cancelMsg{
|
||||
id ?? {Error("% already freed".format(this.class.name)).throw};
|
||||
^this.prMakeMsg(\cancel, id);
|
||||
}
|
||||
|
||||
cancel{
|
||||
server.listSendMsg(this.cancelMsg);
|
||||
}
|
||||
|
||||
kr{ ^FluidProxyUgen.kr(this.class.objectClassName ++ "Monitor",id) }
|
||||
var <processAction;
|
||||
var <outputBuffers;
|
||||
var <freeWhenDone;
|
||||
classvar responder;
|
||||
classvar count;
|
||||
|
||||
*cmdPeriod {
|
||||
serverCaches[this] !? {|cache|
|
||||
cache.doAll{|processor| processor !? { processor.free;} };
|
||||
serverCaches[this] = nil;
|
||||
};
|
||||
count = 0;
|
||||
}
|
||||
|
||||
*initCache {|server|
|
||||
// "initcache".postln;
|
||||
// this.done.postln;
|
||||
super.initCache(server);
|
||||
CmdPeriod.add(this);
|
||||
if(serverCaches[this].includesKey(server,\processResponder).not)
|
||||
{
|
||||
serverCaches[this].put(server,\processResponder,OSCFunc({|m|
|
||||
var id = m.last.asInteger;
|
||||
// "I'm in the pizza hut".postln;
|
||||
serverCaches[this].at(server,id) !? {|p|
|
||||
// "I'm in the taco bell".postln ;
|
||||
p!?{
|
||||
p.processAction!?{|a|
|
||||
var bufs = p.outputBuffers;
|
||||
|
||||
bufs = bufs.collect{|b|
|
||||
if(b.isKindOf(Buffer))
|
||||
{b}
|
||||
{Buffer.cachedBufferAt(server,b)};
|
||||
};
|
||||
a.valueArray(valueArray(bufs));
|
||||
};
|
||||
if(p.freeWhenDone){p.free};
|
||||
}
|
||||
}
|
||||
},this.done ,server.addr).fix)
|
||||
}
|
||||
}
|
||||
|
||||
*new {|server,id,outputBuffers|
|
||||
^super.new(server,id, nil, nil,false).init(outputBuffers);
|
||||
}
|
||||
|
||||
init{ |ob|
|
||||
outputBuffers = ob;
|
||||
}
|
||||
|
||||
*done {
|
||||
^"/%/process".format(this.objectClassName);
|
||||
}
|
||||
|
||||
wait {
|
||||
var condition = Condition.new;
|
||||
id ?? {Error("% already freed".format(this.class.name)).throw};
|
||||
OSCFunc({
|
||||
condition.unhang;
|
||||
},this.class.done,server.addr,argTemplate:[nil,id]).oneShot;
|
||||
condition.hang;
|
||||
}
|
||||
|
||||
processMsg {|params|
|
||||
var msg;
|
||||
var completionMsg = outputBuffers !? {
|
||||
[["/sync"]] ++ outputBuffers.collect{|b| ["/b_query", b.asUGenInput]}
|
||||
} ?? {[]};
|
||||
|
||||
// completionMsg.postln;
|
||||
id ?? {Error("% already freed".format(this.class.name)).throw};
|
||||
msg = this.prMakeMsg(\processNew,id).addAll(params).add(completionMsg);
|
||||
// msg.postln;
|
||||
^msg;
|
||||
}
|
||||
|
||||
processList { |params,shouldFree,action|
|
||||
freeWhenDone = shouldFree;
|
||||
processAction = action;
|
||||
params = params.collect(_.asUGenInput);
|
||||
server.listSendMsg(this.processMsg(params));
|
||||
}
|
||||
|
||||
cancelMsg{
|
||||
id ?? {Error("% already freed".format(this.class.name)).throw};
|
||||
^this.prMakeMsg(\cancel, id);
|
||||
}
|
||||
|
||||
cancel{
|
||||
server.listSendMsg(this.cancelMsg);
|
||||
}
|
||||
|
||||
kr{ ^FluidProxyUgen.kr(this.class.objectClassName ++ "Monitor",id) }
|
||||
}
|
||||
|
||||
FluidOSCPatternInversion : OSCMessageDispatcher
|
||||
{
|
||||
value {|msg, time, addr, recvPort|
|
||||
var msgpath = msg[0].asSymbol;
|
||||
active.keysValuesDo({|key, func|
|
||||
if(msgpath.matchOSCAddressPattern(key), {func.value(msg, time, addr, recvPort);});
|
||||
})
|
||||
}
|
||||
value {|msg, time, addr, recvPort|
|
||||
var msgpath = msg[0].asSymbol;
|
||||
active.keysValuesDo({|key, func|
|
||||
if(msgpath.matchOSCAddressPattern(key), {func.value(msg, time, addr, recvPort);});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FluidDataObject : FluidServerObject
|
||||
{
|
||||
classvar postResponse;
|
||||
|
||||
var <actions;
|
||||
|
||||
*initClass{
|
||||
postResponse = _.postln;
|
||||
}
|
||||
|
||||
*initCache{ |server|
|
||||
super.initCache(server);
|
||||
if(serverCaches[this].includesKey(server,\messageResponder).not)
|
||||
{
|
||||
serverCaches[this].put(server,\messageResponder,OSCFunc.new({|m|
|
||||
var id = m[1].asInteger;
|
||||
var method;
|
||||
serverCaches[this].at(server,id) !? { |p|
|
||||
method = m[0].asString.findRegexp("/"++this.name++"/(.*)")[1][1].asSymbol;
|
||||
p.actions[method] !? {|a|
|
||||
//two items: parser and action
|
||||
var parser = a[0];
|
||||
var action = a[1];
|
||||
var result = FluidMessageResponse.collectArgs(parser,m[2..]);
|
||||
action.value(result);
|
||||
}
|
||||
}
|
||||
},'/' ++ this.objectClassName ++ '/*',server.addr, dispatcher:FluidOSCPatternInversion.new).fix)
|
||||
}
|
||||
}
|
||||
|
||||
*new{|server...args|
|
||||
// args.flatten.postln;
|
||||
^super.new(server,params:args.flatten).init;
|
||||
}
|
||||
|
||||
*cachedInstanceAt{|server,id|
|
||||
this.initCache(server);
|
||||
^serverCaches[this].at(server,id);
|
||||
}
|
||||
|
||||
init {
|
||||
actions = IdentityDictionary.new;
|
||||
}
|
||||
|
||||
prEncodeBuffer { |buf| buf !? {^buf.asUGenInput} ?? {^-1} }
|
||||
|
||||
prSendMsg {|msg| server !? {server.listSendMsg(msg)};}
|
||||
|
||||
colsMsg { ^this.prMakeMsg(\cols,id);}
|
||||
|
||||
cols{ |action=(postResponse)|
|
||||
actions[\cols] = [numbers(FluidMessageResponse,_,1,_),action];
|
||||
this.prSendMsg(this.colsMsg)
|
||||
}
|
||||
|
||||
readMsg { |filename| ^this.prMakeMsg(\read,id,filename.asString);}
|
||||
|
||||
read{|filename, action|
|
||||
actions[\read] = [nil,action];
|
||||
this.prSendMsg(this.readMsg(filename));
|
||||
}
|
||||
|
||||
writeMsg {|filename|
|
||||
// ^['/cmd',this.class.name ++ '/write',id,filename.asString]
|
||||
^this.prMakeMsg(\write,id,filename.asString);
|
||||
}
|
||||
|
||||
write{|filename, action|
|
||||
actions[\write] = [nil,action];
|
||||
this.prSendMsg(this.writeMsg(filename));
|
||||
}
|
||||
|
||||
sizeMsg{
|
||||
// ^['/cmd',this.class.name ++ '/size',id]
|
||||
^this.prMakeMsg(\size,id);
|
||||
}
|
||||
|
||||
size {|action=(postResponse)|
|
||||
actions[\size] = [numbers(FluidMessageResponse,_,1,_),action];
|
||||
this.prSendMsg(this.sizeMsg);
|
||||
}
|
||||
classvar postResponse;
|
||||
|
||||
var <actions;
|
||||
|
||||
*initClass{
|
||||
postResponse = _.postln;
|
||||
}
|
||||
|
||||
*initCache{ |server|
|
||||
super.initCache(server);
|
||||
if(serverCaches[this].includesKey(server,\messageResponder).not)
|
||||
{
|
||||
serverCaches[this].put(server,\messageResponder,OSCFunc.new({|m|
|
||||
var id = m[1].asInteger;
|
||||
var method;
|
||||
serverCaches[this].at(server,id) !? { |p|
|
||||
method = m[0].asString.findRegexp("/"++this.name++"/(.*)")[1][1].asSymbol;
|
||||
p.actions[method] !? {|a|
|
||||
//two items: parser and action
|
||||
var parser = a[0];
|
||||
var action = a[1];
|
||||
var result = FluidMessageResponse.collectArgs(parser,m[2..]);
|
||||
action.value(result);
|
||||
}
|
||||
}
|
||||
},'/' ++ this.objectClassName ++ '/*',server.addr, dispatcher:FluidOSCPatternInversion.new).fix)
|
||||
}
|
||||
}
|
||||
|
||||
*new{|server...args|
|
||||
// args.flatten.postln;
|
||||
^super.new(server,params:args.flatten).init;
|
||||
}
|
||||
|
||||
*cachedInstanceAt{|server,id|
|
||||
this.initCache(server);
|
||||
^serverCaches[this].at(server,id);
|
||||
}
|
||||
|
||||
init {
|
||||
actions = IdentityDictionary.new;
|
||||
}
|
||||
|
||||
prEncodeBuffer { |buf| buf !? {^buf.asUGenInput} ?? {^-1} }
|
||||
|
||||
prSendMsg {|msg| server !? {server.listSendMsg(msg)};}
|
||||
|
||||
colsMsg { ^this.prMakeMsg(\cols,id);}
|
||||
|
||||
cols{ |action=(postResponse)|
|
||||
actions[\cols] = [numbers(FluidMessageResponse,_,1,_),action];
|
||||
this.prSendMsg(this.colsMsg)
|
||||
}
|
||||
|
||||
readMsg { |filename| ^this.prMakeMsg(\read,id,filename.asString);}
|
||||
|
||||
read{|filename, action|
|
||||
actions[\read] = [nil,action];
|
||||
this.prSendMsg(this.readMsg(filename));
|
||||
}
|
||||
|
||||
writeMsg {|filename|
|
||||
// ^['/cmd',this.class.name ++ '/write',id,filename.asString]
|
||||
^this.prMakeMsg(\write,id,filename.asString);
|
||||
}
|
||||
|
||||
write{|filename, action|
|
||||
actions[\write] = [nil,action];
|
||||
this.prSendMsg(this.writeMsg(filename));
|
||||
}
|
||||
|
||||
sizeMsg{
|
||||
// ^['/cmd',this.class.name ++ '/size',id]
|
||||
^this.prMakeMsg(\size,id);
|
||||
}
|
||||
|
||||
size {|action=(postResponse)|
|
||||
actions[\size] = [numbers(FluidMessageResponse,_,1,_),action];
|
||||
this.prSendMsg(this.sizeMsg);
|
||||
}
|
||||
}
|
||||
|
||||
FluidModelObject : FluidDataObject
|
||||
{
|
||||
prGetParams{
|
||||
"Subclass should provide this".throw;
|
||||
}
|
||||
|
||||
prUpdateStateMsg{
|
||||
var params = this.prGetParams.value.collect(_.asUGenInput);
|
||||
^this.prMakeMsg(\setParams,id) ++ params;
|
||||
}
|
||||
|
||||
prSendMsg {|msg|
|
||||
//These need to happen sequentially, but not simultaneously
|
||||
//sending as a bundle makes reasoning about timing w/r/t other
|
||||
//commands more awkward, unless we set the offet to 0 (in which case,
|
||||
//noisy 'late' messages)
|
||||
super.prSendMsg(this.prUpdateStateMsg);
|
||||
super.prSendMsg(msg);
|
||||
}
|
||||
prGetParams{
|
||||
"Subclass should provide this".throw;
|
||||
}
|
||||
|
||||
prUpdateStateMsg{
|
||||
var params = this.prGetParams.value.collect(_.asUGenInput);
|
||||
^this.prMakeMsg(\setParams,id) ++ params;
|
||||
}
|
||||
|
||||
prSendMsg {|msg|
|
||||
//These need to happen sequentially, but not simultaneously
|
||||
//sending as a bundle makes reasoning about timing w/r/t other
|
||||
//commands more awkward, unless we set the offet to 0 (in which case,
|
||||
//noisy 'late' messages)
|
||||
super.prSendMsg(this.prUpdateStateMsg);
|
||||
super.prSendMsg(msg);
|
||||
}
|
||||
}
|
||||
|
||||
FluidRealTimeModel : FluidModelObject
|
||||
{
|
||||
*new{ |server, params|
|
||||
^super.new(server,params++[-1,-1]);
|
||||
}
|
||||
*new{ |server, params|
|
||||
^super.new(server,params++[-1,-1]);
|
||||
}
|
||||
}
|
||||
|
||||
FluidRTQuery : FluidProxyUgen
|
||||
{
|
||||
*kr{ |trig,obj...args|
|
||||
^super.kr(this.name,trig,obj.asUGenInput, *args)
|
||||
}
|
||||
*kr{ |trig,obj...args|
|
||||
^super.kr(this.name,trig,obj.asUGenInput, *args)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FluidRTUGen : UGen
|
||||
{
|
||||
*version{|server|
|
||||
server ?? {server = Server.default};
|
||||
server.sendMsg("/cmd","/"++this.name++'/version');
|
||||
}
|
||||
*version{|server|
|
||||
server ?? {server = Server.default};
|
||||
server.sendMsg("/cmd","/"++this.name++'/version');
|
||||
}
|
||||
}
|
||||
|
||||
FluidRTMultiOutUGen : MultiOutUGen
|
||||
{
|
||||
*version{|server|
|
||||
server ?? {server = Server.default};
|
||||
server.sendMsg("/cmd","/"++this.name++'/version');
|
||||
}
|
||||
*version{|server|
|
||||
server ?? {server = Server.default};
|
||||
server.sendMsg("/cmd","/"++this.name++'/version');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,44 +1,44 @@
|
||||
FluidSpectralShape : FluidRTMultiOutUGen {
|
||||
|
||||
const <features=#[\centroid,\spread,\skewness,\kurtosis,\rolloff,\flatness,\crest];
|
||||
classvar featuresLookup;
|
||||
const <features=#[\centroid,\spread,\skewness,\kurtosis,\rolloff,\flatness,\crest];
|
||||
classvar featuresLookup;
|
||||
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidSpectralShape -" + sym + "is not a recognised option").postln}
|
||||
*initClass {
|
||||
featuresLookup = Dictionary.with(*this.features.collect{|x,i| x->(1<<i)});
|
||||
}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
*prWarnUnrecognised {|sym| ("WARNING: FluidSpectralShape -" + sym + "is not a recognised option").postln}
|
||||
|
||||
*prProcessSelect {|a|
|
||||
var bits;
|
||||
a.asBag.countsDo{|item,count,i|
|
||||
if(count > 1) { ("Option '" ++ item ++ "' is repeated").warn};
|
||||
};
|
||||
bits = a.collect{ |sym|
|
||||
(featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0})
|
||||
}.reduce{|x,y| x | y};
|
||||
^bits
|
||||
}
|
||||
|
||||
|
||||
*kr { arg in = 0, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1;
|
||||
*kr { arg in = 0, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1;
|
||||
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)};
|
||||
|
||||
^this.multiNew('control', in.asAudioRateInput(this), selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize);
|
||||
^this.multiNew('control', in.asAudioRateInput(this), selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize);
|
||||
}
|
||||
|
||||
init {arg ...theInputs;
|
||||
var numChannels;
|
||||
var numChannels;
|
||||
inputs = theInputs;
|
||||
numChannels = inputs.at(1).asBinaryDigits.sum;
|
||||
numChannels = inputs.at(1).asBinaryDigits.sum;
|
||||
^this.initOutputs(numChannels,rate);
|
||||
}
|
||||
|
||||
checkInputs {
|
||||
if(inputs.at(10).rate != 'scalar') {
|
||||
^(": maxFFTSize cannot be modulated.");
|
||||
};
|
||||
};
|
||||
^this.checkValidInputs;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue