Add a version method to all objects

nix
Owen Green 5 years ago
parent e0ee799f5f
commit 08fa6ce1a7

@ -1,4 +1,4 @@
FluidAmpGate : UGen { FluidAmpGate : FluidRTUGen {
*ar { arg in = 0, rampUp = 10, rampDown = 10, onThreshold = -90, offThreshold = -90, minSliceLength = 1, minSilenceLength = 1, minLengthAbove = 1, minLengthBelow = 1, lookBack = 0, lookAhead = 0, highPassFreq = 85, maxSize = 88200; *ar { arg in = 0, rampUp = 10, rampDown = 10, onThreshold = -90, offThreshold = -90, minSliceLength = 1, minSilenceLength = 1, minLengthAbove = 1, minLengthBelow = 1, lookBack = 0, lookAhead = 0, highPassFreq = 85, maxSize = 88200;
^this.multiNew('audio', in.asAudioRateInput(this), rampUp, rampDown, onThreshold, offThreshold, minSliceLength, minSilenceLength, minLengthAbove, minLengthBelow, lookBack, lookAhead, highPassFreq, maxSize) ^this.multiNew('audio', in.asAudioRateInput(this), rampUp, rampDown, onThreshold, offThreshold, minSliceLength, minSilenceLength, minLengthAbove, minLengthBelow, lookBack, lookAhead, highPassFreq, maxSize)
} }

@ -1,4 +1,4 @@
FluidAmpSlice : UGen { FluidAmpSlice : FluidRTUGen {
*ar { arg in = 0, fastRampUp = 1, fastRampDown = 1, slowRampUp = 100, slowRampDown = 100, onThreshold = -144, offThreshold = -144, floor = -144, minSliceLength = 2, highPassFreq = 85; *ar { arg in = 0, fastRampUp = 1, fastRampDown = 1, slowRampUp = 100, slowRampDown = 100, onThreshold = -144, offThreshold = -144, floor = -144, minSliceLength = 2, highPassFreq = 85;
^this.multiNew('audio', in.asAudioRateInput(this), fastRampUp, fastRampDown, slowRampUp, slowRampDown, onThreshold, offThreshold, floor, minSliceLength, highPassFreq) ^this.multiNew('audio', in.asAudioRateInput(this), fastRampUp, fastRampDown, slowRampUp, slowRampDown, onThreshold, offThreshold, floor, minSliceLength, highPassFreq)

@ -1,4 +1,4 @@
FluidAudioTransport : UGen { FluidAudioTransport : FluidRTUGen {
init { |...theInputs| init { |...theInputs|
theInputs; theInputs;

@ -1,4 +1,4 @@
FluidBufNMF : FluidBufProcessor //: UGen { FluidBufNMF : FluidBufProcessor
{ {
*kr {|source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, windowType = 0, randomSeed = -1, trig = 1, blocking = 0| *kr {|source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, windowType = 0, randomSeed = -1, trig = 1, blocking = 0|

@ -1,4 +1,4 @@
FluidHPSS : MultiOutUGen { FluidHPSS : FluidRTMultiOutUGen {
*ar { arg in = 0, harmFilterSize=17, percFilterSize = 31, maskingMode=0, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384, maxHarmFilterSize = 101, maxPercFilterSize = 101; *ar { arg in = 0, harmFilterSize=17, percFilterSize = 31, maskingMode=0, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384, maxHarmFilterSize = 101, maxPercFilterSize = 101;
^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, maxHarmFilterSize, maxPercFilterSize) ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, maxHarmFilterSize, maxPercFilterSize)
} }

@ -1,4 +1,4 @@
FluidLoudness : MultiOutUGen { FluidLoudness : FluidRTMultiOutUGen {
*kr { arg in = 0, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, maxwindowSize = 16384; *kr { arg in = 0, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, maxwindowSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), kWeighting, truePeak, windowSize, hopSize, maxwindowSize); ^this.multiNew('control', in.asAudioRateInput(this), kWeighting, truePeak, windowSize, hopSize, maxwindowSize);
} }

@ -1,4 +1,4 @@
FluidMFCC : MultiOutUGen { FluidMFCC : FluidRTMultiOutUGen {
*kr { arg in = 0, numCoeffs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumCoeffs = 40, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *kr { arg in = 0, numCoeffs = 13, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumCoeffs = 40, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize);

@ -1,4 +1,4 @@
FluidMelBands : MultiOutUGen { FluidMelBands : FluidRTMultiOutUGen {
*kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumBands = 120, normalize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, maxNumBands = 120, normalize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), numBands, minFreq, maxFreq, maxNumBands, normalize, windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('control', in.asAudioRateInput(this), numBands, minFreq, maxFreq, maxNumBands, normalize, windowSize, hopSize, fftSize, maxFFTSize);

@ -1,11 +1,11 @@
FluidMessageTest : UGen { FluidMessageTest : FluidModelObject {
var server; var server;
*kr { |trig = 1, blocking = 0| // *kr { |trig = 1, blocking = 0|
//
^this.multiNew('control', trig, blocking); // ^this.multiNew('control', trig, blocking);
} // }
testReturnStrings { |server, nodeID, action| testReturnStrings { |server, nodeID, action|

@ -1,4 +1,4 @@
FluidNMFFilter : MultiOutUGen { FluidNMFFilter : FluidRTMultiOutUGen {
*ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize);

@ -1,4 +1,4 @@
FluidNMFMatch : MultiOutUGen { FluidNMFMatch : FluidRTMultiOutUGen {
*kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize);

@ -1,4 +1,4 @@
FluidNMFMorph : UGen { FluidNMFMorph : FluidRTUGen {
*ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interp = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interp = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;

@ -11,7 +11,7 @@ FluidNRTProcess : Object{
"FluidNRTProcess: Server not running".throw; "FluidNRTProcess: Server not running".throw;
}); });
if (ugen.isNil){ if (ugen.isNil){
"FluidNRTProcess: UGen is nil".throw; "FluidNRTProcess : FluidRTUGen is nil".throw;
}; };
outputBuffers = outputBuffers.collect{|b| outputBuffers = outputBuffers.collect{|b|
var checked = server.cachedBufferAt(b.asUGenInput); var checked = server.cachedBufferAt(b.asUGenInput);

@ -1,4 +1,4 @@
FluidNoveltySlice : UGen { FluidNoveltySlice : FluidRTUGen {
*ar { arg in = 0, feature = 0, kernelSize = 3, threshold = 0.8, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100; *ar { arg in = 0, feature = 0, kernelSize = 3, threshold = 0.8, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100;
^this.multiNew('audio', in.asAudioRateInput(this), feature, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize) ^this.multiNew('audio', in.asAudioRateInput(this), feature, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize)
} }

@ -1,4 +1,4 @@
FluidOnsetSlice : UGen { FluidOnsetSlice : FluidRTUGen {
*ar { arg in = 0, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *ar { arg in = 0, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('audio', in.asAudioRateInput(this), metric, threshold, minSliceLength, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize) ^this.multiNew('audio', in.asAudioRateInput(this), metric, threshold, minSliceLength, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize)
} }

@ -1,4 +1,4 @@
FluidPitch : MultiOutUGen { FluidPitch : FluidRTMultiOutUGen {
*kr { arg in = 0, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *kr { arg in = 0, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('control', in.asAudioRateInput(this), algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize);

@ -1,4 +1,4 @@
FluidProviderTest : UGen { FluidProviderTest : FluidModelObject {
/* var <> server; /* var <> server;
var <> nodeID; var <> nodeID;
@ -9,19 +9,19 @@ FluidProviderTest : UGen {
}*/ }*/
*kr{ |name,vals| // *kr{ |name,vals|
^this.new1('control',name,vals); // ^this.new1('control',name,vals);
} // }
//
*new1 { |rate, name,vals| // *new1 { |rate, name,vals|
var ascii = name.ascii; // var ascii = name.ascii;
var args; // var args;
vals ?? {vals = []}; // vals ?? {vals = []};
if(vals.isArray.not) {vals = [vals]}; // if(vals.isArray.not) {vals = [vals]};
args = ([rate, ascii.size].addAll(ascii) ++ vals.size).addAll(vals).addAll([1,1]); // args = ([rate, ascii.size].addAll(ascii) ++ vals.size).addAll(vals).addAll([1,1]);
args.postln; // args.postln;
^super.new1(*args); // ^super.new1(*args);
} // }
/* init { |size...chars| /* init { |size...chars|
specialIndex = -1; specialIndex = -1;

@ -1,4 +1,4 @@
FluidSTFTPass : UGen { FluidSTFTPass : FluidRTUGen {
*ar { arg in = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384; *ar { arg in = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384;
^this.multiNew('audio', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize) ^this.multiNew('audio', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize)
} }

@ -5,6 +5,11 @@ FluidServerObject
classvar persistent = true; classvar persistent = true;
var <server,<id; var <server,<id;
*version{|server|
server ?? {server = Server.default};
server.sendMsg("/cmd","/"++this.objectClassName++'/version');
}
*initClass { *initClass {
serverCaches = IdentityDictionary.new; serverCaches = IdentityDictionary.new;
count = 0; count = 0;
@ -320,3 +325,20 @@ FluidRTQuery : FluidProxyUgen
^super.kr(this.name,trig,obj.asUGenInput, *args) ^super.kr(this.name,trig,obj.asUGenInput, *args)
} }
} }
FluidRTUGen : UGen
{
*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');
}
}

@ -1,4 +1,4 @@
FluidSines : MultiOutUGen { FluidSines : FluidRTMultiOutUGen {
*ar { arg in = 0, bandwidth = 76, detectionThreshold = -96, birthLowThreshold = -24, birthHighThreshold = -60, minTrackLen = 15, trackingMethod = 0, trackMagRange = 15, trackFreqRange = 50, trackProb = 0.5, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize=16384; *ar { arg in = 0, bandwidth = 76, detectionThreshold = -96, birthLowThreshold = -24, birthHighThreshold = -60, minTrackLen = 15, trackingMethod = 0, trackMagRange = 15, trackFreqRange = 50, trackProb = 0.5, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize=16384;
^this.multiNew('audio', in.asAudioRateInput(this), bandwidth, detectionThreshold,birthLowThreshold, birthHighThreshold, minTrackLen, trackingMethod, trackMagRange, trackFreqRange, trackProb, windowSize, hopSize, fftSize, maxFFTSize) ^this.multiNew('audio', in.asAudioRateInput(this), bandwidth, detectionThreshold,birthLowThreshold, birthHighThreshold, minTrackLen, trackingMethod, trackMagRange, trackFreqRange, trackProb, windowSize, hopSize, fftSize, maxFFTSize)
} }

@ -1,4 +1,4 @@
FluidSpectralShape : MultiOutUGen { FluidSpectralShape : FluidRTMultiOutUGen {
*kr { arg in = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; *kr { arg in = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384;
^this.multiNew('control', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize); ^this.multiNew('control', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize);

@ -1,24 +1,24 @@
FluidSubscriberTest : UGen { FluidSubscriberTest : FluidModelObject {
var <> providerName; var <> providerName;
var <> nodeID; var <> nodeID;
*kr { |provider| // *kr { |provider|
^this.multiNew('control',provider); // ^this.multiNew('control',provider);
} // }
//
*new1 { |rate, provider| // *new1 { |rate, provider|
var ascii = provider.ascii; // var ascii = provider.ascii;
^super.new1(*[rate, ascii.size].addAll(ascii)); // ^super.new1(*[rate, ascii.size].addAll(ascii));
} // }
//
init { |size...chars| // init { |size...chars|
//Send the number of inputs (size of provider string) as specialIndex, // //Send the number of inputs (size of provider string) as specialIndex,
//so server plugin knows what's going on // //so server plugin knows what's going on
specialIndex = -1; // specialIndex = -1;
inputs = [size].addAll(chars); // inputs = [size].addAll(chars);
providerName = chars.collectAs({|x|x.asInteger.asAscii}, String); // providerName = chars.collectAs({|x|x.asInteger.asAscii}, String);
} // }
providerLookup { |server, nodeID, label, action| providerLookup { |server, nodeID, label, action|
this.prSendMsg(server, nodeID, 'providerLookup', label, action, this.prSendMsg(server, nodeID, 'providerLookup', label, action,

@ -1,4 +1,4 @@
FluidTransientSlice : UGen { FluidTransientSlice : FluidRTUGen {
*ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, windowSize=14, clumpLength=25, minSliceLength = 1000; *ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, windowSize=14, clumpLength=25, minSliceLength = 1000;
^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd ,threshBack, windowSize, clumpLength, minSliceLength) ^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd ,threshBack, windowSize, clumpLength, minSliceLength)
} }

@ -1,4 +1,4 @@
FluidTransients : MultiOutUGen { FluidTransients : FluidRTMultiOutUGen {
*ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, windowSize=14, clumpLength=25; *ar { arg in = 0, order = 20, blockSize = 256, padSize = 128, skew = 0.0, threshFwd = 2.0, threshBack = 1.1, windowSize=14, clumpLength=25;
^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd, threshBack, windowSize, clumpLength) ^this.multiNew('audio', in.asAudioRateInput(this), order, blockSize, padSize, skew, threshFwd, threshBack, windowSize, clumpLength)
} }

Loading…
Cancel
Save