From b833659ee19e7b223e141e5e6d4669c5458df998 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Fri, 1 Apr 2022 09:09:49 +0100 Subject: [PATCH 01/63] ignore more varieties of build folder --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6f98b5ba..5be27201 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -build +build* **/build/* **/.DS_Store release-packaging/Plugins From 65a88ef92d20947c6930f811ad32a8deca724471 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Fri, 1 Apr 2022 09:10:05 +0100 Subject: [PATCH 02/63] deal with some warnings --- include/wrapper/RealTimeBase.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wrapper/RealTimeBase.hpp b/include/wrapper/RealTimeBase.hpp index 885b4079..cd228f23 100644 --- a/include/wrapper/RealTimeBase.hpp +++ b/include/wrapper/RealTimeBase.hpp @@ -174,16 +174,16 @@ struct RealTimeBase } } - void mapControlInputs(SCUnit& unit, Client& client) + void mapControlInputs(SCUnit& unit, Client&) { for (index i = 0; i < unit.mSpecialIndex + 1; ++i) { assert(i <= std::numeric_limits::max()); - mControlInputBuffer[asUnsigned(i)] = unit.in0(static_cast(i)); + mControlInputBuffer[i] = unit.in0(static_cast(i)); } } - void mapControlOutputs(SCUnit& unit, Client& client) + void mapControlOutputs(SCUnit& unit, Client&) { for (index i = 0; i < mControlOutputBuffer.size(); ++i) { From 845ef8449c69e0b5dcdf7b7f04dfa402cef0df41 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Thu, 14 Apr 2022 11:35:49 -0400 Subject: [PATCH 03/63] FluidWaveform 'lineWidth' argument now also affects feature lines --- release-packaging/Classes/FluidWaveform.sc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/release-packaging/Classes/FluidWaveform.sc b/release-packaging/Classes/FluidWaveform.sc index 9e97e28b..4fe40a27 100644 --- a/release-packaging/Classes/FluidWaveform.sc +++ b/release-packaging/Classes/FluidWaveform.sc @@ -128,18 +128,20 @@ FluidWaveformIndicesLayer : FluidViewer { } FluidWaveformFeaturesLayer : FluidViewer { - var featuresBuffer, colors, stackFeatures, normalizeFeaturesIndependently; + var featuresBuffer, colors, stackFeatures, normalizeFeaturesIndependently, lineWidth; *new { - arg featuresBuffer, colors, stackFeatures = false, normalizeFeaturesIndependently = true; - ^super.new.init(featuresBuffer,colors,stackFeatures,normalizeFeaturesIndependently); + arg featuresBuffer, colors, stackFeatures = false, normalizeFeaturesIndependently = true, lineWidth = 1; + ^super.new.init(featuresBuffer,colors,stackFeatures,normalizeFeaturesIndependently,lineWidth); } init { - arg featuresBuffer_, colors_, stackFeatures_ = false, normalizeFeaturesIndependently_ = true; + arg featuresBuffer_, colors_, stackFeatures_ = false, normalizeFeaturesIndependently_ = true, lineWidth_ = 1; featuresBuffer = featuresBuffer_; normalizeFeaturesIndependently = normalizeFeaturesIndependently_; stackFeatures = stackFeatures_; + lineWidth = lineWidth_; + colors = colors_ ?? {this.createCatColors}; // we'll index into it to draw, so just in case the user passed just one color, this will ensure it can be "indexed" into @@ -188,6 +190,7 @@ FluidWaveformFeaturesLayer : FluidViewer { UserView(win,bounds) .drawFunc_({ + Pen.width_(lineWidth); Pen.moveTo(Point(0,channel[0])); channel[1..].do{ arg val, i; @@ -347,7 +350,7 @@ FluidWaveform : FluidViewer { }); if(feature_buf.notNil,{ - this.addFeaturesLayer(feature_buf,this.createCatColors,stackFeatures,normalizeFeaturesIndependently); + this.addFeaturesLayer(feature_buf,this.createCatColors,stackFeatures,normalizeFeaturesIndependently,lineWidth); feature_buf.server.sync; plotImmediately = true; }); @@ -395,8 +398,8 @@ FluidWaveform : FluidViewer { } addFeaturesLayer { - arg featuresBuffer, colors, stackFeatures = false, normalizeFeaturesIndependently = true; - var l = FluidWaveformFeaturesLayer(featuresBuffer,colors,stackFeatures,normalizeFeaturesIndependently); + arg featuresBuffer, colors, stackFeatures = false, normalizeFeaturesIndependently = true, lineWidth = 1; + var l = FluidWaveformFeaturesLayer(featuresBuffer,colors,stackFeatures,normalizeFeaturesIndependently,lineWidth); // l.postln; layers.add(l); From 9457af13b2bb0341d61e1761a29fa057adb666af Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 14 Apr 2022 12:47:46 -0400 Subject: [PATCH 04/63] add back the nmf-jit-classifier example --- .../Examples/nmf/JiT-NMF-classifier.scd | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 release-packaging/Examples/nmf/JiT-NMF-classifier.scd diff --git a/release-packaging/Examples/nmf/JiT-NMF-classifier.scd b/release-packaging/Examples/nmf/JiT-NMF-classifier.scd new file mode 100644 index 00000000..1b15b600 --- /dev/null +++ b/release-packaging/Examples/nmf/JiT-NMF-classifier.scd @@ -0,0 +1,202 @@ +// using nmf in 'real-time' as a classifier +// how it works: a circular buffer is recording and attacks trigger the process +// if in learning mode, it does a one component nmf which makes an approximation of the base. 3 of those will be copied in 3 different positions of our final 3-component base +// in in guessing mode, it does a thres component nmf from the trained bases and yields the 3 activation peaks, on which it thresholds resynth + +//how to use: +// 1. start the server +// 2. select between parenthesis below and execute. You should get a window with 3 pads (bd sn hh) and various menus +// 3. train the 3 classes: +// 3.1 select the learn option +// 3.2 select which class you want to train +// 3.3 play the sound you want to associate with that class a few times (the left audio channel is the source) +// 3.4 click the transfer button +// 3.5 repeat (3.2-3.4) for the other 2 classes. +// 3.x you can observe the 3 bases here: +~classify_bases.plot(numChannels:3) + +// 4. classify +// 4.1 select the classify option +// 4.2 press a pad and look at the activation +// 4.3 tweak the thresholds and enjoy the resynthesis. (the right audio channel is the detected class where classA is a bd sound) +// 4.x you can observe the 3 activations here: +~activations.plot(numChannels:3) + +/// code to execute first +( +var circle_buf = Buffer.alloc(s,s.sampleRate * 2); // b +var input_bus = Bus.audio(s,1); // g +var classifying = 0; // c +var cur_training_class = 0; // d +var train_base = Buffer.alloc(s, 65); // e +var activation_vals = [0.0,0.0,0.0]; // j +var thresholds = [0.5,0.5,0.5]; // k +var activations_disps; +var analysis_synth; +var osc_func; +var update_rout; + +~classify_bases = Buffer.alloc(s, 65, 3); // f +~activations = Buffer.new(s); + +// the circular buffer with triggered actions sending the location of the head at the attack +Routine { + SynthDef(\JITcircular,{arg bufnum = 0, input = 0, env = 0; + var head, head2, duration, audioin, halfdur, trig; + duration = BufFrames.kr(bufnum) / 2; + halfdur = duration / 2; + head = Phasor.ar(0,1,0,duration); + head2 = (head + halfdur) % duration; + + // circular buffer writer + audioin = In.ar(input,1); + BufWr.ar(audioin,bufnum,head,0); + BufWr.ar(audioin,bufnum,head+duration,0); + trig = FluidAmpSlice.ar(audioin, 10, 1666, 2205, 2205, 12, 9, -47,4410, 85); + + // cue the calculations via the language + SendReply.ar(trig, '/attack',head); + + Out.ar(0,audioin); + }).add; + + // drum sounds taken from original code by snappizz + // https://sccode.org/1-523 + // produced further and humanised by PA + SynthDef(\fluidbd, { + |out = 0| + var body, bodyFreq, bodyAmp; + var pop, popFreq, popAmp; + var click, clickAmp; + var snd; + + // body starts midrange, quickly drops down to low freqs, and trails off + bodyFreq = EnvGen.ar(Env([Rand(200,300), 120, Rand(45,49)], [0.035, Rand(0.07,0.1)], curve: \exp)); + bodyAmp = EnvGen.ar(Env([0,Rand(0.8,1.3),1,0],[0.005,Rand(0.08,0.085),Rand(0.25,0.35)]), doneAction: 2); + body = SinOsc.ar(bodyFreq) * bodyAmp; + // pop sweeps over the midrange + popFreq = XLine.kr(Rand(700,800), Rand(250,270), Rand(0.018,0.02)); + popAmp = EnvGen.ar(Env([0,Rand(0.8,1.3),1,0],[0.001,Rand(0.018,0.02),Rand(0.0008,0.0013)])); + pop = SinOsc.ar(popFreq) * popAmp; + // click is spectrally rich, covering the high-freq range + // you can use Formant, FM, noise, whatever + clickAmp = EnvGen.ar(Env.perc(0.001,Rand(0.008,0.012),Rand(0.07,0.12),-5)); + click = RLPF.ar(VarSaw.ar(Rand(900,920),0,0.1), 4760, 0.50150150150) * clickAmp; + + snd = body + pop + click; + snd = snd.tanh; + + Out.ar(out, snd); + }).add; + + SynthDef(\fluidsn, { + |out = 0| + var pop, popAmp, popFreq; + var noise, noiseAmp; + var click; + var snd; + + // pop makes a click coming from very high frequencies + // slowing down a little and stopping in mid-to-low + popFreq = EnvGen.ar(Env([Rand(3210,3310), 410, Rand(150,170)], [0.005, Rand(0.008,0.012)], curve: \exp)); + popAmp = EnvGen.ar(Env.perc(0.001, Rand(0.1,0.12), Rand(0.7,0.9),-5)); + pop = SinOsc.ar(popFreq) * popAmp; + // bandpass-filtered white noise + noiseAmp = EnvGen.ar(Env.perc(0.001, Rand(0.13,0.15), Rand(1.2,1.5),-5), doneAction: 2); + noise = BPF.ar(WhiteNoise.ar, 810, 1.6) * noiseAmp; + + click = Impulse.ar(0); + snd = (pop + click + noise) * 1.4; + + Out.ar(out, snd); + }).add; + + SynthDef(\fluidhh, { + |out = 0| + var click, clickAmp; + var noise, noiseAmp, noiseFreq; + + // noise -> resonance -> expodec envelope + noiseAmp = EnvGen.ar(Env.perc(0.001, Rand(0.28,0.3), Rand(0.4,0.6), [-20,-15]), doneAction: 2); + noiseFreq = Rand(3900,4100); + noise = Mix(BPF.ar(ClipNoise.ar, [noiseFreq, noiseFreq+141], [0.12, 0.31], [2.0, 1.2])) * noiseAmp; + + Out.ar(out, noise); + }).add; + + // makes sure all the synthdefs are on the server + s.sync; + + // instantiate the JIT-circular-buffer + analysis_synth = Synth(\JITcircular,[\bufnum, circle_buf, \input, input_bus]); + train_base.fill(0,65,0.1); + + // instantiate the listener to cue the processing from the language side + osc_func = OSCFunc({ arg msg; + var head_pos = msg[3]; + // when an attack happens + if (classifying == 0, { + // if in training mode, makes a single component nmf + FluidBufNMF.process(s, circle_buf, head_pos, 128, bases:train_base, basesMode: 1, windowSize: 128); + }, { + // if in classifying mode, makes a 3 component nmf from the pretrained bases and compares the activations with the set thresholds + FluidBufNMF.process(s, circle_buf, head_pos, 128, components:3, bases:~classify_bases, basesMode: 2, activations:~activations, windowSize: 128, action:{ + // we are retrieving and comparing against the 2nd activation, because FFT processes are zero-padded on each sides, therefore the complete 128 samples are in the middle of the analysis. + ~activations.getn(3,3,{|x| + activation_vals = x; + if (activation_vals[0] >= thresholds[0], {Synth(\fluidbd,[\out,1])}); + if (activation_vals[1] >= thresholds[1], {Synth(\fluidsn,[\out,1])}); + if (activation_vals[2] >= thresholds[2], {Synth(\fluidhh,[\out,1])}); + defer{ + activations_disps[0].string_("A:" ++ activation_vals[0].round(0.01)); + activations_disps[1].string_("B:" ++ activation_vals[1].round(0.01)); + activations_disps[2].string_("C:" ++ activation_vals[2].round(0.01)); + }; + }); + }; + ); + }); + }, '/attack', s.addr); + + // make sure all the synths are instantiated + s.sync; + + // GUI for control + { + var win = Window("Control", Rect(100,100,610,100)).front; + + Button(win, Rect(10,10,80, 80)).states_([["bd",Color.black,Color.white]]).mouseDownAction_({Synth(\fluidbd, [\out, input_bus], analysis_synth, \addBefore)}); + Button(win, Rect(100,10,80, 80)).states_([["sn",Color.black,Color.white]]).mouseDownAction_({Synth(\fluidsn, [\out, input_bus], analysis_synth, \addBefore)}); + Button(win, Rect(190,10,80, 80)).states_([["hh",Color.black,Color.white]]).mouseDownAction_({Synth(\fluidhh, [\out, input_bus], analysis_synth,\addBefore)}); + StaticText(win, Rect(280,7,85,25)).string_("Select").align_(\center); + PopUpMenu(win, Rect(280,32,85,25)).items_(["learn","classify"]).action_({|value| + classifying = value.value; + if(classifying == 0, { + train_base.fill(0,65,0.1) + }); + }); + PopUpMenu(win, Rect(280,65,85,25)).items_(["classA","classB","classC"]).action_({|value| + cur_training_class = value.value; + train_base.fill(0,65,0.1); + }); + Button(win, Rect(375,65,85,25)).states_([["transfer",Color.black,Color.white]]).mouseDownAction_({ + if(classifying == 0, { + // if training + FluidBufCompose.process(s, train_base, numChans:1, destination:~classify_bases, destStartChan:cur_training_class); + }); + }); + StaticText(win, Rect(470,7,75,25)).string_("Acts"); + activations_disps = Array.fill(3, {arg i; + StaticText(win, Rect(470,((i+1) * 20 )+ 7,80,25)); + }); + StaticText(win, Rect(540,7,55,25)).string_("Thresh").align_(\center); + 3.do {arg i; + TextField(win, Rect(540,((i+1) * 20 )+ 7,55,25)).string_("0.5").action_({|x| thresholds[i] = x.value.asFloat;}); + }; + + win.onClose_({circle_buf.free;input_bus.free;osc_func.clear;analysis_synth.free;}); + }.defer; +}.play; +) + +// thanks to Ted Moore for the SC code cleaning and improvements! From 106e4d5ea132397a589baedf3db6aa64079e6c87 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 14 Apr 2022 14:46:49 -0400 Subject: [PATCH 05/63] novelty interface change in example --- ...ty Reduction 2D sound browsing (each step separated out).scd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/Examples/Guides/Dimensionality Reduction 2D sound browsing (each step separated out).scd b/release-packaging/Examples/Guides/Dimensionality Reduction 2D sound browsing (each step separated out).scd index 398c5d4b..eb6a5f16 100644 --- a/release-packaging/Examples/Guides/Dimensionality Reduction 2D sound browsing (each step separated out).scd +++ b/release-packaging/Examples/Guides/Dimensionality Reduction 2D sound browsing (each step separated out).scd @@ -43,7 +43,7 @@ do the whole process in one go! var indices = Buffer(s); // a buffer for saving the discovered indices into // play around the the threshold anad feature (see help file) to get differet slicing results - FluidBufNoveltySlice.processBlocking(s,buffer,indices:indices,feauture:0,threshold:0.5,action:{ + FluidBufNoveltySlice.processBlocking(s,buffer,indices:indices,algorithm:0,threshold:0.5,action:{ "% slices found".format(indices.numFrames).postln; "average duration in seconds: %".format(buffer.duration/indices.numFrames).postln; action.(buffer,indices); From d776b25ed5594fe32c4ec3a0950b40e34bd59c76 Mon Sep 17 00:00:00 2001 From: gianlucaelia Date: Wed, 20 Apr 2022 19:32:13 +0100 Subject: [PATCH 06/63] resizable and layoutable guis (#83) * resizable and layoutable guis * FluidWaveform: rename 'win' to 'parent' * FluidWaveform/FluidPlotter: update help * FluidWaveform/Plotter: make views before forking This way views are immediately available upon creation, for example to be added to layouts. Views are still correctly updated with data from within the fork, whenever they are ready. * Thanks @elgiano! + a few small edits Co-authored-by: Ted Moore --- release-packaging/Classes/FluidPlotter.sc | 122 +++-- release-packaging/Classes/FluidWaveform.sc | 511 +++++++++--------- .../HelpSource/Classes/FluidPlotter.schelp | 35 +- .../HelpSource/Classes/FluidWaveform.schelp | 27 +- 4 files changed, 373 insertions(+), 322 deletions(-) diff --git a/release-packaging/Classes/FluidPlotter.sc b/release-packaging/Classes/FluidPlotter.sc index b6f3e5c9..d78a4745 100644 --- a/release-packaging/Classes/FluidPlotter.sc +++ b/release-packaging/Classes/FluidPlotter.sc @@ -2,36 +2,28 @@ FluidPlotterPoint { var id, color, <>size = 1; *new { - arg id, x, y, color, size = 1; - ^super.new.init(id,x,y,color,size); - } - - init { - arg id_, x_, y_, color_, size_ = 1; - id = id_; - x = x_; - y = y_; - color = color_ ? Color.black; - size = size_; + arg id, x, y, color(Color.black), size = 1; + ^super.newCopyArgs(id,x,y,color,size); } } FluidPlotter : FluidViewer { - var Date: Wed, 20 Apr 2022 22:27:16 +0100 Subject: [PATCH 07/63] slicers: add enums for algorithms (#86) --- release-packaging/Classes/FluidNoveltySlice.sc | 8 ++++++++ release-packaging/Classes/FluidOnsetSlice.sc | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/release-packaging/Classes/FluidNoveltySlice.sc b/release-packaging/Classes/FluidNoveltySlice.sc index bdf36c6b..f475708d 100644 --- a/release-packaging/Classes/FluidNoveltySlice.sc +++ b/release-packaging/Classes/FluidNoveltySlice.sc @@ -1,7 +1,15 @@ FluidNoveltySlice : FluidRTUGen { + + const Date: Wed, 20 Apr 2022 17:49:56 -0400 Subject: [PATCH 08/63] typo --- release-packaging/Classes/FluidWaveform.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/Classes/FluidWaveform.sc b/release-packaging/Classes/FluidWaveform.sc index 67a313a2..7fe993ae 100644 --- a/release-packaging/Classes/FluidWaveform.sc +++ b/release-packaging/Classes/FluidWaveform.sc @@ -425,7 +425,7 @@ FluidWaveform : FluidViewer { view.background_(Color.white); } } { - view = View(parent, bounds) + view = View(parent, bounds); view.background_(Color.white); }; } From 52590c5c6d2c8216deddcd680cb78ff9cbcdfb84 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Fri, 29 Apr 2022 14:36:39 +0100 Subject: [PATCH 09/63] FluidBufNMF class: add resynthMode argument --- release-packaging/Classes/FluidBufNMF.sc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release-packaging/Classes/FluidBufNMF.sc b/release-packaging/Classes/FluidBufNMF.sc index 40052d0c..186f341f 100644 --- a/release-packaging/Classes/FluidBufNMF.sc +++ b/release-packaging/Classes/FluidBufNMF.sc @@ -1,16 +1,16 @@ 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, 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; - ^FluidProxyUgen.kr(\FluidBufNMFTrigger,-1,source.asUGenInput, startFrame, numFrames, startChan, numChans, resynth.asUGenInput, bases.asUGenInput, basesMode, activations.asUGenInput, actMode, components, iterations, windowSize, hopSize, 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, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, 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; @@ -19,10 +19,10 @@ FluidBufNMF : FluidBufProcessor ^this.new( server,nil,[resynth, bases, activations].select{|x| x!= -1} - ).processList([source, startFrame, numFrames, startChan, numChans, resynth, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize,0],freeWhenDone,action); + ).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize,0],freeWhenDone,action); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, 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; @@ -31,7 +31,7 @@ FluidBufNMF : FluidBufProcessor ^this.new( server,nil,[resynth, bases, activations].select{|x| x!= -1} - ).processList([source, startFrame, numFrames, startChan, numChans, resynth, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, 1],freeWhenDone,action); + ).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, 1],freeWhenDone,action); } } FluidBufNMFTrigger : FluidProxyUgen {} From 333a121524c169401e2c888eae8c9662d29c1699 Mon Sep 17 00:00:00 2001 From: Gerard Roma Date: Tue, 3 May 2022 12:18:55 +0100 Subject: [PATCH 10/63] add PCA whitening parameter (#65) * add PCA whitening parameter * FluidPCA: Ensure whiten parameter is sent to kr query UGen Co-authored-by: Gerard Co-authored-by: weefuzzy --- release-packaging/Classes/FluidPCA.sc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/release-packaging/Classes/FluidPCA.sc b/release-packaging/Classes/FluidPCA.sc index 7c19fd93..67e87052 100644 --- a/release-packaging/Classes/FluidPCA.sc +++ b/release-packaging/Classes/FluidPCA.sc @@ -1,13 +1,13 @@ FluidPCA : FluidModelObject{ - var <>numDimensions; + var <>numDimensions, <>whiten; - *new {|server, numDimensions = 2| - ^super.new(server,[numDimensions]).numDimensions_(numDimensions); + *new {|server, numDimensions = 2, whiten = 0| + ^super.new(server,[numDimensions, whiten]).numDimensions_(numDimensions).whiten_(whiten); } prGetParams{ - ^[this.id, numDimensions]; + ^[this.id, numDimensions, whiten]; } fitMsg{|dataSet| @@ -55,7 +55,7 @@ FluidPCA : FluidModelObject{ numDimensions = numDimensions ? this.numDimensions; this.numDimensions_(numDimensions); - ^FluidPCAQuery.kr(trig ,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.numDimensions); + ^FluidPCAQuery.kr(trig ,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.numDimensions, this.whiten); } inverseTransformPointMsg{|sourceBuffer, destBuffer| @@ -74,9 +74,9 @@ FluidPCA : FluidModelObject{ } FluidPCAQuery : FluidRTMultiOutUGen { - *kr{ |trig, model, inputBuffer,outputBuffer,numDimensions| + *kr{ |trig, model, inputBuffer,outputBuffer,numDimensions, whiten| ^this.multiNew('control',trig, model.asUGenInput, - numDimensions, + numDimensions, whiten, inputBuffer.asUGenInput, outputBuffer.asUGenInput) } @@ -84,4 +84,4 @@ FluidPCAQuery : FluidRTMultiOutUGen { inputs = theInputs; ^this.initOutputs(1, rate); } -} \ No newline at end of file +} From 4e5f0e407099964565e449ea547a8397271bef0a Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 3 May 2022 12:19:16 +0100 Subject: [PATCH 11/63] Enhance/optional message args (#77) * optional args: sc wrapper updates * optional args: KDTree try out --- include/wrapper/ArgsFromClient.hpp | 40 ++++++++++++++++++------ include/wrapper/Messaging.hpp | 38 ++++++++++++++++------ release-packaging/Classes/FluidKDTree.sc | 11 ++++--- 3 files changed, 66 insertions(+), 23 deletions(-) diff --git a/include/wrapper/ArgsFromClient.hpp b/include/wrapper/ArgsFromClient.hpp index 88ae458b..7e49cab4 100644 --- a/include/wrapper/ArgsFromClient.hpp +++ b/include/wrapper/ArgsFromClient.hpp @@ -135,38 +135,45 @@ struct ParamReader } } - static const char* argTypeToString(std::string&) + + template + static const char* argTypeToString(Optional&) + { + return argTypeToString(T{}); + } + + static const char* argTypeToString(const std::string&) { return "string"; } template static std::enable_if_t::value, const char*> - argTypeToString(T&) + argTypeToString(T) { return "integer"; } template static std::enable_if_t::value, const char*> - argTypeToString(T&) + argTypeToString(T) { return "float"; } - static const char* argTypeToString(BufferT::type&) + static const char* argTypeToString(const BufferT::type&) { return "buffer"; } - static const char* argTypeToString(InputBufferT::type&) + static const char* argTypeToString(const InputBufferT::type&) { return "buffer"; } template static std::enable_if_t::value,const char*> - argTypeToString(P&) + argTypeToString(const P&) { return "shared_object"; //not ideal } @@ -179,28 +186,34 @@ struct ParamReader template static std::enable_if_t::value || std::is_floating_point::value, bool> - argTypeOK(T&, char tag) + argTypeOK(T, char tag) { return tag == 'i' || tag == 'f' || tag == 'd'; } - static bool argTypeOK(BufferT::type&, char tag) + static bool argTypeOK(const BufferT::type&, char tag) { return tag == 'i'; } - static bool argTypeOK(InputBufferT::type&, char tag) + static bool argTypeOK(const InputBufferT::type&, char tag) { return tag == 'i'; } template static std::enable_if_t::value,bool> - argTypeOK(P&, char tag) + argTypeOK(const P&, char tag) { return tag == 'i'; } + template + static bool argTypeOK(const Optional&, char tag) + { + return argTypeOK(T{},tag); + } + static auto fromArgs(World*, sc_msg_iter& args, std::string, int) { const char* recv = args.gets(""); @@ -266,6 +279,13 @@ struct ParamReader res[i] = static_cast(args.geti()); return res; } + + template + static auto fromArgs(World* w, sc_msg_iter& args, Optional, int) + { + return Optional{fromArgs(w,args,T{},int{})}; + } + }; diff --git a/include/wrapper/Messaging.hpp b/include/wrapper/Messaging.hpp index 77c4d05d..ef5ee8bf 100644 --- a/include/wrapper/Messaging.hpp +++ b/include/wrapper/Messaging.hpp @@ -48,10 +48,27 @@ struct FluidSCMessaging{ }; + + template + static auto constexpr filterOneOptional(const T&) { return std::make_tuple(T{}); } + + template + static auto constexpr filterOneOptional(const Optional&) { return std::make_tuple(); } + + + template + static auto constexpr filterOptional(std::tuple) + { + return std::tuple_cat(filterOneOptional(Ts{})...); + } + + template - static bool validateMessageArgs(Message* msg, sc_msg_iter* inArgs) + static Optional validateMessageArgs(Message* msg, sc_msg_iter* inArgs) { + //we can be sure that optional args always follow mandatory ones, as this is enforced at compile time in flucoma-core using ArgTuple = decltype(msg->args); + using MandatoryArgsTuple = decltype(filterOptional(msg->args)); std::string tags(inArgs->tags + inArgs->count);//evidently this needs commenting: construct string at pointer offset by tag count, to pick up args bool willContinue = true; @@ -59,7 +76,7 @@ struct FluidSCMessaging{ auto& args = msg->args; - constexpr size_t expectedArgCount = std::tuple_size::value; + constexpr size_t expectedArgCount = std::tuple_size::value; /// TODO this squawks if we have a completion message, so maybe we can check if extra arg is a 'b' and squawk if not? // if(tags.size() > expectedArgCount) @@ -77,14 +94,16 @@ struct FluidSCMessaging{ auto tagsIter = tags.begin(); auto tagsEnd = tags.end(); - ForEach(args,[&typesMatch,&tagsIter,&tagsEnd](auto& arg){ + size_t argCount = 0; + ForEach(args,[&typesMatch,&tagsIter,&tagsEnd,firstTag=tags.begin(),&argCount](auto& arg){ if(tagsIter == tagsEnd) { - typesMatch = false; + if(std::distance(firstTag,tagsIter) < expectedArgCount) typesMatch = false; return; } char t = *(tagsIter++); typesMatch = typesMatch && ParamReader::argTypeOK(arg,t); + argCount++; }); willContinue = willContinue && typesMatch; @@ -116,7 +135,7 @@ struct FluidSCMessaging{ report << ")\n"; } - return willContinue; + return willContinue ? Optional(argCount) : Optional(); } static void refreshParams(Params& p, MessageResult& r) @@ -137,9 +156,9 @@ struct FluidSCMessaging{ msg->id = args->geti(); msg->replyAddr = copyReplyAddress(replyAddr); ///TODO make this step contingent on verbosity or something, in the name of effieciency - bool willContinue = validateMessageArgs(msg, args); + auto tagCount = validateMessageArgs(msg, args); - if(!willContinue) + if(!tagCount.has_value()) { delete msg; return; @@ -148,9 +167,10 @@ struct FluidSCMessaging{ msg->name = std::string{'/'} + (const char*)(inUserData); - ForEach(msg-> args,[inWorld,&args](auto& thisarg) + ForEach(msg-> args,[inWorld,&args,tagCount,n=0](auto& thisarg)mutable { - thisarg = ParamReader::fromArgs(inWorld, *args,thisarg,0); + if(n++ < tagCount.value()) + thisarg = ParamReader::fromArgs(inWorld, *args,thisarg,0); }); size_t completionMsgSize{args ? args->getbsize() : 0}; diff --git a/release-packaging/Classes/FluidKDTree.sc b/release-packaging/Classes/FluidKDTree.sc index 8ce1aacb..3dc3c048 100644 --- a/release-packaging/Classes/FluidKDTree.sc +++ b/release-packaging/Classes/FluidKDTree.sc @@ -24,13 +24,16 @@ FluidKDTree : FluidModelObject this.prSendMsg(this.fitMsg(dataSet)); } - kNearestMsg{|buffer| - ^this.prMakeMsg(\kNearest,id,this.prEncodeBuffer(buffer)); + kNearestMsg{|buffer,k| + k !? + {^this.prMakeMsg(\kNearest,id,this.prEncodeBuffer(buffer),k);} + ?? + {^this.prMakeMsg(\kNearest,id,this.prEncodeBuffer(buffer));} } - kNearest{ |buffer, action| + kNearest{ |buffer, k, action| actions[\kNearest] = [strings(FluidMessageResponse,_,_),action]; - this.prSendMsg(this.kNearestMsg(buffer)); + this.prSendMsg(this.kNearestMsg(buffer,k)); } kNearestDistMsg {|buffer| From 11bb9015e77a59ed9f11d62596a22effc39b337a Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 3 May 2022 12:20:11 +0100 Subject: [PATCH 12/63] Enhance/choices param (#78) * NRTWrapper: Add choices param (long <-> bitset) * Update `FluidBufStats` with `select` control * BufStats class: Fix bitfield for `select` and warn on duplicate items * Update SpectralShape classes for new param --- include/wrapper/ArgsFromClient.hpp | 11 +++++ .../Classes/FluidBufSpectralShape.sc | 16 ++++--- release-packaging/Classes/FluidBufStats.sc | 48 ++++++++++++++----- .../Classes/FluidSpectralShape.sc | 34 +++++++++++-- 4 files changed, 86 insertions(+), 23 deletions(-) diff --git a/include/wrapper/ArgsFromClient.hpp b/include/wrapper/ArgsFromClient.hpp index 7e49cab4..e4ea2354 100644 --- a/include/wrapper/ArgsFromClient.hpp +++ b/include/wrapper/ArgsFromClient.hpp @@ -77,6 +77,11 @@ struct ParamReader return args.next(); } + static auto fromArgs(Unit*, Controls& args, typename ChoicesT::type, int) + { + return typename ChoicesT::type(std::size_t(static_cast(args.next()))); + } + static SCBufferAdaptor* fetchBuffer(Unit* x, index bufnum) { if(bufnum >= x->mWorld->mNumSndBufs) @@ -280,6 +285,12 @@ struct ParamReader return res; } + static auto fromArgs(World*, sc_msg_iter& args, typename ChoicesT::type, int) + { + int x = args.geti(); + return typename ChoicesT::type(asUnsigned(x)); + } + template static auto fromArgs(World* w, sc_msg_iter& args, Optional, int) { diff --git a/release-packaging/Classes/FluidBufSpectralShape.sc b/release-packaging/Classes/FluidBufSpectralShape.sc index 4eda3e72..9a47eda0 100644 --- a/release-packaging/Classes/FluidBufSpectralShape.sc +++ b/release-packaging/Classes/FluidBufSpectralShape.sc @@ -4,9 +4,10 @@ FluidBufSpectralShape : FluidBufProcessor { ^\FluidBufSpecShp } - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| + *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {FluidSpectralShape.prProcessSelect(select)} ?? {FluidSpectralShape.prProcessSelect(FluidSpectralShape.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -14,13 +15,15 @@ FluidBufSpectralShape : FluidBufProcessor { source.isNil.if {"FluidBufSpectralShape: Invalid source buffer".throw}; features.isNil.if {"FluidBufSpectralShape: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(this.objectClassName++\Trigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + + ^FluidProxyUgen.kr(this.objectClassName++\Trigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {FluidSpectralShape.prProcessSelect(select)} ?? {FluidSpectralShape.prProcessSelect(FluidSpectralShape.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -31,13 +34,14 @@ FluidBufSpectralShape : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action ); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {FluidSpectralShape.prProcessSelect(select)} ?? {FluidSpectralShape.prProcessSelect(FluidSpectralShape.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -48,7 +52,7 @@ FluidBufSpectralShape : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action ); } } diff --git a/release-packaging/Classes/FluidBufStats.sc b/release-packaging/Classes/FluidBufStats.sc index c181c9ae..e0875fb5 100644 --- a/release-packaging/Classes/FluidBufStats.sc +++ b/release-packaging/Classes/FluidBufStats.sc @@ -1,7 +1,28 @@ FluidBufStats : FluidBufProcessor { - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, stats, numDerivs = 0, low = 0, middle = 50, high = 100, outliersCutoff = -1, weights, trig = 1, blocking = 0| - + const 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (statslookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + *initClass { + statslookup = Dictionary.with(*this.stats.collect{|x,i| x->(1<(1< 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 = 16384; + + 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); } init {arg ...theInputs; + var numChannels; inputs = theInputs; - ^this.initOutputs(7,rate); + numChannels = inputs.at(1).asBinaryDigits.sum; + ^this.initOutputs(numChannels,rate); } checkInputs { - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; From 809320a43a59867ca6eb6cede5e1e8026d3fe732 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 3 May 2022 14:17:19 +0100 Subject: [PATCH 13/63] `PCA.sc`: add batch `inverseTranform` method --- release-packaging/Classes/FluidPCA.sc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/release-packaging/Classes/FluidPCA.sc b/release-packaging/Classes/FluidPCA.sc index 67e87052..eb79d792 100644 --- a/release-packaging/Classes/FluidPCA.sc +++ b/release-packaging/Classes/FluidPCA.sc @@ -71,6 +71,16 @@ FluidPCA : FluidModelObject{ this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer,destBuffer)); } + 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)); + } + + } FluidPCAQuery : FluidRTMultiOutUGen { From 82cd8769e7a81a6be0e153edac1d37ed94b663dd Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 3 May 2022 14:17:38 +0100 Subject: [PATCH 14/63] Wrapper: integer sign warnings --- include/wrapper/Messaging.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wrapper/Messaging.hpp b/include/wrapper/Messaging.hpp index ef5ee8bf..dda88e24 100644 --- a/include/wrapper/Messaging.hpp +++ b/include/wrapper/Messaging.hpp @@ -98,7 +98,7 @@ struct FluidSCMessaging{ ForEach(args,[&typesMatch,&tagsIter,&tagsEnd,firstTag=tags.begin(),&argCount](auto& arg){ if(tagsIter == tagsEnd) { - if(std::distance(firstTag,tagsIter) < expectedArgCount) typesMatch = false; + if(std::distance(firstTag,tagsIter) < asSigned(expectedArgCount)) typesMatch = false; return; } char t = *(tagsIter++); @@ -169,7 +169,7 @@ struct FluidSCMessaging{ ForEach(msg-> args,[inWorld,&args,tagCount,n=0](auto& thisarg)mutable { - if(n++ < tagCount.value()) + if(n++ < asSigned(tagCount.value())) thisarg = ParamReader::fromArgs(inWorld, *args,thisarg,0); }); From 167ea1cc9eafb69eb984921b30b1f780c1533093 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 3 May 2022 14:24:32 +0100 Subject: [PATCH 15/63] Enhance/max params (#93) * CMake: Centralise C++ version and set to 17 * Wrapper: handle new LongRuntimeMax param type * POC for new LongRuntimeMax param with MFCC numCoeffs --- CMakeLists.txt | 5 ++++- include/wrapper/ArgsFromClient.hpp | 12 +++++++++++- include/wrapper/RealTimeBase.hpp | 2 +- release-packaging/Classes/FluidMFCC.sc | 11 +++++++---- scripts/target_post.cmake | 12 ++++++------ 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 40c5273a..bbe8ebcf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,10 @@ cmake_minimum_required(VERSION 3.11) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + ################################################################################ # Paths set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "") @@ -22,7 +26,6 @@ set(FLUID_PATH "" CACHE PATH "Optional path to the Fluid Decomposition repo") if (APPLE) set(CMAKE_XCODE_GENERATE_SCHEME ON) - set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "") #A consequence of targetting 10.8. Needs to be set globally from 10.15 onwards in order for the test program to compile successfully during configure string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") diff --git a/include/wrapper/ArgsFromClient.hpp b/include/wrapper/ArgsFromClient.hpp index e4ea2354..9f7b0916 100644 --- a/include/wrapper/ArgsFromClient.hpp +++ b/include/wrapper/ArgsFromClient.hpp @@ -119,6 +119,12 @@ struct ParamReader auto id = fromArgs(x, args, index{}, 0); return {id >= 0 ? std::to_string(id).c_str() : "" }; } + + static auto fromArgs(Unit*,Controls& args,typename LongRuntimeMaxT::type&, int) + { + return typename LongRuntimeMaxT::type{static_cast(args.next()), static_cast(args.next())}; + } + }; // NRT case: we're decoding data from sc_msg_iter*, there will be a World*, we can't have LocalBufs @@ -285,6 +291,11 @@ struct ParamReader return res; } + static auto fromArgs(World*,sc_msg_iter& args,typename LongRuntimeMaxT::type&, int) + { + return typename LongRuntimeMaxT::type{args.geti(), args.geti()}; + } + static auto fromArgs(World*, sc_msg_iter& args, typename ChoicesT::type, int) { int x = args.geti(); @@ -296,7 +307,6 @@ struct ParamReader { return Optional{fromArgs(w,args,T{},int{})}; } - }; diff --git a/include/wrapper/RealTimeBase.hpp b/include/wrapper/RealTimeBase.hpp index cd228f23..2814af51 100644 --- a/include/wrapper/RealTimeBase.hpp +++ b/include/wrapper/RealTimeBase.hpp @@ -118,7 +118,7 @@ struct RealTimeBase index outputSize = client.controlChannelsOut().size > 0 ? std::max(client.audioChannelsOut(), - client.controlChannelsOut().size) + client.maxControlChannelsOut()) : unit.mSpecialIndex + 1; mOutputs.reserve(asUnsigned(outputSize)); diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index ac1f695e..406e84fe 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,18 +1,21 @@ FluidMFCC : FluidRTMultiOutUGen { - *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = 13, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, startCoeff, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = nil, maxFFTSize = 16384; + + maxNumCoeffs = maxNumCoeffs ? numCoeffs; + + ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, maxNumCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - ^this.initOutputs(inputs.at(6),rate);//this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(2),rate);//this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { // the checks of rates here are in the order of the kr method definition - if(inputs.at(6).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxNumCoeffs cannot be modulated."); }; if(inputs.at(10).rate != 'scalar') { diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake index cce96580..487c4ac5 100644 --- a/scripts/target_post.cmake +++ b/scripts/target_post.cmake @@ -5,7 +5,7 @@ # under the European Union’s Horizon 2020 research and innovation programme # (grant agreement No 725899). -target_compile_features(${PLUGIN} PRIVATE cxx_std_14) +# target_compile_features(${PLUGIN} PRIVATE cxx_std_14) if(MSVC) target_compile_options(${PLUGIN} PRIVATE /W3) @@ -20,11 +20,11 @@ else() endif() endif() -set_target_properties(${PLUGIN} PROPERTIES - CXX_STANDARD 14 - CXX_STANDARD_REQUIRED YES - CXX_EXTENSIONS NO -) +# set_target_properties(${PLUGIN} PROPERTIES +# CXX_STANDARD 14 +# CXX_STANDARD_REQUIRED YES +# CXX_EXTENSIONS NO +# ) if(APPLE) set_target_properties(${PLUGIN} PROPERTIES From 4d18d4d103d185ecb30a6c4eca5cd4e02d4e4e72 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 3 May 2022 15:14:00 +0100 Subject: [PATCH 16/63] Wrapper: Make MSVC happy about constexpr lambda capture --- include/wrapper/Messaging.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wrapper/Messaging.hpp b/include/wrapper/Messaging.hpp index dda88e24..08c04f6c 100644 --- a/include/wrapper/Messaging.hpp +++ b/include/wrapper/Messaging.hpp @@ -76,7 +76,7 @@ struct FluidSCMessaging{ auto& args = msg->args; - constexpr size_t expectedArgCount = std::tuple_size::value; + static constexpr size_t expectedArgCount = std::tuple_size::value; /// TODO this squawks if we have a completion message, so maybe we can check if extra arg is a 'b' and squawk if not? // if(tags.size() > expectedArgCount) From d3f56ab023c4202eaf0285af4526d165ffaac04a Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 3 May 2022 16:50:13 +0100 Subject: [PATCH 17/63] All scalers: replace 'invert' parameter with `inverseTransform` messages --- release-packaging/Classes/FluidNormalize.sc | 35 +++++++++++++++---- release-packaging/Classes/FluidRobustScale.sc | 32 +++++++++++++---- release-packaging/Classes/FluidStandardize.sc | 31 ++++++++++++---- 3 files changed, 78 insertions(+), 20 deletions(-) diff --git a/release-packaging/Classes/FluidNormalize.sc b/release-packaging/Classes/FluidNormalize.sc index 21cdea4c..6147d6fa 100644 --- a/release-packaging/Classes/FluidNormalize.sc +++ b/release-packaging/Classes/FluidNormalize.sc @@ -2,13 +2,13 @@ FluidNormalize : FluidModelObject { var <>min, <>max, <>invert; - *new {|server, min = 0, max = 1, invert = 0| - ^super.new(server,[min,max,invert]) - .min_(min).max_(max).invert_(invert); + *new {|server, min = 0, max = 1| + ^super.new(server,[min,max]) + .min_(min).max_(max); } prGetParams{ - ^[this.id, this.min,this.max,this.invert,-1,-1]; + ^[this.id, this.min,this.max,-1,-1]; } @@ -52,16 +52,37 @@ FluidNormalize : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer, destBuffer)); } + 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)); + } + + 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)); + } + kr{|trig, inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0| min = min ? this.min; max = max ? this.max; - invert = invert ? this.invert; - this.min_(min).max_(max).invert_(invert); + this.min_(min).max_(max); ^FluidNormalizeQuery.kr(trig, - this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.min, this.max, this.invert); + this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.min, this.max, invert); } diff --git a/release-packaging/Classes/FluidRobustScale.sc b/release-packaging/Classes/FluidRobustScale.sc index 3e7d34f9..0126f306 100644 --- a/release-packaging/Classes/FluidRobustScale.sc +++ b/release-packaging/Classes/FluidRobustScale.sc @@ -1,14 +1,14 @@ FluidRobustScale : FluidModelObject { - var <>low, <>high, <>invert; + var <>low, <>high; *new {|server, low = 25, high = 75, invert = 0| ^super.new(server,[low,high,invert]) - .low_(low).high_(high).invert_(invert); + .low_(low).high_(high); } prGetParams{ - ^[this.id,this.low,this.high,this.invert]; + ^[this.id,this.low,this.high]; } @@ -52,13 +52,31 @@ FluidRobustScale : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer, destBuffer)); } - kr{|trig, inputBuffer,outputBuffer,invert| + 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)); + } + + inverseTransformPointMsg{|sourceBuffer, destBuffer| + ^this.prMakeMsg(\inverseTransformPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(destBuffer), + ["/b_query",destBuffer.asUGenInput] + ); + } - invert = invert ? this.invert; + inverseTransformPoint{|sourceBuffer, destBuffer, action| + actions[\inverseRransformPoint] = [nil,{action.value(destBuffer)}]; + this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer)); + } - // this.invert_(invert); + kr{|trig, inputBuffer,outputBuffer,invert = 0| - ^FluidRobustScaleQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), invert,); + ^FluidRobustScaleQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), invert); } diff --git a/release-packaging/Classes/FluidStandardize.sc b/release-packaging/Classes/FluidStandardize.sc index b4127b89..2e5e9ca1 100644 --- a/release-packaging/Classes/FluidStandardize.sc +++ b/release-packaging/Classes/FluidStandardize.sc @@ -3,11 +3,11 @@ FluidStandardize : FluidModelObject { var <>invert; *new {|server, invert = 0| - ^super.new(server,[invert]).invert_(invert); + ^super.new(server,[]); } prGetParams{ - ^[this.id, this.invert]; + ^[this.id]; } fitMsg{|dataSet| @@ -47,12 +47,31 @@ FluidStandardize : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer,destBuffer)); } - kr{|trig, inputBuffer,outputBuffer,invert| + 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)); + } + + inverseTransformPointMsg{|sourceBuffer, destBuffer| + ^this.prMakeMsg(\inverseTransformPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(destBuffer), + ["/b_query",destBuffer.asUGenInput] + ); + } + + inverseTransformPoint{|sourceBuffer, destBuffer, action| + actions[\inverseRransformPoint] = [nil,{action.value(destBuffer)}]; + this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer)); + } - invert = invert ? this.invert; - this.invert_(invert); + kr{|trig, inputBuffer,outputBuffer,invert = 0| - ^FluidStandardizeQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.invert); + ^FluidStandardizeQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), invert); } } From 11d07c4337bab2cfbf7165470a8577b5004292df Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 3 May 2022 16:51:07 +0100 Subject: [PATCH 18/63] Wrapper: Work around 32 char limit for plugin commands If too long, remove vowels. Sorry. Better ideas welcome --- include/wrapper/Messaging.hpp | 25 +++++++++++++++++-- .../Classes/FluidServerObject.sc | 7 +++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/include/wrapper/Messaging.hpp b/include/wrapper/Messaging.hpp index 08c04f6c..7e8f173c 100644 --- a/include/wrapper/Messaging.hpp +++ b/include/wrapper/Messaging.hpp @@ -35,6 +35,22 @@ struct FluidSCMessaging{ }; +private: + static bool is_vowel(const char p_char) + { + constexpr char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' }; + return std::find(std::begin(vowels), std::end(vowels), p_char) != std::end(vowels); + } + + static std::string remove_vowel(std::string st) + { + auto to_erase = std::remove_if(st.begin(), st.end(), is_vowel); + st.erase(to_erase, st.end()); + return st; + } + + +public: template struct SetupMessageCmd { @@ -42,8 +58,13 @@ struct FluidSCMessaging{ void operator()(const T& message) { static std::string messageName = std::string{getName()} + '/' + message.name; - auto ft = getInterfaceTable(); - ft->fDefinePlugInCmd(messageName.c_str(), doMessage,(void*)messageName.c_str()); + + if(messageName.size() >= 32u) + messageName = remove_vowel(messageName); + + auto ft = getInterfaceTable(); + if(!ft->fDefinePlugInCmd(messageName.c_str(), doMessage,(void*)messageName.c_str())) + std::cout << "ERROR: failed to register command \"" << messageName << "\"\n"; } }; diff --git a/release-packaging/Classes/FluidServerObject.sc b/release-packaging/Classes/FluidServerObject.sc index 66625fc0..0bf1479d 100644 --- a/release-packaging/Classes/FluidServerObject.sc +++ b/release-packaging/Classes/FluidServerObject.sc @@ -56,7 +56,12 @@ FluidServerObject } prMakeMsg{|msg,id...args| - ^['/cmd',"%/%".format(this.class.objectClassName,msg),id].addAll(args); + + var commandName = "%/%".format(this.class.objectClassName,msg); + + if(commandName.size >= 32) { commandName = commandName.select{|c|c.isVowel.not}}; + + ^['/cmd',commandName,id].addAll(args); } freeMsg { From 9b813d94765a68149c51ceb4893f31f3ed4fd5f6 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Wed, 4 May 2022 10:08:54 +0100 Subject: [PATCH 19/63] fix #96 --- release-packaging/Classes/FluidBufMFCC.sc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-packaging/Classes/FluidBufMFCC.sc b/release-packaging/Classes/FluidBufMFCC.sc index aca96442..af29b39b 100644 --- a/release-packaging/Classes/FluidBufMFCC.sc +++ b/release-packaging/Classes/FluidBufMFCC.sc @@ -8,7 +8,7 @@ FluidBufMFCC : FluidBufProcessor{ 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, numBands, startCoeff, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize,trig, blocking); + ^FluidProxyUgen.kr(\FluidBufMFCCTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, 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 | @@ -23,7 +23,7 @@ FluidBufMFCC : FluidBufProcessor{ ^this.new( server, nil,[features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numBands, startCoeff, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,0],freeWhenDone,action ); } @@ -39,7 +39,7 @@ FluidBufMFCC : FluidBufProcessor{ ^this.new( server, nil,[features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numBands, startCoeff, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,1],freeWhenDone,action ); } } From c515d5c518380696355882feb8e52af43e0641f4 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Wed, 4 May 2022 16:38:42 +0100 Subject: [PATCH 20/63] typo --- release-packaging/HelpSource/Classes/FluidBufToKr.schelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/HelpSource/Classes/FluidBufToKr.schelp b/release-packaging/HelpSource/Classes/FluidBufToKr.schelp index 71f4c7ab..569c7e56 100644 --- a/release-packaging/HelpSource/Classes/FluidBufToKr.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufToKr.schelp @@ -53,7 +53,7 @@ code:: ~mlp = FluidMLPClassifier(s); // load a model that has been pre-trained to classify between a tone and noise, simple, i know, but... -~mlp.read(FluidFilesPath("../Resources/bufToKrExample.json")); +~mlp.read(FluidFilesPath("../../Resources/bufToKrExample.json")); // can be used to demonstrate that... ( From 51a83ccbf7af439ab4d2787f264908b88c73033a Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 10 May 2022 18:23:05 +0100 Subject: [PATCH 21/63] Update SC classes for new style `max` parameters --- release-packaging/Classes/FluidAudioTransport.sc | 2 +- release-packaging/Classes/FluidBufChroma.sc | 6 +++--- release-packaging/Classes/FluidBufHPSS.sc | 6 +++--- release-packaging/Classes/FluidBufMelBands.sc | 6 +++--- .../Classes/FluidBufNoveltyFeature.sc | 6 +++--- release-packaging/Classes/FluidBufNoveltySlice.sc | 6 +++--- release-packaging/Classes/FluidChroma.sc | 13 ++++++++----- release-packaging/Classes/FluidHPSS.sc | 14 +++++++++----- release-packaging/Classes/FluidMFCC.sc | 2 +- release-packaging/Classes/FluidMelBands.sc | 13 ++++++++----- release-packaging/Classes/FluidNMFFilter.sc | 8 ++++---- release-packaging/Classes/FluidNMFMatch.sc | 8 ++++---- release-packaging/Classes/FluidNMFMorph.sc | 2 +- release-packaging/Classes/FluidNoveltyFeature.sc | 15 ++++++++++----- release-packaging/Classes/FluidNoveltySlice.sc | 14 +++++++++----- release-packaging/Classes/FluidOnsetFeature.sc | 2 +- release-packaging/Classes/FluidOnsetSlice.sc | 2 +- release-packaging/Classes/FluidPitch.sc | 2 +- release-packaging/Classes/FluidSTFTPass.sc | 2 +- release-packaging/Classes/FluidSines.sc | 2 +- release-packaging/Classes/FluidSpectralShape.sc | 2 +- 21 files changed, 76 insertions(+), 57 deletions(-) diff --git a/release-packaging/Classes/FluidAudioTransport.sc b/release-packaging/Classes/FluidAudioTransport.sc index ce465685..b2208fd7 100644 --- a/release-packaging/Classes/FluidAudioTransport.sc +++ b/release-packaging/Classes/FluidAudioTransport.sc @@ -7,7 +7,7 @@ FluidAudioTransport : FluidRTUGen { // ^this.initOutputs(1,rate); } - *ar { arg in = 0, in2 = 0, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + *ar { arg in = 0, in2 = 0, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; ^this.multiNew('audio', in.asAudioRateInput, in2, interpolation, windowSize, hopSize, fftSize, maxFFTSize) } } diff --git a/release-packaging/Classes/FluidBufChroma.sc b/release-packaging/Classes/FluidBufChroma.sc index ed8fba5c..14cbf16c 100644 --- a/release-packaging/Classes/FluidBufChroma.sc +++ b/release-packaging/Classes/FluidBufChroma.sc @@ -9,7 +9,7 @@ FluidBufChroma : FluidBufProcessor { 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, ref, normalize, minFreq, maxFreq, numChroma, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^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| @@ -25,7 +25,7 @@ FluidBufChroma : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, ref, normalize, minFreq, maxFreq, numChroma, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -42,7 +42,7 @@ FluidBufChroma : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, ref, normalize, minFreq, maxFreq, numChroma, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufHPSS.sc b/release-packaging/Classes/FluidBufHPSS.sc index d8913ad2..5ec4f9da 100644 --- a/release-packaging/Classes/FluidBufHPSS.sc +++ b/release-packaging/Classes/FluidBufHPSS.sc @@ -9,7 +9,7 @@ FluidBufHPSS : FluidBufProcessor { residual = residual ? -1; source.isNil.if {"FluidBufHPSS: Invalid source buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufHPSSTrigger, -1, source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, harmFilterSize, percFilterSize, trig, blocking + ^FluidProxyUgen.kr(\FluidBufHPSSTrigger, -1, source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, harmFilterSize, percFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking ); } @@ -26,7 +26,7 @@ FluidBufHPSS : FluidBufProcessor { ^this.new( server, nil, [harmonic, percussive, residual].select{|x| x!= -1} ).processList( - [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, harmFilterSize, percFilterSize,0], freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, harmFilterSize, percFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone,action ); } @@ -44,7 +44,7 @@ FluidBufHPSS : FluidBufProcessor { ^this.new( server, nil, [harmonic, percussive, residual].select{|x| x!= -1} ).processList( - [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize,harmFilterSize, percFilterSize,1], freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, harmFilterSize, percFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone,action ); } diff --git a/release-packaging/Classes/FluidBufMelBands.sc b/release-packaging/Classes/FluidBufMelBands.sc index 469689ef..1d2f8d96 100644 --- a/release-packaging/Classes/FluidBufMelBands.sc +++ b/release-packaging/Classes/FluidBufMelBands.sc @@ -11,7 +11,7 @@ FluidBufMelBands : FluidBufProcessor { features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufMelBandsTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numBands, minFreq, maxFreq, numBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^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| @@ -27,7 +27,7 @@ FluidBufMelBands : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, minFreq, maxFreq, numBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -44,7 +44,7 @@ FluidBufMelBands : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, minFreq, maxFreq, numBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufNoveltyFeature.sc b/release-packaging/Classes/FluidBufNoveltyFeature.sc index 83b666c4..19fbe8db 100644 --- a/release-packaging/Classes/FluidBufNoveltyFeature.sc +++ b/release-packaging/Classes/FluidBufNoveltyFeature.sc @@ -14,7 +14,7 @@ FluidBufNoveltyFeature : FluidBufProcessor { source.isNil.if {"FluidBufNoveltyFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufNoveltyFeature: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufNoveltyFeatureTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNoveltyFeatureTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, kernelSize, filterSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } @@ -31,7 +31,7 @@ FluidBufNoveltyFeature : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, kernelSize, filterSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -48,7 +48,7 @@ FluidBufNoveltyFeature : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, kernelSize, filterSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufNoveltySlice.sc b/release-packaging/Classes/FluidBufNoveltySlice.sc index c4d36ab4..b53820e5 100644 --- a/release-packaging/Classes/FluidBufNoveltySlice.sc +++ b/release-packaging/Classes/FluidBufNoveltySlice.sc @@ -10,7 +10,7 @@ FluidBufNoveltySlice : FluidBufProcessor { source.isNil.if {"FluidBufNoveltySlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufNoveltySlice: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufNoveltySliceTrigger, -1, source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNoveltySliceTrigger, -1, source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, kernelSize, threshold, filterSize, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } @@ -27,7 +27,7 @@ FluidBufNoveltySlice : FluidBufProcessor { ^this.new( server, nil, [indices] ).processList( - [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, kernelSize, threshold, filterSize, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -44,7 +44,7 @@ FluidBufNoveltySlice : FluidBufProcessor { ^this.new( server, nil, [indices] ).processList( - [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, kernelSize, threshold, filterSize, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidChroma.sc b/release-packaging/Classes/FluidChroma.sc index 50c1a7aa..a9049eac 100644 --- a/release-packaging/Classes/FluidChroma.sc +++ b/release-packaging/Classes/FluidChroma.sc @@ -1,20 +1,23 @@ FluidChroma : FluidRTMultiOutUGen { - *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumChroma = 120, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numChroma, ref, normalize, minFreq, maxFreq, maxNumChroma, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumChroma, maxFFTSize; + + maxNumChroma = maxNumChroma ? numChroma; + + ^this.multiNew('control', in.asAudioRateInput(this), numChroma, maxNumChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - ^this.initOutputs(inputs.at(6),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(2),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { // the checks of rates here are in the order of the kr method definition - if(inputs.at(10).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxNumChroma cannot be modulated."); }; - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); };^this.checkValidInputs; } diff --git a/release-packaging/Classes/FluidHPSS.sc b/release-packaging/Classes/FluidHPSS.sc index 8fecd18c..082d6322 100644 --- a/release-packaging/Classes/FluidHPSS.sc +++ b/release-packaging/Classes/FluidHPSS.sc @@ -1,6 +1,10 @@ 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; - ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, maxHarmFilterSize, maxPercFilterSize) + *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, maxHarmFilterSize, maxPercFilterSize; + + maxHarmFilterSize = maxHarmFilterSize ? harmFilterSize; + maxPercFilterSize = maxPercFilterSize ? percFilterSize; + + ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, maxHarmFilterSize, percFilterSize, maxPercFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize) } init { arg ... theInputs; inputs = theInputs; @@ -12,13 +16,13 @@ FluidHPSS : FluidRTMultiOutUGen { ^channels } checkInputs { - if(inputs.at(15).rate != 'scalar') { + if(inputs.at(17).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; - if(inputs.at(16).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxHarmFilterSize cannot be modulated."); }; - if(inputs.at(17).rate != 'scalar') { + if(inputs.at(4).rate != 'scalar') { ^(": maxPercFilterSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index 406e84fe..45782050 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,6 +1,6 @@ FluidMFCC : FluidRTMultiOutUGen { - *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = nil, maxFFTSize = 16384; + *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = nil, maxFFTSize; maxNumCoeffs = maxNumCoeffs ? numCoeffs; diff --git a/release-packaging/Classes/FluidMelBands.sc b/release-packaging/Classes/FluidMelBands.sc index a2c6b2e8..9e007418 100644 --- a/release-packaging/Classes/FluidMelBands.sc +++ b/release-packaging/Classes/FluidMelBands.sc @@ -1,20 +1,23 @@ FluidMelBands : FluidRTMultiOutUGen { - *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumBands = 120, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numBands, minFreq, maxFreq, maxNumBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumBands, maxFFTSize; + + maxNumBands = maxNumBands ? numBands; + + ^this.multiNew('control', in.asAudioRateInput(this), numBands, maxNumBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - ^this.initOutputs(inputs.at(4),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(2),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { // the checks of rates here are in the order of the kr method definition - if(inputs.at(10).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxNumBands cannot be modulated."); }; - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); };^this.checkValidInputs; } diff --git a/release-packaging/Classes/FluidNMFFilter.sc b/release-packaging/Classes/FluidNMFFilter.sc index 75a0f741..f10e8137 100644 --- a/release-packaging/Classes/FluidNMFFilter.sc +++ b/release-packaging/Classes/FluidNMFFilter.sc @@ -1,7 +1,7 @@ FluidNMFFilter : FluidRTMultiOutUGen { - *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); + *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; + ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; @@ -10,10 +10,10 @@ FluidNMFFilter : FluidRTMultiOutUGen { } checkInputs { - if(inputs.at(2).rate != 'scalar') { + if(inputs.at(3).rate != 'scalar') { ^(": maxComponents cannot be modulated."); }; - if(inputs.at(7).rate != 'scalar') { + if(inputs.at(8).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidNMFMatch.sc b/release-packaging/Classes/FluidNMFMatch.sc index 16dd8278..cf875b38 100644 --- a/release-packaging/Classes/FluidNMFMatch.sc +++ b/release-packaging/Classes/FluidNMFMatch.sc @@ -1,7 +1,7 @@ FluidNMFMatch : FluidRTMultiOutUGen { - *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); + *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; + ^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; @@ -10,10 +10,10 @@ FluidNMFMatch : FluidRTMultiOutUGen { } checkInputs { - if(inputs.at(2).rate != 'scalar') { + if(inputs.at(3).rate != 'scalar') { ^(": maxComponents cannot be modulated."); }; - if(inputs.at(7).rate != 'scalar') { + if(inputs.at(8).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidNMFMorph.sc b/release-packaging/Classes/FluidNMFMorph.sc index ed95f43b..6553fb6f 100644 --- a/release-packaging/Classes/FluidNMFMorph.sc +++ b/release-packaging/Classes/FluidNMFMorph.sc @@ -1,6 +1,6 @@ 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; source = source ?? {-1}; target = target ?? {-1}; diff --git a/release-packaging/Classes/FluidNoveltyFeature.sc b/release-packaging/Classes/FluidNoveltyFeature.sc index ce6a0f48..c6cebde7 100644 --- a/release-packaging/Classes/FluidNoveltyFeature.sc +++ b/release-packaging/Classes/FluidNoveltyFeature.sc @@ -1,15 +1,20 @@ FluidNoveltyFeature : FluidRTUGen { - *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100; - ^this.multiNew('control', in.asAudioRateInput(this), algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize) + *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize, maxKernelSize, maxFilterSize; + + maxKernelSize = maxKernelSize ? kernelSize; + maxFilterSize = maxFilterSize ? filterSize; + + ^this.multiNew('control', in.asAudioRateInput(this), algorithm, kernelSize, maxKernelSize, filterSize, maxFilterSize, windowSize, hopSize, fftSize, maxFFTSize) } + checkInputs { - if(inputs.at(6).rate != 'scalar') { + if(inputs.at(9).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; - if(inputs.at(7).rate != 'scalar') { + if(inputs.at(3).rate != 'scalar') { ^(": maxKernelSize cannot be modulated."); }; - if(inputs.at(8).rate != 'scalar') { + if(inputs.at(5).rate != 'scalar') { ^(": maxFilterSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidNoveltySlice.sc b/release-packaging/Classes/FluidNoveltySlice.sc index f475708d..24f9a4ec 100644 --- a/release-packaging/Classes/FluidNoveltySlice.sc +++ b/release-packaging/Classes/FluidNoveltySlice.sc @@ -6,18 +6,22 @@ FluidNoveltySlice : FluidRTUGen { const Date: Wed, 11 May 2022 10:41:36 +0100 Subject: [PATCH 22/63] SpectralShape SC class: maxFFT --- release-packaging/Classes/FluidSpectralShape.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/Classes/FluidSpectralShape.sc b/release-packaging/Classes/FluidSpectralShape.sc index 9508f7ee..33ba248b 100644 --- a/release-packaging/Classes/FluidSpectralShape.sc +++ b/release-packaging/Classes/FluidSpectralShape.sc @@ -24,7 +24,7 @@ FluidSpectralShape : FluidRTMultiOutUGen { *kr { arg in = 0, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; - + maxFFTSize = maxFFTSize ? -1; ^this.multiNew('control', in.asAudioRateInput(this), selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize); } From 009536de7c8583124430e945f3726fd7a205c38f Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Wed, 11 May 2022 10:42:27 +0100 Subject: [PATCH 23/63] RealTime wrapper: play it safer with output channel count This really relies on the SC class being correct, but then everything ultimately does... --- include/wrapper/RealTimeBase.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/wrapper/RealTimeBase.hpp b/include/wrapper/RealTimeBase.hpp index 2814af51..feccfb88 100644 --- a/include/wrapper/RealTimeBase.hpp +++ b/include/wrapper/RealTimeBase.hpp @@ -185,7 +185,9 @@ struct RealTimeBase void mapControlOutputs(SCUnit& unit, Client&) { - for (index i = 0; i < mControlOutputBuffer.size(); ++i) + index numOuts = std::min(mControlOutputBuffer.size(),unit.mNumOutputs); + + for (index i = 0; i < numOuts; ++i) { assert(i <= std::numeric_limits::max()); unit.out0(static_cast(i)) = mControlOutputBuffer(i); From 834828435bff3cbb44b761d50d33abe508dd4d60 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Wed, 11 May 2022 10:51:00 +0100 Subject: [PATCH 24/63] RT FFT Object SC Classes: Provide maxFFTSize default --- release-packaging/Classes/FluidAudioTransport.sc | 2 +- release-packaging/Classes/FluidChroma.sc | 2 +- release-packaging/Classes/FluidHPSS.sc | 2 +- release-packaging/Classes/FluidMFCC.sc | 2 +- release-packaging/Classes/FluidMelBands.sc | 2 +- release-packaging/Classes/FluidNMFFilter.sc | 2 +- release-packaging/Classes/FluidNMFMatch.sc | 2 +- release-packaging/Classes/FluidNMFMorph.sc | 2 +- release-packaging/Classes/FluidNoveltyFeature.sc | 2 +- release-packaging/Classes/FluidNoveltySlice.sc | 2 +- release-packaging/Classes/FluidOnsetFeature.sc | 2 +- release-packaging/Classes/FluidOnsetSlice.sc | 2 +- release-packaging/Classes/FluidPitch.sc | 2 +- release-packaging/Classes/FluidSTFTPass.sc | 2 +- release-packaging/Classes/FluidSines.sc | 2 +- release-packaging/Classes/FluidSpectralShape.sc | 4 ++-- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/release-packaging/Classes/FluidAudioTransport.sc b/release-packaging/Classes/FluidAudioTransport.sc index b2208fd7..49a33573 100644 --- a/release-packaging/Classes/FluidAudioTransport.sc +++ b/release-packaging/Classes/FluidAudioTransport.sc @@ -7,7 +7,7 @@ FluidAudioTransport : FluidRTUGen { // ^this.initOutputs(1,rate); } - *ar { arg in = 0, in2 = 0, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; + *ar { arg in = 0, in2 = 0, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; ^this.multiNew('audio', in.asAudioRateInput, in2, interpolation, windowSize, hopSize, fftSize, maxFFTSize) } } diff --git a/release-packaging/Classes/FluidChroma.sc b/release-packaging/Classes/FluidChroma.sc index a9049eac..d9a76025 100644 --- a/release-packaging/Classes/FluidChroma.sc +++ b/release-packaging/Classes/FluidChroma.sc @@ -1,6 +1,6 @@ FluidChroma : FluidRTMultiOutUGen { - *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumChroma, maxFFTSize; + *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumChroma, maxFFTSize = -1; maxNumChroma = maxNumChroma ? numChroma; diff --git a/release-packaging/Classes/FluidHPSS.sc b/release-packaging/Classes/FluidHPSS.sc index 082d6322..a2960e58 100644 --- a/release-packaging/Classes/FluidHPSS.sc +++ b/release-packaging/Classes/FluidHPSS.sc @@ -1,5 +1,5 @@ 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, maxHarmFilterSize, maxPercFilterSize; + *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 = -1, maxHarmFilterSize, maxPercFilterSize; maxHarmFilterSize = maxHarmFilterSize ? harmFilterSize; maxPercFilterSize = maxPercFilterSize ? percFilterSize; diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index 45782050..0a1bdbe2 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,6 +1,6 @@ FluidMFCC : FluidRTMultiOutUGen { - *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = nil, maxFFTSize; + *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = nil, maxFFTSize = -1; maxNumCoeffs = maxNumCoeffs ? numCoeffs; diff --git a/release-packaging/Classes/FluidMelBands.sc b/release-packaging/Classes/FluidMelBands.sc index 9e007418..862e321c 100644 --- a/release-packaging/Classes/FluidMelBands.sc +++ b/release-packaging/Classes/FluidMelBands.sc @@ -1,6 +1,6 @@ FluidMelBands : FluidRTMultiOutUGen { - *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumBands, maxFFTSize; + *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumBands, maxFFTSize = -1; maxNumBands = maxNumBands ? numBands; diff --git a/release-packaging/Classes/FluidNMFFilter.sc b/release-packaging/Classes/FluidNMFFilter.sc index f10e8137..6c60c490 100644 --- a/release-packaging/Classes/FluidNMFFilter.sc +++ b/release-packaging/Classes/FluidNMFFilter.sc @@ -1,6 +1,6 @@ FluidNMFFilter : FluidRTMultiOutUGen { - *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; + *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } diff --git a/release-packaging/Classes/FluidNMFMatch.sc b/release-packaging/Classes/FluidNMFMatch.sc index cf875b38..a0904a66 100644 --- a/release-packaging/Classes/FluidNMFMatch.sc +++ b/release-packaging/Classes/FluidNMFMatch.sc @@ -1,6 +1,6 @@ FluidNMFMatch : FluidRTMultiOutUGen { - *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; + *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; ^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } diff --git a/release-packaging/Classes/FluidNMFMorph.sc b/release-packaging/Classes/FluidNMFMorph.sc index 6553fb6f..cc64e779 100644 --- a/release-packaging/Classes/FluidNMFMorph.sc +++ b/release-packaging/Classes/FluidNMFMorph.sc @@ -1,6 +1,6 @@ FluidNMFMorph : FluidRTUGen { - *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interp = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize; + *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interp = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; source = source ?? {-1}; target = target ?? {-1}; diff --git a/release-packaging/Classes/FluidNoveltyFeature.sc b/release-packaging/Classes/FluidNoveltyFeature.sc index c6cebde7..ddb63139 100644 --- a/release-packaging/Classes/FluidNoveltyFeature.sc +++ b/release-packaging/Classes/FluidNoveltyFeature.sc @@ -1,5 +1,5 @@ FluidNoveltyFeature : FluidRTUGen { - *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize, maxKernelSize, maxFilterSize; + *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxKernelSize, maxFilterSize; maxKernelSize = maxKernelSize ? kernelSize; maxFilterSize = maxFilterSize ? filterSize; diff --git a/release-packaging/Classes/FluidNoveltySlice.sc b/release-packaging/Classes/FluidNoveltySlice.sc index 24f9a4ec..9dd78dfa 100644 --- a/release-packaging/Classes/FluidNoveltySlice.sc +++ b/release-packaging/Classes/FluidNoveltySlice.sc @@ -6,7 +6,7 @@ FluidNoveltySlice : FluidRTUGen { const Date: Wed, 11 May 2022 18:28:11 +0100 Subject: [PATCH 25/63] BufSTFT SC class: Add maxFFT (now needed due to core type change) --- release-packaging/Classes/FluidBufSTFT.sc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-packaging/Classes/FluidBufSTFT.sc b/release-packaging/Classes/FluidBufSTFT.sc index 3726ef21..67245a01 100644 --- a/release-packaging/Classes/FluidBufSTFT.sc +++ b/release-packaging/Classes/FluidBufSTFT.sc @@ -10,7 +10,7 @@ FluidBufSTFT : FluidBufProcessor { phase = phase ? -1; resynth = resynth ? - 1; - ^FluidProxyUgen.kr(\FluidBufSTFTTrigger, -1, source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufSTFTTrigger, -1, source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, -1, trig, blocking); } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, magnitude, phase, resynth, inverse = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| @@ -26,7 +26,7 @@ FluidBufSTFT : FluidBufProcessor { ^this.new( server, nil, [magnitude,phase,resynth].select{|b| b != -1} ).processList( - [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, 0], freeWhenDone, action + [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, -1, 0], freeWhenDone, action ); } @@ -41,7 +41,7 @@ FluidBufSTFT : FluidBufProcessor { ^this.new( server, nil, [magnitude,phase,resynth].select{|b| b != -1} ).processList( - [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, 1], freeWhenDone, action + [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, -1, 1], freeWhenDone, action ); } } From 3b7e79ebacb0ffaa3c228d0fd5fbb17da876c34d Mon Sep 17 00:00:00 2001 From: Owen Green Date: Fri, 13 May 2022 12:43:06 +0100 Subject: [PATCH 26/63] Add select param to Loudness and Pitch SC clases (#101) --- release-packaging/Classes/FluidBufLoudness.sc | 41 +++++++++++++++---- release-packaging/Classes/FluidBufPitch.sc | 38 ++++++++++++++--- release-packaging/Classes/FluidLoudness.sc | 36 +++++++++++++--- release-packaging/Classes/FluidPitch.sc | 34 +++++++++++++-- 4 files changed, 127 insertions(+), 22 deletions(-) diff --git a/release-packaging/Classes/FluidBufLoudness.sc b/release-packaging/Classes/FluidBufLoudness.sc index 8b15d68a..6b95a20b 100644 --- a/release-packaging/Classes/FluidBufLoudness.sc +++ b/release-packaging/Classes/FluidBufLoudness.sc @@ -1,7 +1,30 @@ FluidBufLoudness : FluidBufProcessor{ - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, trig = 1, blocking = 0| + + const (1< 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| var maxwindowSize = windowSize.nextPowerOfTwo; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -9,13 +32,15 @@ FluidBufLoudness : FluidBufProcessor{ source.isNil.if {"FluidBufPitch: Invalid source buffer".throw}; features.isNil.if {"FluidBufPitch: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufLoudnessTrigger, -1, source, startFrame, numFrames, startChan, numChans, features,padding, 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, 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 selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + source = source.asUGenInput; features = features.asUGenInput; @@ -25,13 +50,15 @@ FluidBufLoudness : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,0],freeWhenDone,action + [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, 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 selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -42,7 +69,7 @@ FluidBufLoudness : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features,padding, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features,padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufPitch.sc b/release-packaging/Classes/FluidBufPitch.sc index d62190bd..86a0cb1f 100644 --- a/release-packaging/Classes/FluidBufPitch.sc +++ b/release-packaging/Classes/FluidBufPitch.sc @@ -1,8 +1,30 @@ FluidBufPitch : FluidBufProcessor{ - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| + const (1< 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, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -10,14 +32,16 @@ FluidBufPitch : FluidBufProcessor{ source.isNil.if {"FluidBufPitch: Invalid source buffer".throw}; features.isNil.if {"FluidBufPitch: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufPitchTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufPitchTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + source = source.asUGenInput; features = features.asUGenInput; @@ -27,13 +51,15 @@ FluidBufPitch : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action ); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -44,7 +70,7 @@ FluidBufPitch : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action ); } } diff --git a/release-packaging/Classes/FluidLoudness.sc b/release-packaging/Classes/FluidLoudness.sc index f5ca703f..4018dc90 100644 --- a/release-packaging/Classes/FluidLoudness.sc +++ b/release-packaging/Classes/FluidLoudness.sc @@ -1,15 +1,41 @@ FluidLoudness : FluidRTMultiOutUGen { - *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); + + const (1< 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)}; + + ^this.multiNew('control', in.asAudioRateInput(this), selectbits, kWeighting, truePeak, windowSize, hopSize, maxWindowSize); } - init {arg ...theInputs; + init {arg ...theInputs; + var numChannels; inputs = theInputs; - ^this.initOutputs(2,rate); + numChannels = inputs.at(1).asBinaryDigits.sum; + ^this.initOutputs(numChannels,rate); } checkInputs { - if(inputs.at(5).rate != 'scalar') { + if(inputs.at(6).rate != 'scalar') { ^(": maxwindowSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidPitch.sc b/release-packaging/Classes/FluidPitch.sc index 7756d19b..da15c3f0 100644 --- a/release-packaging/Classes/FluidPitch.sc +++ b/release-packaging/Classes/FluidPitch.sc @@ -1,16 +1,42 @@ FluidPitch : FluidRTMultiOutUGen { - *kr { arg in = 0, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; - ^this.multiNew('control', in.asAudioRateInput(this), algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize); + const (1< 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)}; + + ^this.multiNew('control', in.asAudioRateInput(this), selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; + var numChannels; inputs = theInputs; - ^this.initOutputs(2,rate); + numChannels = inputs.at(1).asBinaryDigits.sum; + ^this.initOutputs(numChannels,rate); } checkInputs { - if(inputs.at(5).rate != 'scalar') { + if(inputs.at(9).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; From 759066b574f18d48ebd3d710e695c66057c7f61b Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 17 May 2022 23:47:14 +0100 Subject: [PATCH 27/63] Wrapper: workaround scsynth 32 char cmd length limit with extra dispatch layer also avoids need for formerly truncated plugin names in some cases --- include/wrapper/Messaging.hpp | 11 +----- include/wrapper/NonRealtime.hpp | 38 ++++++++++++++++++- .../Classes/FluidBufAudioTransport.sc | 4 -- .../Classes/FluidBufNoveltyFeature.sc | 4 -- .../Classes/FluidBufSpectralShape.sc | 4 -- .../Classes/FluidBufTransientSlice.sc | 2 - .../Classes/FluidServerObject.sc | 15 +++----- .../FluidBufAudioTransport.cpp | 2 +- .../FluidBufNoveltyFeature.cpp | 2 +- .../FluidBufSpectralShape.cpp | 2 +- .../FluidBufTransientSlice.cpp | 2 +- 11 files changed, 48 insertions(+), 38 deletions(-) diff --git a/include/wrapper/Messaging.hpp b/include/wrapper/Messaging.hpp index 7e8f173c..92375257 100644 --- a/include/wrapper/Messaging.hpp +++ b/include/wrapper/Messaging.hpp @@ -54,17 +54,10 @@ struct FluidSCMessaging{ template struct SetupMessageCmd { - void operator()(const T& message) { - static std::string messageName = std::string{getName()} + '/' + message.name; - - if(messageName.size() >= 32u) - messageName = remove_vowel(messageName); - - auto ft = getInterfaceTable(); - if(!ft->fDefinePlugInCmd(messageName.c_str(), doMessage,(void*)messageName.c_str())) - std::cout << "ERROR: failed to register command \"" << messageName << "\"\n"; + static std::string messageName = std::string{getName()} + '/' + message.name; + FluidSCWrapper::registerMessage(messageName.c_str(),doMessage); } }; diff --git a/include/wrapper/NonRealtime.hpp b/include/wrapper/NonRealtime.hpp index 32ca380b..1782fe2d 100644 --- a/include/wrapper/NonRealtime.hpp +++ b/include/wrapper/NonRealtime.hpp @@ -20,6 +20,12 @@ namespace impl { /// Non Real Time Processor + using ServerCommandFn = void(*)(World* world, void*, struct sc_msg_iter* args, + void* replyAddr); + + using CommandMap = std::unordered_map; + + template class NonRealTime : public SCUnit { @@ -829,8 +835,8 @@ class NonRealTime : public SCUnit completionMsgData); if (completionMsgSize) ft->fRTFree(world, completionMsgData); - }; - ft->fDefinePlugInCmd(Command::name(), commandRunner, nullptr); + }; + mCommandDispatchTable[Command::name()] = commandRunner; } @@ -1106,6 +1112,12 @@ class NonRealTime : public SCUnit static constexpr bool IsModel = Client::isModelObject::value; public: + + static void registerMessage(const char* name, ServerCommandFn f) + { + mCommandDispatchTable[name] = f; + } + static void setup(InterfaceTable* ft, const char*) { defineNRTCommand(); @@ -1125,6 +1137,21 @@ class NonRealTime : public SCUnit static std::string flushCmd = std::string(Wrapper::getName()) + "/flush"; + ft->fDefinePlugInCmd( + Wrapper::getName(), + [](World* w, void* inUserData, struct sc_msg_iter* msg, void* replyAddr) + { + const char* name = msg->gets(); + + auto cmd = mCommandDispatchTable.find(name); + + if (cmd != mCommandDispatchTable.end()) + cmd->second(w, inUserData ? inUserData : (void*)name, msg, replyAddr); + else + std::cout << "ERROR: message " << name << " not registered."; + + }, nullptr); + ft->fDefinePlugInCmd( flushCmd.c_str(), [](World*, void*, struct sc_msg_iter*, void*) { mCache.clear(); }, @@ -1176,14 +1203,21 @@ class NonRealTime : public SCUnit index mPreviousTrigger{0}; bool mSynchronous{true}; Result mResult; + + static CommandMap mCommandDispatchTable; }; + template World* NonRealTime::mWorld{nullptr}; template typename NonRealTime::Cache NonRealTime::mCache{}; + +template +CommandMap NonRealTime::mCommandDispatchTable{}; + } // namespace impl } // namespace client diff --git a/release-packaging/Classes/FluidBufAudioTransport.sc b/release-packaging/Classes/FluidBufAudioTransport.sc index 973afa67..33a4477d 100644 --- a/release-packaging/Classes/FluidBufAudioTransport.sc +++ b/release-packaging/Classes/FluidBufAudioTransport.sc @@ -1,9 +1,5 @@ FluidBufAudioTransport : FluidBufProcessor { - *objectClassName{ - ^\FluidBufAudioTransp - } - *kr { |sourceA, startFrameA = 0, numFramesA = -1, startChanA = 0, numChansA = -1, sourceB, startFrameB = 0, numFramesB = -1, startChanB = 0, numChansB = -1, destination, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; diff --git a/release-packaging/Classes/FluidBufNoveltyFeature.sc b/release-packaging/Classes/FluidBufNoveltyFeature.sc index 19fbe8db..868c37a2 100644 --- a/release-packaging/Classes/FluidBufNoveltyFeature.sc +++ b/release-packaging/Classes/FluidBufNoveltyFeature.sc @@ -1,9 +1,5 @@ FluidBufNoveltyFeature : FluidBufProcessor { - *objectClassName{ - ^\FluidBufNoveltyF - } - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; diff --git a/release-packaging/Classes/FluidBufSpectralShape.sc b/release-packaging/Classes/FluidBufSpectralShape.sc index 9a47eda0..6ef0b680 100644 --- a/release-packaging/Classes/FluidBufSpectralShape.sc +++ b/release-packaging/Classes/FluidBufSpectralShape.sc @@ -1,9 +1,5 @@ FluidBufSpectralShape : FluidBufProcessor { - *objectClassName{ - ^\FluidBufSpecShp - } - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; diff --git a/release-packaging/Classes/FluidBufTransientSlice.sc b/release-packaging/Classes/FluidBufTransientSlice.sc index 38ff7a79..81bff0c7 100644 --- a/release-packaging/Classes/FluidBufTransientSlice.sc +++ b/release-packaging/Classes/FluidBufTransientSlice.sc @@ -1,7 +1,5 @@ FluidBufTransientSlice : FluidBufProcessor { - *objectClassName{^\FluidBufTrSlice} - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, windowSize = 14, clumpLength = 25, minSliceLength = 1000, trig = 1, blocking = 0| source = source.asUGenInput; diff --git a/release-packaging/Classes/FluidServerObject.sc b/release-packaging/Classes/FluidServerObject.sc index 0bf1479d..2fa5970b 100644 --- a/release-packaging/Classes/FluidServerObject.sc +++ b/release-packaging/Classes/FluidServerObject.sc @@ -30,8 +30,7 @@ FluidServerObject *newMsg{|id, params| params = params !? {params.collect(_.asUGenInput)}; - // ("Newms"++params).postln; - ^['/cmd',this.objectClassName ++ '/new',id] ++ params + ^this.prMakeMsg(\new,id,*params); } *new{ |server, id, params, action, callNew = true| @@ -55,15 +54,13 @@ FluidServerObject serverCaches[this.class].remove(server,id); } - prMakeMsg{|msg,id...args| - - var commandName = "%/%".format(this.class.objectClassName,msg); - - if(commandName.size >= 32) { commandName = commandName.select{|c|c.isVowel.not}}; - - ^['/cmd',commandName,id].addAll(args); + *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}; diff --git a/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp b/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp index 2d1476e2..2e84204a 100644 --- a/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp +++ b/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp @@ -17,5 +17,5 @@ PluginLoad(FluidSTFTUGen) { ft = inTable; using namespace fluid::client; - makeSCWrapper("FluidBufAudioTransp",ft); + makeSCWrapper("FluidBufAudioTransport",ft); } diff --git a/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp b/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp index 95314d33..841970f0 100644 --- a/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp +++ b/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp @@ -17,5 +17,5 @@ static InterfaceTable *ft; PluginLoad(OfflineFluidDecompositionUGens) { ft = inTable; using namespace fluid::client; - makeSCWrapper("FluidBufNoveltyF", ft); + makeSCWrapper("FluidBufNoveltyFeature", ft); } diff --git a/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp b/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp index 09685d86..adda5b1d 100644 --- a/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp +++ b/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp @@ -17,5 +17,5 @@ static InterfaceTable *ft; PluginLoad(OfflineFluidDecompositionUGens) { ft = inTable; using namespace fluid::client; - makeSCWrapper("FluidBufSpecShp", ft); + makeSCWrapper("FluidBufSpectralShape", ft); } diff --git a/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp b/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp index 7354e084..520b0667 100644 --- a/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp +++ b/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp @@ -17,5 +17,5 @@ static InterfaceTable* ft; PluginLoad(OfflineFluidDecompositionUGens) { ft = inTable; using namespace fluid::client; - makeSCWrapper("FluidBufTrSlice", ft); + makeSCWrapper("FluidBufTransientSlice", ft); } From 4398cfe4a1b951d6e0c269a2d753aeba2d9f7abf Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Wed, 25 May 2022 15:37:26 +0100 Subject: [PATCH 28/63] removed invert from scalers class definitions (#102) --- release-packaging/Classes/FluidNormalize.sc | 2 +- release-packaging/Classes/FluidRobustScale.sc | 4 ++-- release-packaging/Classes/FluidStandardize.sc | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/release-packaging/Classes/FluidNormalize.sc b/release-packaging/Classes/FluidNormalize.sc index 6147d6fa..e7e40bf0 100644 --- a/release-packaging/Classes/FluidNormalize.sc +++ b/release-packaging/Classes/FluidNormalize.sc @@ -1,6 +1,6 @@ FluidNormalize : FluidModelObject { - var <>min, <>max, <>invert; + var <>min, <>max; *new {|server, min = 0, max = 1| ^super.new(server,[min,max]) diff --git a/release-packaging/Classes/FluidRobustScale.sc b/release-packaging/Classes/FluidRobustScale.sc index 0126f306..87ebefa9 100644 --- a/release-packaging/Classes/FluidRobustScale.sc +++ b/release-packaging/Classes/FluidRobustScale.sc @@ -2,8 +2,8 @@ FluidRobustScale : FluidModelObject { var <>low, <>high; - *new {|server, low = 25, high = 75, invert = 0| - ^super.new(server,[low,high,invert]) + *new {|server, low = 25, high = 75| + ^super.new(server,[low,high]) .low_(low).high_(high); } diff --git a/release-packaging/Classes/FluidStandardize.sc b/release-packaging/Classes/FluidStandardize.sc index 2e5e9ca1..05f0f4a7 100644 --- a/release-packaging/Classes/FluidStandardize.sc +++ b/release-packaging/Classes/FluidStandardize.sc @@ -1,8 +1,6 @@ FluidStandardize : FluidModelObject { - var <>invert; - - *new {|server, invert = 0| + *new {|server| ^super.new(server,[]); } From 9cbd7d5e39b978eb4bc6b50d39276be1e12a9470 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Thu, 26 May 2022 09:59:11 +0100 Subject: [PATCH 29/63] Enhance/generate stubs (#104) * CMake: generate .cpp stubs * Remove old cpp stubs * Ensure correct MSVC runtime by default * CMake: invoke docs properly * CMake: Tidy up * CMake: Tidy up --- CMakeLists.txt | 96 ++++---- scripts/MakeDevTree.cmake | 28 +++ scripts/MakePluginSources.cmake | 129 +++++++++++ scripts/target_post.cmake | 95 -------- src/FluidAmpFeature/CMakeLists.txt | 21 -- src/FluidAmpFeature/FluidAmpFeature.cpp | 22 -- src/FluidAmpGate/CMakeLists.txt | 21 -- src/FluidAmpGate/FluidAmpGate.cpp | 22 -- src/FluidAmpSlice/CMakeLists.txt | 21 -- src/FluidAmpSlice/FluidAmpSlice.cpp | 22 -- src/FluidAudioTransport/CMakeLists.txt | 21 -- .../FluidAudioTransport.cpp | 21 -- src/FluidBufAmpFeature/CMakeLists.txt | 21 -- src/FluidBufAmpFeature/FluidBufAmpFeature.cpp | 22 -- src/FluidBufAmpGate/CMakeLists.txt | 21 -- src/FluidBufAmpGate/FluidBufAmpGate.cpp | 22 -- src/FluidBufAmpSlice/CMakeLists.txt | 21 -- src/FluidBufAmpSlice/FluidBufAmpSlice.cpp | 22 -- src/FluidBufAudioTransport/CMakeLists.txt | 21 -- .../FluidBufAudioTransport.cpp | 21 -- src/FluidBufChroma/CMakeLists.txt | 21 -- src/FluidBufChroma/FluidBufChroma.cpp | 21 -- src/FluidBufCompose/CMakeLists.txt | 21 -- src/FluidBufCompose/FluidBufCompose.cpp | 22 -- src/FluidBufCompose/tests.scd | 67 ------ src/FluidBufFlatten/CMakeLists.txt | 21 -- src/FluidBufFlatten/FluidBufFlatten.cpp | 22 -- src/FluidBufHPSS/CMakeLists.txt | 21 -- src/FluidBufHPSS/FluidBufHPSS.cpp | 23 -- src/FluidBufHPSS/tests.scd | 51 ----- src/FluidBufLoudness/CMakeLists.txt | 21 -- src/FluidBufLoudness/FluidBufLoudness.cpp | 21 -- src/FluidBufMFCC/CMakeLists.txt | 21 -- src/FluidBufMFCC/FluidBufMFCC.cpp | 21 -- src/FluidBufMelBands/CMakeLists.txt | 21 -- src/FluidBufMelBands/FluidBufMelBands.cpp | 21 -- src/FluidBufNMF/CMakeLists.txt | 21 -- src/FluidBufNMF/FluidBufNMF.cpp | 22 -- src/FluidBufNMF/tests.scd | 214 ------------------ src/FluidBufNNDSVD/CMakeLists.txt | 21 -- src/FluidBufNNDSVD/FluidBufNNDSVD.cpp | 22 -- src/FluidBufNoveltyFeature/CMakeLists.txt | 21 -- .../FluidBufNoveltyFeature.cpp | 21 -- src/FluidBufNoveltySlice/CMakeLists.txt | 21 -- .../FluidBufNoveltySlice.cpp | 21 -- src/FluidBufOnsetFeature/CMakeLists.txt | 21 -- .../FluidBufOnsetFeature.cpp | 21 -- src/FluidBufOnsetSlice/CMakeLists.txt | 21 -- src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp | 21 -- src/FluidBufPitch/CMakeLists.txt | 22 -- src/FluidBufPitch/FluidBufPitch.cpp | 21 -- src/FluidBufSTFT/CMakeLists.txt | 21 -- src/FluidBufSTFT/FluidBufSTFT.cpp | 22 -- src/FluidBufScale/CMakeLists.txt | 21 -- src/FluidBufScale/FluidBufScale.cpp | 22 -- src/FluidBufSelect/CMakeLists.txt | 21 -- src/FluidBufSelect/FluidBufSelect.cpp | 22 -- src/FluidBufSelectEvery/CMakeLists.txt | 21 -- .../FluidBufSelectEvery.cpp | 22 -- src/FluidBufSines/CMakeLists.txt | 21 -- src/FluidBufSines/FluidBufSines.cpp | 22 -- src/FluidBufSines/tests.scd | 38 ---- src/FluidBufSpectralShape/CMakeLists.txt | 21 -- .../FluidBufSpectralShape.cpp | 21 -- src/FluidBufStats/CMakeLists.txt | 21 -- src/FluidBufStats/FluidBufStats.cpp | 22 -- src/FluidBufThreadDemo/CMakeLists.txt | 21 -- src/FluidBufThreadDemo/FluidBufThreadDemo.cpp | 21 -- src/FluidBufThresh/CMakeLists.txt | 21 -- src/FluidBufThresh/FluidBufThresh.cpp | 22 -- src/FluidBufTransientSlice/CMakeLists.txt | 21 -- .../FluidBufTransientSlice.cpp | 21 -- src/FluidBufTransientSlice/tests.scd | 71 ------ src/FluidBufTransients/CMakeLists.txt | 22 -- src/FluidBufTransients/FluidBufTransients.cpp | 22 -- src/FluidBufTransients/tests.scd | 39 ---- src/FluidChroma/CMakeLists.txt | 21 -- src/FluidChroma/FluidChroma.cpp | 21 -- src/FluidGain/CMakeLists.txt | 21 -- src/FluidGain/FluidGain.cpp | 22 -- src/FluidHPSS/CMakeLists.txt | 21 -- src/FluidHPSS/FluidHPSS.cpp | 22 -- src/FluidHPSS/test.scd | 33 --- src/FluidLoudness/CMakeLists.txt | 21 -- src/FluidLoudness/FluidLoudness.cpp | 21 -- src/FluidMFCC/CMakeLists.txt | 21 -- src/FluidMFCC/FluidMFCC.cpp | 21 -- src/FluidManipulation/CMakeLists.txt | 24 -- src/FluidManipulation/FluidManipulation.cpp | 71 ------ src/FluidMelBands/CMakeLists.txt | 21 -- src/FluidMelBands/FluidMelBands.cpp | 21 -- src/FluidNMFCross/CMakeLists.txt | 20 -- src/FluidNMFCross/FluidNMFCross.cpp | 12 - src/FluidNMFFilter/CMakeLists.txt | 21 -- src/FluidNMFFilter/FluidNMFFilter.cpp | 22 -- src/FluidNMFMatch/CMakeLists.txt | 21 -- src/FluidNMFMatch/FluidNMFMatch.cpp | 22 -- src/FluidNMFMatch/test.scd | 40 ---- src/FluidNMFMorph/CMakeLists.txt | 21 -- src/FluidNMFMorph/FluidNMFMorph.cpp | 22 -- src/FluidNoveltyFeature/CMakeLists.txt | 21 -- .../FluidNoveltyFeature.cpp | 21 -- src/FluidNoveltySlice/CMakeLists.txt | 21 -- src/FluidNoveltySlice/FluidNoveltySlice.cpp | 21 -- src/FluidOnsetFeature/CMakeLists.txt | 21 -- src/FluidOnsetFeature/FluidOnsetFeature.cpp | 21 -- src/FluidOnsetSlice/CMakeLists.txt | 21 -- src/FluidOnsetSlice/FluidOnsetSlice.cpp | 21 -- src/FluidPitch/CMakeLists.txt | 22 -- src/FluidPitch/FluidPitch.cpp | 21 -- src/FluidSTFTPass/CMakeLists.txt | 22 -- src/FluidSTFTPass/FluidSTFTPass.cpp | 22 -- src/FluidSines/CMakeLists.txt | 22 -- src/FluidSines/FluidSines.cpp | 22 -- src/FluidSines/test.scd | 13 -- src/FluidSpectralShape/CMakeLists.txt | 21 -- src/FluidSpectralShape/FluidSpectralShape.cpp | 21 -- src/FluidStats/CMakeLists.txt | 22 -- src/FluidStats/FluidStats.cpp | 22 -- src/FluidTransientSlice/CMakeLists.txt | 21 -- .../FluidTransientSlice.cpp | 22 -- src/FluidTransientSlice/test.scd | 21 -- src/FluidTransients/CMakeLists.txt | 21 -- src/FluidTransients/FluidTransients.cpp | 22 -- src/FluidTransients/test.scd | 14 -- 125 files changed, 213 insertions(+), 3125 deletions(-) create mode 100644 scripts/MakeDevTree.cmake create mode 100644 scripts/MakePluginSources.cmake delete mode 100644 scripts/target_post.cmake delete mode 100644 src/FluidAmpFeature/CMakeLists.txt delete mode 100644 src/FluidAmpFeature/FluidAmpFeature.cpp delete mode 100644 src/FluidAmpGate/CMakeLists.txt delete mode 100644 src/FluidAmpGate/FluidAmpGate.cpp delete mode 100644 src/FluidAmpSlice/CMakeLists.txt delete mode 100644 src/FluidAmpSlice/FluidAmpSlice.cpp delete mode 100644 src/FluidAudioTransport/CMakeLists.txt delete mode 100644 src/FluidAudioTransport/FluidAudioTransport.cpp delete mode 100644 src/FluidBufAmpFeature/CMakeLists.txt delete mode 100644 src/FluidBufAmpFeature/FluidBufAmpFeature.cpp delete mode 100644 src/FluidBufAmpGate/CMakeLists.txt delete mode 100644 src/FluidBufAmpGate/FluidBufAmpGate.cpp delete mode 100644 src/FluidBufAmpSlice/CMakeLists.txt delete mode 100644 src/FluidBufAmpSlice/FluidBufAmpSlice.cpp delete mode 100644 src/FluidBufAudioTransport/CMakeLists.txt delete mode 100644 src/FluidBufAudioTransport/FluidBufAudioTransport.cpp delete mode 100644 src/FluidBufChroma/CMakeLists.txt delete mode 100644 src/FluidBufChroma/FluidBufChroma.cpp delete mode 100755 src/FluidBufCompose/CMakeLists.txt delete mode 100644 src/FluidBufCompose/FluidBufCompose.cpp delete mode 100644 src/FluidBufCompose/tests.scd delete mode 100644 src/FluidBufFlatten/CMakeLists.txt delete mode 100644 src/FluidBufFlatten/FluidBufFlatten.cpp delete mode 100755 src/FluidBufHPSS/CMakeLists.txt delete mode 100644 src/FluidBufHPSS/FluidBufHPSS.cpp delete mode 100644 src/FluidBufHPSS/tests.scd delete mode 100644 src/FluidBufLoudness/CMakeLists.txt delete mode 100644 src/FluidBufLoudness/FluidBufLoudness.cpp delete mode 100644 src/FluidBufMFCC/CMakeLists.txt delete mode 100644 src/FluidBufMFCC/FluidBufMFCC.cpp delete mode 100644 src/FluidBufMelBands/CMakeLists.txt delete mode 100644 src/FluidBufMelBands/FluidBufMelBands.cpp delete mode 100755 src/FluidBufNMF/CMakeLists.txt delete mode 100644 src/FluidBufNMF/FluidBufNMF.cpp delete mode 100644 src/FluidBufNMF/tests.scd delete mode 100644 src/FluidBufNNDSVD/CMakeLists.txt delete mode 100644 src/FluidBufNNDSVD/FluidBufNNDSVD.cpp delete mode 100644 src/FluidBufNoveltyFeature/CMakeLists.txt delete mode 100644 src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp delete mode 100644 src/FluidBufNoveltySlice/CMakeLists.txt delete mode 100644 src/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp delete mode 100644 src/FluidBufOnsetFeature/CMakeLists.txt delete mode 100644 src/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp delete mode 100644 src/FluidBufOnsetSlice/CMakeLists.txt delete mode 100644 src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp delete mode 100644 src/FluidBufPitch/CMakeLists.txt delete mode 100644 src/FluidBufPitch/FluidBufPitch.cpp delete mode 100644 src/FluidBufSTFT/CMakeLists.txt delete mode 100644 src/FluidBufSTFT/FluidBufSTFT.cpp delete mode 100644 src/FluidBufScale/CMakeLists.txt delete mode 100644 src/FluidBufScale/FluidBufScale.cpp delete mode 100644 src/FluidBufSelect/CMakeLists.txt delete mode 100644 src/FluidBufSelect/FluidBufSelect.cpp delete mode 100644 src/FluidBufSelectEvery/CMakeLists.txt delete mode 100644 src/FluidBufSelectEvery/FluidBufSelectEvery.cpp delete mode 100755 src/FluidBufSines/CMakeLists.txt delete mode 100644 src/FluidBufSines/FluidBufSines.cpp delete mode 100644 src/FluidBufSines/tests.scd delete mode 100755 src/FluidBufSpectralShape/CMakeLists.txt delete mode 100644 src/FluidBufSpectralShape/FluidBufSpectralShape.cpp delete mode 100644 src/FluidBufStats/CMakeLists.txt delete mode 100644 src/FluidBufStats/FluidBufStats.cpp delete mode 100644 src/FluidBufThreadDemo/CMakeLists.txt delete mode 100644 src/FluidBufThreadDemo/FluidBufThreadDemo.cpp delete mode 100644 src/FluidBufThresh/CMakeLists.txt delete mode 100644 src/FluidBufThresh/FluidBufThresh.cpp delete mode 100755 src/FluidBufTransientSlice/CMakeLists.txt delete mode 100644 src/FluidBufTransientSlice/FluidBufTransientSlice.cpp delete mode 100644 src/FluidBufTransientSlice/tests.scd delete mode 100755 src/FluidBufTransients/CMakeLists.txt delete mode 100644 src/FluidBufTransients/FluidBufTransients.cpp delete mode 100644 src/FluidBufTransients/tests.scd delete mode 100644 src/FluidChroma/CMakeLists.txt delete mode 100644 src/FluidChroma/FluidChroma.cpp delete mode 100755 src/FluidGain/CMakeLists.txt delete mode 100644 src/FluidGain/FluidGain.cpp delete mode 100755 src/FluidHPSS/CMakeLists.txt delete mode 100644 src/FluidHPSS/FluidHPSS.cpp delete mode 100644 src/FluidHPSS/test.scd delete mode 100644 src/FluidLoudness/CMakeLists.txt delete mode 100644 src/FluidLoudness/FluidLoudness.cpp delete mode 100644 src/FluidMFCC/CMakeLists.txt delete mode 100644 src/FluidMFCC/FluidMFCC.cpp delete mode 100644 src/FluidManipulation/CMakeLists.txt delete mode 100644 src/FluidManipulation/FluidManipulation.cpp delete mode 100644 src/FluidMelBands/CMakeLists.txt delete mode 100644 src/FluidMelBands/FluidMelBands.cpp delete mode 100644 src/FluidNMFCross/CMakeLists.txt delete mode 100644 src/FluidNMFCross/FluidNMFCross.cpp delete mode 100644 src/FluidNMFFilter/CMakeLists.txt delete mode 100644 src/FluidNMFFilter/FluidNMFFilter.cpp delete mode 100755 src/FluidNMFMatch/CMakeLists.txt delete mode 100644 src/FluidNMFMatch/FluidNMFMatch.cpp delete mode 100644 src/FluidNMFMatch/test.scd delete mode 100644 src/FluidNMFMorph/CMakeLists.txt delete mode 100644 src/FluidNMFMorph/FluidNMFMorph.cpp delete mode 100644 src/FluidNoveltyFeature/CMakeLists.txt delete mode 100644 src/FluidNoveltyFeature/FluidNoveltyFeature.cpp delete mode 100644 src/FluidNoveltySlice/CMakeLists.txt delete mode 100644 src/FluidNoveltySlice/FluidNoveltySlice.cpp delete mode 100644 src/FluidOnsetFeature/CMakeLists.txt delete mode 100644 src/FluidOnsetFeature/FluidOnsetFeature.cpp delete mode 100644 src/FluidOnsetSlice/CMakeLists.txt delete mode 100644 src/FluidOnsetSlice/FluidOnsetSlice.cpp delete mode 100644 src/FluidPitch/CMakeLists.txt delete mode 100644 src/FluidPitch/FluidPitch.cpp delete mode 100755 src/FluidSTFTPass/CMakeLists.txt delete mode 100644 src/FluidSTFTPass/FluidSTFTPass.cpp delete mode 100755 src/FluidSines/CMakeLists.txt delete mode 100644 src/FluidSines/FluidSines.cpp delete mode 100644 src/FluidSines/test.scd delete mode 100644 src/FluidSpectralShape/CMakeLists.txt delete mode 100644 src/FluidSpectralShape/FluidSpectralShape.cpp delete mode 100644 src/FluidStats/CMakeLists.txt delete mode 100644 src/FluidStats/FluidStats.cpp delete mode 100755 src/FluidTransientSlice/CMakeLists.txt delete mode 100644 src/FluidTransientSlice/FluidTransientSlice.cpp delete mode 100644 src/FluidTransientSlice/test.scd delete mode 100755 src/FluidTransients/CMakeLists.txt delete mode 100644 src/FluidTransients/FluidTransients.cpp delete mode 100644 src/FluidTransients/test.scd diff --git a/CMakeLists.txt b/CMakeLists.txt index bbe8ebcf..2e2e39e4 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ cmake_minimum_required(VERSION 3.11) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") ################################################################################ # Paths @@ -33,6 +34,8 @@ endif() option(SYSTEM_BOOST "Use boost libraries from system. If your SC was built with this enabled, so should FluCoMa-sc" OFF) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/scripts") + ################################################################################ # Main project project (flucoma-sc LANGUAGES CXX) @@ -55,21 +58,8 @@ endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY ON) -MACRO(SUBDIRLIST result curdir) - FILE(GLOB children RELATIVE ${curdir} ${curdir}/*) - SET(dirlist "") - FOREACH(child ${children}) - IF(IS_DIRECTORY ${curdir}/${child}) - LIST(APPEND dirlist ${child}) - ENDIF() - ENDFOREACH() - SET(${result} ${dirlist}) -ENDMACRO() - include(FetchContent) -set(FETCHCONTENT_QUIET FALSE) - FetchContent_Declare( flucoma-core GIT_REPOSITORY https://github.com/flucoma/flucoma-core.git @@ -90,14 +80,14 @@ if(FLUID_PATH) ) endif() -FetchContent_GetProperties(flucoma-core) -if(NOT flucoma-core_POPULATED) - FetchContent_Populate(flucoma-core) - add_subdirectory(${flucoma-core_SOURCE_DIR} ${flucoma-core_BINARY_DIR}) - include(flucoma_version) - include(flucoma-buildtools) - include(flucoma-buildtype) -endif() +FetchContent_MakeAvailable(flucoma-core) +# if(NOT flucoma-core_POPULATED) +# FetchContent_Populate(flucoma-core) +# add_subdirectory(${flucoma-core_SOURCE_DIR} ${flucoma-core_BINARY_DIR}) +include(flucoma_version) +include(flucoma-buildtools) +include(flucoma-buildtype) +# endif() option(DOCS "Generate scdocs" OFF) set(FLUID_DOCS_PATH "" CACHE PATH "Optional path to flucoma-docs (needed for docs); will download if absent") @@ -111,15 +101,17 @@ if(DOCS) FETCHCONTENT_SOURCE_DIR_FLUCOMA-DOCS ${FLUID_DOCS_PATH} ABSOLUTE ) endif() - - FetchContent_GetProperties(flucoma-docs) - if(NOT flucoma-docs_POPULATED) - FetchContent_Populate(flucoma-docs) - file(GLOB_RECURSE DOC_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${flucoma-docs_SOURCE_DIR}/**/*.cpp" ) - source_group("\\SC Doc Gen" FILES ${DOC_SOURCE}) - add_subdirectory(${flucoma-docs_SOURCE_DIR} ${flucoma-docs_BINARY_DIR}) - endif() - + FetchContent_MakeAvailable(flucoma-docs) + # FetchContent_GetProperties(flucoma-docs) + # if(NOT flucoma-docs_POPULATED) + # FetchContent_Populate(flucoma-docs) + # file(GLOB_RECURSE DOC_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${flucoma-docs_SOURCE_DIR}/**/*.cpp" ) + # source_group("\\SC Doc Gen" FILES ${DOC_SOURCE}) + # add_subdirectory(${flucoma-docs_SOURCE_DIR} ${flucoma-docs_BINARY_DIR}) + # endif() + include(FlucomaDocs) + set(SC_DOC_OUT "${CMAKE_BINARY_DIR}/sc_ref") + add_ref_target(sc "Making SC docs") add_custom_target(SC_MAKE_DOCS ALL DEPENDS MAKE_SC_REF) endif() @@ -133,6 +125,9 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_LIBRARY_OUTPUT_DIRECT set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_TEST "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") set(CMAKE_SHARED_MODULE_PREFIX "") +set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/pdbtmp") +set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/pdbtmp") + if(APPLE OR WIN32) set(CMAKE_SHARED_MODULE_SUFFIX ".scx") endif() @@ -192,8 +187,8 @@ if(APPLE) target_compile_options(FLUID_SC_COPYREPLYADDR PRIVATE -stdlib=libc++) endif() -target_compile_definitions(FLUID_SC_COPYREPLYADDR PRIVATE BOOST_ALL_NO_LIB BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE) - +target_compile_definitions(FLUID_SC_COPYREPLYADDR PRIVATE BOOST_ALL_NO_LIB PUBLIC BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE) + add_library(FLUID_SC_WRAPPER INTERFACE) target_include_directories(FLUID_SC_WRAPPER INTERFACE @@ -208,18 +203,39 @@ target_sources(FLUID_SC_WRAPPER target_link_libraries(FLUID_SC_WRAPPER INTERFACE FLUID_SC_COPYREPLYADDR) -SUBDIRLIST(PROJECT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") -foreach (project_dir ${PROJECT_DIRS}) - if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/${project_dir}/CMakeLists.txt") - message("Generating: ${project_dir}") - add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/${project_dir}") - endif () -endforeach () +include(MakePluginSources) +# generate targets for standalone clients +get_client_group(NONE client_list) +foreach(client ${client_list}) + get_core_client_header(${client} header) + get_core_client_class(${client} class) + generate_sc_source( + CLIENTS ${client} + HEADERS ${header} + CLASSES ${class} + ) +endforeach() +add_client(DataSetWr clients/rt/FluidDataSetWr.hpp CLASS NRTThreadedDataSetWriter GROUP MANIPULATION) +#generate target for MANIPULATION group +get_client_group(MANIPULATION client_list) +foreach(client ${client_list}) + get_core_client_header(${client} header) + get_core_client_class(${client} class) + list(APPEND MANIPULATION_CLIENTS ${client}) + list(APPEND MANIPULATION_HEADERS ${header}) + list(APPEND MANIPULATION_CLASSES ${class}) +endforeach() -#install bits. +generate_sc_source( + CLIENTS ${MANIPULATION_CLIENTS} + HEADERS ${MANIPULATION_HEADERS} + CLASSES ${MANIPULATION_CLASSES} + FILENAME FluidManipulation +) +#install bits. set(SC_INSTALL_PREFIX "." CACHE PATH "Prefix for assembling SC packages") set(FLUID_PACKAGE_NAME FluidCorpusManipulation CACHE STRING "Name for published package") set(SC_PACKAGE_ROOT ${SC_INSTALL_PREFIX}/${FLUID_PACKAGE_NAME}) diff --git a/scripts/MakeDevTree.cmake b/scripts/MakeDevTree.cmake new file mode 100644 index 00000000..e883f7c2 --- /dev/null +++ b/scripts/MakeDevTree.cmake @@ -0,0 +1,28 @@ +# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) +# Copyright 2017-2019 University of Huddersfield. +# Licensed under the BSD-3 License. +# See license.md file in the project root for full license information. +# This project has received funding from the European Research Council (ERC) +# under the European Union’s Horizon 2020 research and innovation programme +# (grant agreement No 725899). + +cmake_minimum_required(VERSION 3.18) + +file(GLOB helpfiles "${ROOT}/help/*") +file(GLOB abstractions "${ROOT}/abstractions/*") +file(GLOB externals "${ROOT}/pd_objects/*") + +set(devfolder "${ROOT}/dev") +file(REMOVE_RECURSE ${devfolder}) +file(MAKE_DIRECTORY ${devfolder}) + +foreach(item IN LISTS helpfiles abstractions externals) + get_filename_component(item_name "${item}" NAME) + file(CREATE_LINK "${item}" "${devfolder}/${item_name}" SYMBOLIC) +endforeach() + +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${BINARIES}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) diff --git a/scripts/MakePluginSources.cmake b/scripts/MakePluginSources.cmake new file mode 100644 index 00000000..bde37e5e --- /dev/null +++ b/scripts/MakePluginSources.cmake @@ -0,0 +1,129 @@ +# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) +# Copyright 2017-2019 University of Huddersfield. +# Licensed under the BSD-3 License. +# See license.md file in the project root for full license information. +# This project has received funding from the European Research Council (ERC) +# under the European Union’s Horizon 2020 research and innovation programme +# (grant agreement No 725899). + +include(FLuidClientStub) + +function(make_external_name client header var) + set(${var} Fluid${client} PARENT_SCOPE) +endfunction() + +function(add_sc_extension PLUGIN FILENAME) + + add_library(${PLUGIN} MODULE ${FILENAME}) + + if(MSVC) + target_compile_options(${PLUGIN} PRIVATE /external:W0 /W3 /bigobj) + else() + target_compile_options(${PLUGIN} PRIVATE + -Wall -Wextra -Wpedantic -Wreturn-type -Wconversion + ) + + #GCC doesn't have Wno-c++11-narrowing + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(${PLUGIN} PRIVATE -Wno-c++11-narrowing) + endif() + endif() + + if(APPLE) + set_target_properties(${PLUGIN} PROPERTIES + XCODE_GENERATE_SCHEME ON + ) + #If we target 10.7 (actually < 10.9), we have to manually include this: + target_compile_options(${PLUGIN} PRIVATE -stdlib=libc++) + endif() + + target_link_libraries( + ${PLUGIN} + PRIVATE + FLUID_DECOMPOSITION + FLUID_SC_WRAPPER + HISSTools_FFT + ) + + target_include_directories( + ${PLUGIN} + PRIVATE + "${LOCAL_INCLUDES}" + "${FLUID_VERSION_PATH}" + ) + + file(GLOB_RECURSE FLUID_SC_HEADERS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/include/wrapper/*.hpp") + + target_sources( + ${PLUGIN} PUBLIC ${FLUID_SC_HEADERS} + ) + + target_include_directories( + ${PLUGIN} + SYSTEM PRIVATE + "${SC_PATH}/include/plugin_interface" + "${SC_PATH}/include/common" + "${SC_PATH}/common" + "${SC_PATH}/external_libraries/boost" #we need boost::align for deallocating buffer memory :-( + ) + + get_property(HEADERS TARGET FLUID_DECOMPOSITION PROPERTY INTERFACE_SOURCES) + source_group(TREE "${flucoma-core_SOURCE_DIR}/include" FILES ${HEADERS}) + source_group(TREE "${CMAKE_SOURCE_DIR}/include/wrapper" PREFIX wrapper FILES ${FLUID_SC_HEADERS}) + + if(MINGW) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign") + endif() + + if(DEFINED FLUID_ARCH) + target_compile_options(${PLUGIN} PRIVATE ${FLUID_ARCH}) + endif() + + if(MSVC) + target_compile_options(${PLUGIN} PRIVATE -D_USE_MATH_DEFINES) + else() + target_compile_options(${PLUGIN} PRIVATE -fvisibility=hidden) + endif() + + #optional extra build settings (e.g for /bigobj with MSVC) + include( + "${CMAKE_CURRENT_SOURCE_DIR}/scripts/build-settings/${PLUGIN}.cmake" + OPTIONAL + ) +endfunction() + +function(generate_sc_source) + # # Define the supported set of keywords + set(noValues "") + set(singleValues FILENAME EXTERNALS_OUT FILE_OUT) + set(multiValues CLIENTS HEADERS CLASSES) + # # Process the arguments passed in + include(CMakeParseArguments) + cmake_parse_arguments(ARG + "${noValues}" + "${singleValues}" + "${multiValues}" + ${ARGN}) + + set(CCE_WRAPPER "#include ") + set(ENTRY_POINT "PluginLoad(FlucomaPlugin)") + set(WRAPPER_TEMPLATE [=[makeSCWrapper<${class}>("${external}", inTable);]=]) + + set(EXTRA_SOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/extra/${ARG_FILENAME}.cpp.in") + + if(EXISTS ${EXTRA_SOURCE_FILE}) + generate_source(${ARGN} EXTRA_SOURCE ${EXTRA_SOURCE_FILE} EXTERNALS_OUT external FILE_OUT outfile) + else() + generate_source(${ARGN} EXTERNALS_OUT external FILE_OUT outfile) + endif() + + if(ARG_FILENAME) + set(external_filename ${ARG_FILENAME}) + else() + list(GET external 0 external_filename) + endif() + + message(STATUS "Generating: ${external_filename}") + add_sc_extension(${external_filename} ${outfile}) +endfunction() diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake deleted file mode 100644 index 487c4ac5..00000000 --- a/scripts/target_post.cmake +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -# target_compile_features(${PLUGIN} PRIVATE cxx_std_14) - -if(MSVC) - target_compile_options(${PLUGIN} PRIVATE /W3) -else() - target_compile_options(${PLUGIN} PRIVATE - -Wall -Wextra -Wpedantic -Wreturn-type -Wconversion - ) - - #GCC doesn't have Wno-c++11-narrowing - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - target_compile_options(${PLUGIN} PRIVATE -Wno-c++11-narrowing) - endif() -endif() - -# set_target_properties(${PLUGIN} PROPERTIES -# CXX_STANDARD 14 -# CXX_STANDARD_REQUIRED YES -# CXX_EXTENSIONS NO -# ) - -if(APPLE) - set_target_properties(${PLUGIN} PROPERTIES - XCODE_GENERATE_SCHEME ON - ) - #If we target 10.7 (actually < 10.9), we have to manually include this: - target_compile_options(${PLUGIN} PRIVATE -stdlib=libc++) -endif() - -target_link_libraries( - ${PLUGIN} - PRIVATE - FLUID_DECOMPOSITION - FLUID_SC_WRAPPER - HISSTools_FFT -) - -target_include_directories( - ${PLUGIN} - PRIVATE - "${LOCAL_INCLUDES}" - "${FLUID_VERSION_PATH}" -) - -file(GLOB_RECURSE FLUID_SC_HEADERS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/include/wrapper/*.hpp") - -target_sources( - ${PLUGIN} PUBLIC ${FLUID_SC_HEADERS} -) - -target_include_directories( - ${PLUGIN} - SYSTEM PRIVATE - "${SC_PATH}/include/plugin_interface" - "${SC_PATH}/include/common" - "${SC_PATH}/common" - "${SC_PATH}/external_libraries/boost" #we need boost::align for deallocating buffer memory :-( -) - -get_property(HEADERS TARGET FLUID_DECOMPOSITION PROPERTY INTERFACE_SOURCES) -source_group(TREE "${flucoma-core_SOURCE_DIR}/include" FILES ${HEADERS}) -source_group(TREE "${CMAKE_SOURCE_DIR}/include/wrapper" PREFIX wrapper FILES ${FLUID_SC_HEADERS}) - - -# if (SUPERNOVA) -# target_include_directories( -# ${PLUGIN} -# SYSTEM PRIVATE -# "${SC_PATH}/external_libraries/nova-tt" -# "${SC_PATH}/external_libraries/boost_lockfree" -# "${SC_PATH}/external_libraries/boost-lockfree" -# ) -# endif() - -if(MINGW) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign") -endif() - -if(DEFINED FLUID_ARCH) - target_compile_options(${PLUGIN} PRIVATE ${FLUID_ARCH}) -endif() - -if(MSVC) - target_compile_options(${PLUGIN} PRIVATE -D_USE_MATH_DEFINES) -else() - target_compile_options(${PLUGIN} PRIVATE -fvisibility=hidden) -endif() diff --git a/src/FluidAmpFeature/CMakeLists.txt b/src/FluidAmpFeature/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidAmpFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidAmpFeature/FluidAmpFeature.cpp b/src/FluidAmpFeature/FluidAmpFeature.cpp deleted file mode 100644 index 1abb2c86..00000000 --- a/src/FluidAmpFeature/FluidAmpFeature.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidAmpFeature", ft); -} diff --git a/src/FluidAmpGate/CMakeLists.txt b/src/FluidAmpGate/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidAmpGate/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidAmpGate/FluidAmpGate.cpp b/src/FluidAmpGate/FluidAmpGate.cpp deleted file mode 100644 index d8a0c9b5..00000000 --- a/src/FluidAmpGate/FluidAmpGate.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidAmpGate", ft); -} diff --git a/src/FluidAmpSlice/CMakeLists.txt b/src/FluidAmpSlice/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidAmpSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidAmpSlice/FluidAmpSlice.cpp b/src/FluidAmpSlice/FluidAmpSlice.cpp deleted file mode 100644 index c5ceaa0f..00000000 --- a/src/FluidAmpSlice/FluidAmpSlice.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidAmpSlice", ft); -} diff --git a/src/FluidAudioTransport/CMakeLists.txt b/src/FluidAudioTransport/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidAudioTransport/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidAudioTransport/FluidAudioTransport.cpp b/src/FluidAudioTransport/FluidAudioTransport.cpp deleted file mode 100644 index 1815e8be..00000000 --- a/src/FluidAudioTransport/FluidAudioTransport.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidAudioTransport",ft); -} diff --git a/src/FluidBufAmpFeature/CMakeLists.txt b/src/FluidBufAmpFeature/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufAmpFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufAmpFeature/FluidBufAmpFeature.cpp b/src/FluidBufAmpFeature/FluidBufAmpFeature.cpp deleted file mode 100644 index 2ce6e122..00000000 --- a/src/FluidBufAmpFeature/FluidBufAmpFeature.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufAmpFeature", ft); -} diff --git a/src/FluidBufAmpGate/CMakeLists.txt b/src/FluidBufAmpGate/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufAmpGate/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufAmpGate/FluidBufAmpGate.cpp b/src/FluidBufAmpGate/FluidBufAmpGate.cpp deleted file mode 100644 index 9e255481..00000000 --- a/src/FluidBufAmpGate/FluidBufAmpGate.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufAmpGate", ft); -} diff --git a/src/FluidBufAmpSlice/CMakeLists.txt b/src/FluidBufAmpSlice/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufAmpSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufAmpSlice/FluidBufAmpSlice.cpp b/src/FluidBufAmpSlice/FluidBufAmpSlice.cpp deleted file mode 100644 index 78a51002..00000000 --- a/src/FluidBufAmpSlice/FluidBufAmpSlice.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufAmpSlice", ft); -} diff --git a/src/FluidBufAudioTransport/CMakeLists.txt b/src/FluidBufAudioTransport/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufAudioTransport/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp b/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp deleted file mode 100644 index 2e84204a..00000000 --- a/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufAudioTransport",ft); -} diff --git a/src/FluidBufChroma/CMakeLists.txt b/src/FluidBufChroma/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufChroma/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufChroma/FluidBufChroma.cpp b/src/FluidBufChroma/FluidBufChroma.cpp deleted file mode 100644 index 448e5dd3..00000000 --- a/src/FluidBufChroma/FluidBufChroma.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufChroma", ft); -} diff --git a/src/FluidBufCompose/CMakeLists.txt b/src/FluidBufCompose/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidBufCompose/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufCompose/FluidBufCompose.cpp b/src/FluidBufCompose/FluidBufCompose.cpp deleted file mode 100644 index 8ba836d2..00000000 --- a/src/FluidBufCompose/FluidBufCompose.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufCompose", ft); -} diff --git a/src/FluidBufCompose/tests.scd b/src/FluidBufCompose/tests.scd deleted file mode 100644 index 0185a0e8..00000000 --- a/src/FluidBufCompose/tests.scd +++ /dev/null @@ -1,67 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-SA-UprightPianoPedalWide.wav".resolveRelative); -d = Buffer.new(s); -) - -( -// with basic params (basic summing of each full buffer in all dimensions) -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, srcBufNumB: c.bufnum, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -d.query; -d.play; -d.plot - -//constructing a mono buffer, with a quiet punch from the synth, with a choked piano resonance from the left channel -( -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, nFramesA: 9000, srcGainA: 0.5, srcBufNumB: c.bufnum, startAtB:30000, nFramesB:44100, nChansB:1, srcGainB:0.9, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -//constructing a stereo buffer, with the end of the mono synth in both channels, with a piano resonance in swapped stereo -( -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, startAtA: 441000, nChansA: 2, srcGainA: 0.6, srcBufNumB: c.bufnum, nFramesB: 80000, startChanB: 1, nChansB: 2, srcGainB: 0.5, dstStartAtB: 22050, dstStartChanB: 0, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -//constructing a one second buffer: the first second of each buffer, the mono synth on the right, the piano on the left -( -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, nFramesA: 44100, nChansA: 1, dstStartChanA: 1, srcBufNumB: c.bufnum, nFramesB:44100, nChansB:1, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -// trying to grow a buffer on itself -e = Buffer.alloc(s,1,1); -( -Routine { - FluidBufCompose.process(s,srcBufNumA: b.bufnum, srcBufNumB: e.bufnum, dstBufNum: e.bufnum); - s.sync; - FluidBufCompose.process(s,srcBufNumA: c.bufnum, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum); - s.sync; -}.play; -) - -e.plot -e.play \ No newline at end of file diff --git a/src/FluidBufFlatten/CMakeLists.txt b/src/FluidBufFlatten/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufFlatten/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufFlatten/FluidBufFlatten.cpp b/src/FluidBufFlatten/FluidBufFlatten.cpp deleted file mode 100644 index 0a6746c5..00000000 --- a/src/FluidBufFlatten/FluidBufFlatten.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufFlatten", ft); -} diff --git a/src/FluidBufHPSS/CMakeLists.txt b/src/FluidBufHPSS/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidBufHPSS/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufHPSS/FluidBufHPSS.cpp b/src/FluidBufHPSS/FluidBufHPSS.cpp deleted file mode 100644 index 36e609ac..00000000 --- a/src/FluidBufHPSS/FluidBufHPSS.cpp +++ /dev/null @@ -1,23 +0,0 @@ - -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufHPSS", ft); -} diff --git a/src/FluidBufHPSS/tests.scd b/src/FluidBufHPSS/tests.scd deleted file mode 100644 index 249e5c6b..00000000 --- a/src/FluidBufHPSS/tests.scd +++ /dev/null @@ -1,51 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -d = Buffer.new(s); -e = Buffer.new(s); -) - -( -// with basic params -Routine{ - t = Main.elapsedTime; - FluidBufHPSS.process(s, b.bufnum, harmBufNum: c.bufnum, percBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -c.query; -c.play; -d.query; -d.play; -e.query; -e.play; - -//nullsumming tests -{(PlayBuf.ar(1,c.bufnum))+(PlayBuf.ar(1,d.bufnum))+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufHPSS.process(s,b.bufnum, 44100, 44100, 0, 0, c.bufnum, d.bufnum, e.bufnum, 51, 31, 2); // need to change these for something sensible - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - - -// owen's sexy example (The world's most expensive stereoizer) - -( -{ - var hpss = FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),modeFlag:2,hta1:SinOsc.kr(1.5,mul:20,add:20),hta2:SinOsc.kr(3,mul:25,add:25), pta1:SinOsc.kr(1.6,0,mul:30,add:30),pta2:SinOsc.kr(1.7,0,mul:17,add:24)); - [hpss[2] + 0.5 * hpss[0], hpss[1] + 0.5 * hpss[0]]; -}.play; -) \ No newline at end of file diff --git a/src/FluidBufLoudness/CMakeLists.txt b/src/FluidBufLoudness/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufLoudness/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufLoudness/FluidBufLoudness.cpp b/src/FluidBufLoudness/FluidBufLoudness.cpp deleted file mode 100644 index 44abbd4a..00000000 --- a/src/FluidBufLoudness/FluidBufLoudness.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufLoudness", ft); -} diff --git a/src/FluidBufMFCC/CMakeLists.txt b/src/FluidBufMFCC/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufMFCC/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufMFCC/FluidBufMFCC.cpp b/src/FluidBufMFCC/FluidBufMFCC.cpp deleted file mode 100644 index f9850160..00000000 --- a/src/FluidBufMFCC/FluidBufMFCC.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufMFCC", ft); -} diff --git a/src/FluidBufMelBands/CMakeLists.txt b/src/FluidBufMelBands/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufMelBands/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufMelBands/FluidBufMelBands.cpp b/src/FluidBufMelBands/FluidBufMelBands.cpp deleted file mode 100644 index dcb39fc8..00000000 --- a/src/FluidBufMelBands/FluidBufMelBands.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufMelBands", ft); -} diff --git a/src/FluidBufNMF/CMakeLists.txt b/src/FluidBufNMF/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidBufNMF/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufNMF/FluidBufNMF.cpp b/src/FluidBufNMF/FluidBufNMF.cpp deleted file mode 100644 index e74cd2a7..00000000 --- a/src/FluidBufNMF/FluidBufNMF.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNMF", ft); -} diff --git a/src/FluidBufNMF/tests.scd b/src/FluidBufNMF/tests.scd deleted file mode 100644 index 4a3d811e..00000000 --- a/src/FluidBufNMF/tests.scd +++ /dev/null @@ -1,214 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -x = Buffer.new(s); -y = Buffer.new(s); -~fft_size = 1024; -~frame_size = 512; -~hop_size = 256; -~which_rank = 0; -) - -( -// without sources -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,b.bufnum,0,-1,0,-1,nil,x.bufnum,0,y.bufnum,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -// with sources only -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,b.bufnum, 0,-1,0,-1,c.bufnum,nil,0,nil,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play -) - -// with everything -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,b.bufnum, 0,-1,0,-1,c.bufnum,x.bufnum,0,y.bufnum,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play -) - - -//look at the dictionaries and activations -c.plot;x.plot; y.plot; -//null test of the sum of sources -{(PlayBuf.ar(5,c.bufnum,doneAction:2).sum)+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - -// play around -{Splay.ar(PlayBuf.ar(5,c.bufnum,doneAction:2))}.play - -//play a single source -{PlayBuf.ar(5,c.bufnum,doneAction:2)[~which_rank].dup}.play - -//play noise through a filter -( -{ - var chain; - chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar()); - - chain = chain.pvcollect(~fft_size, {|mag, phase, index| - [mag * BufRd.kr(5,x.bufnum,DC.kr(index),0,1)[~which_rank]]; - }); - - IFFT(chain); -}.play -) - -//play noise through an activation -{WhiteNoise.ar(BufRd.kr(5,y.bufnum,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_rank])*0.5}.play - -//play noise through both activation and filter -( -{ - var chain; - chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar(BufRd.kr(5,y.bufnum,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_rank]*12),0.5,1); - - chain = chain.pvcollect(~fft_size, {|mag, phase, index| - [mag * BufRd.kr(5,x.bufnum,DC.kr(index),0,1)[~which_rank]]; - }); - - [0,IFFT(chain)]; -}.play -) - -// test with stereo input (dual mono for best segregation) -Buffer.freeAll(s) - -( -Routine{ - b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); - c = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-AcousticStrums-M.wav".resolveRelative); - d = Buffer.new(s); - e = Buffer.new(s); - x = Buffer.new(s); - y = Buffer.new(s); - ~fft_size = 1024; - ~frame_size = 512; - ~hop_size = 256; - s.sync; - FluidBufCompose.process(s,b.bufnum,srcBufNumB:c.bufnum, srcGainB:0.6, dstStartChanB:1, dstBufNum:d.bufnum); - s.sync; - d.query; -}.play; -) - -d.play - -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,d.bufnum,0,-1,0,-1,e.bufnum,x.bufnum,0,y.bufnum,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -e.query -x.query -y.query - -//test a single rank -{PlayBuf.ar(10,e.bufnum,doneAction:2)[9].dup}.play - -// play them all across in a sort of upmixed stereo... -{Splay.ar(PlayBuf.ar(10,e.bufnum,doneAction:2))}.play - -//test process on a segment -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,d.bufnum,44100,44100,0,1,c.bufnum,rank:2); - s.sync; - (Main.elapsedTime - t).postln; - t = Main.elapsedTime; - FluidBufNMF.process(s,d.bufnum,8810,44100,1,1,b.bufnum,rank:2); - s.sync; - (Main.elapsedTime - t).postln; -}.play -) -c.query -c.play -b.query -b.play - - -// nmf on empty buffer -Buffer.freeAll; -( -Routine({ - b = Buffer.alloc(s,44100); - c = Buffer.new(s); - s.sync; - FluidBufNMF.process(s,b.bufnum,dstBufNum:c.bufnum); - s.sync; - c.getn(0,100,{|x| x.postln}); -}).play; -) - -// fixed dictionaries experiment -Buffer.freeAll; - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-AcousticStrums-M.wav".resolveRelative); -c = Buffer.new(s); -x = Buffer.new(s); -e = Buffer.alloc(s,1,1); -y = Buffer.alloc(s,1,1); -) - -( -Routine { - FluidBufNMF.process(s,b.bufnum,0,88200,0,1, c.bufnum, x.bufnum, rank:10); - s.sync; - c.query; -}.play; -) - -// test nullsum array -(0..9).do({|chan|FluidBufCompose.process(s,srcBufNumA: c.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: y.bufnum, dstBufNum: y.bufnum)}); -{(PlayBuf.ar(10,c.bufnum).sum)+(-1*PlayBuf.ar(1,y.bufnum))}.play - -// find the picking -{PlayBuf.ar(10,c.bufnum)[2]}.play - -// copy all the other ranks on itself (the 2 above is omited from the array and is in the 2nd compose -( -Routine{ - [ 0, 1, 3, 4, 5, 6, 7, 8, 9 ].do({|chan|FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum)}); - s.sync; - e.query; - s.sync; - FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: 2, nChansA: 1, srcBufNumB: e.bufnum, dstStartChanB: 1, dstBufNum: e.bufnum); - s.sync; - e.query; -}.play; -) - -//process -( -Routine{ - FluidBufNMF.process(s, b.bufnum, dstBufNum: c.bufnum, dictBufNum: e.bufnum, dictFlag: 2, actBufNum:y.bufnum, rank:2); - s.sync; - c.query; -}.play; -) - -c.play -e.plot -y.query -y.plot diff --git a/src/FluidBufNNDSVD/CMakeLists.txt b/src/FluidBufNNDSVD/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufNNDSVD/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufNNDSVD/FluidBufNNDSVD.cpp b/src/FluidBufNNDSVD/FluidBufNNDSVD.cpp deleted file mode 100644 index 2f4e47ff..00000000 --- a/src/FluidBufNNDSVD/FluidBufNNDSVD.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNNDSVD", ft); -} diff --git a/src/FluidBufNoveltyFeature/CMakeLists.txt b/src/FluidBufNoveltyFeature/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufNoveltyFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp b/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp deleted file mode 100644 index 841970f0..00000000 --- a/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNoveltyFeature", ft); -} diff --git a/src/FluidBufNoveltySlice/CMakeLists.txt b/src/FluidBufNoveltySlice/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufNoveltySlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp b/src/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp deleted file mode 100644 index 039db415..00000000 --- a/src/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNoveltySlice", ft); -} diff --git a/src/FluidBufOnsetFeature/CMakeLists.txt b/src/FluidBufOnsetFeature/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufOnsetFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp b/src/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp deleted file mode 100644 index 6d338c3b..00000000 --- a/src/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufOnsetFeature", ft); -} diff --git a/src/FluidBufOnsetSlice/CMakeLists.txt b/src/FluidBufOnsetSlice/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufOnsetSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp b/src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp deleted file mode 100644 index 7ff5eefe..00000000 --- a/src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufOnsetSlice", ft); -} diff --git a/src/FluidBufPitch/CMakeLists.txt b/src/FluidBufPitch/CMakeLists.txt deleted file mode 100644 index 711f3d36..00000000 --- a/src/FluidBufPitch/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufPitch/FluidBufPitch.cpp b/src/FluidBufPitch/FluidBufPitch.cpp deleted file mode 100644 index 41bd7625..00000000 --- a/src/FluidBufPitch/FluidBufPitch.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufPitch", ft); -} diff --git a/src/FluidBufSTFT/CMakeLists.txt b/src/FluidBufSTFT/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufSTFT/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufSTFT/FluidBufSTFT.cpp b/src/FluidBufSTFT/FluidBufSTFT.cpp deleted file mode 100644 index ecd10014..00000000 --- a/src/FluidBufSTFT/FluidBufSTFT.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSTFT", ft); -} diff --git a/src/FluidBufScale/CMakeLists.txt b/src/FluidBufScale/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufScale/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufScale/FluidBufScale.cpp b/src/FluidBufScale/FluidBufScale.cpp deleted file mode 100644 index 12ffeba7..00000000 --- a/src/FluidBufScale/FluidBufScale.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufScale", ft); -} diff --git a/src/FluidBufSelect/CMakeLists.txt b/src/FluidBufSelect/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufSelect/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufSelect/FluidBufSelect.cpp b/src/FluidBufSelect/FluidBufSelect.cpp deleted file mode 100644 index 43fc58a4..00000000 --- a/src/FluidBufSelect/FluidBufSelect.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSelect", ft); -} diff --git a/src/FluidBufSelectEvery/CMakeLists.txt b/src/FluidBufSelectEvery/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufSelectEvery/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufSelectEvery/FluidBufSelectEvery.cpp b/src/FluidBufSelectEvery/FluidBufSelectEvery.cpp deleted file mode 100644 index 87c1d9b0..00000000 --- a/src/FluidBufSelectEvery/FluidBufSelectEvery.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSelectEvery", ft); -} diff --git a/src/FluidBufSines/CMakeLists.txt b/src/FluidBufSines/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidBufSines/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufSines/FluidBufSines.cpp b/src/FluidBufSines/FluidBufSines.cpp deleted file mode 100644 index f2306945..00000000 --- a/src/FluidBufSines/FluidBufSines.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSines", ft); -} diff --git a/src/FluidBufSines/tests.scd b/src/FluidBufSines/tests.scd deleted file mode 100644 index 51e47c47..00000000 --- a/src/FluidBufSines/tests.scd +++ /dev/null @@ -1,38 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -d = Buffer.new(s); -) - -( -// with basic params -Routine{ - t = Main.elapsedTime; - FluidBufSines.process(s, b.bufnum, sineBufNum: c.bufnum, resBufNum:d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -c.query; -c.play; -d.query; -d.play; - -//nullsumming tests -{(PlayBuf.ar(1,c.bufnum))+(PlayBuf.ar(1,d.bufnum))+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufSines.process(s,b.bufnum, 44100, 88200, 0, 0, c.bufnum, d.bufnum, 30,0.3,3,0.1,0.9,2048,512,4096); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); diff --git a/src/FluidBufSpectralShape/CMakeLists.txt b/src/FluidBufSpectralShape/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidBufSpectralShape/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp b/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp deleted file mode 100644 index adda5b1d..00000000 --- a/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSpectralShape", ft); -} diff --git a/src/FluidBufStats/CMakeLists.txt b/src/FluidBufStats/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufStats/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufStats/FluidBufStats.cpp b/src/FluidBufStats/FluidBufStats.cpp deleted file mode 100644 index b5f902c8..00000000 --- a/src/FluidBufStats/FluidBufStats.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufStats", ft); -} diff --git a/src/FluidBufThreadDemo/CMakeLists.txt b/src/FluidBufThreadDemo/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufThreadDemo/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufThreadDemo/FluidBufThreadDemo.cpp b/src/FluidBufThreadDemo/FluidBufThreadDemo.cpp deleted file mode 100644 index a702bc56..00000000 --- a/src/FluidBufThreadDemo/FluidBufThreadDemo.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufThreadDemo", ft); -} diff --git a/src/FluidBufThresh/CMakeLists.txt b/src/FluidBufThresh/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidBufThresh/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufThresh/FluidBufThresh.cpp b/src/FluidBufThresh/FluidBufThresh.cpp deleted file mode 100644 index bd6c0a29..00000000 --- a/src/FluidBufThresh/FluidBufThresh.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufThresh", ft); -} diff --git a/src/FluidBufTransientSlice/CMakeLists.txt b/src/FluidBufTransientSlice/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidBufTransientSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp b/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp deleted file mode 100644 index 520b0667..00000000 --- a/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable* ft; - -PluginLoad(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufTransientSlice", ft); -} diff --git a/src/FluidBufTransientSlice/tests.scd b/src/FluidBufTransientSlice/tests.scd deleted file mode 100644 index a934ca0c..00000000 --- a/src/FluidBufTransientSlice/tests.scd +++ /dev/null @@ -1,71 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -) - -( -// with basic params -Routine{ - t = Main.elapsedTime; - FluidBufTransientSlice.process(s,b.bufnum, transBufNum:c.bufnum, order:80, debounce:4410); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -//check the number of slices -c.query; - -//loops over a splice -( -{ - BufRd.ar( - 1, - b.bufnum, - Phasor.ar( - 0, - 1, - BufRd.kr( - 1, - c.bufnum, - MouseX.kr( - 0, - BufFrames.kr(c.bufnum) - 1), - 0, - 1), - BufRd.kr( - 1, - c.bufnum, - MouseX.kr( - 1, - BufFrames.kr(c.bufnum)), - 0, - 1), - BufRd.kr( - 1, - c.bufnum, - MouseX.kr( - 0, - BufFrames.kr(c.bufnum) - 1), - 0, - 1)), - 0, - 1) -}.play; -) - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufTransients.process(s,b.bufnum, 44100, 44100, 0, 0, c.bufnum, d.bufnum, 100, 512,256,1,2,1,12,20); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - diff --git a/src/FluidBufTransients/CMakeLists.txt b/src/FluidBufTransients/CMakeLists.txt deleted file mode 100755 index 711f3d36..00000000 --- a/src/FluidBufTransients/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidBufTransients/FluidBufTransients.cpp b/src/FluidBufTransients/FluidBufTransients.cpp deleted file mode 100644 index 6cd9f6d5..00000000 --- a/src/FluidBufTransients/FluidBufTransients.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufTransients", ft); -} diff --git a/src/FluidBufTransients/tests.scd b/src/FluidBufTransients/tests.scd deleted file mode 100644 index afefd3fc..00000000 --- a/src/FluidBufTransients/tests.scd +++ /dev/null @@ -1,39 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -d = Buffer.new(s); -) - -( -// without basic params -Routine{ - t = Main.elapsedTime; - FluidBufTransients.process(s,b.bufnum, transBufNum:c.bufnum, resBufNum:d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -c.query; -c.play; -d.query; -d.play; - -//nullsumming tests -{(PlayBuf.ar(1,c.bufnum))+(PlayBuf.ar(1,d.bufnum))+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufTransients.process(s,b.bufnum, 0, 88200, 0, 0, c.bufnum, d.bufnum, 100, 512,256,1,2,1,12,20); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - diff --git a/src/FluidChroma/CMakeLists.txt b/src/FluidChroma/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidChroma/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidChroma/FluidChroma.cpp b/src/FluidChroma/FluidChroma.cpp deleted file mode 100644 index a42135a8..00000000 --- a/src/FluidChroma/FluidChroma.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidChroma", ft); -} diff --git a/src/FluidGain/CMakeLists.txt b/src/FluidGain/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidGain/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidGain/FluidGain.cpp b/src/FluidGain/FluidGain.cpp deleted file mode 100644 index 0dcb164d..00000000 --- a/src/FluidGain/FluidGain.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidGainUgen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidGain", ft); -} diff --git a/src/FluidHPSS/CMakeLists.txt b/src/FluidHPSS/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidHPSS/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidHPSS/FluidHPSS.cpp b/src/FluidHPSS/FluidHPSS.cpp deleted file mode 100644 index d6c82881..00000000 --- a/src/FluidHPSS/FluidHPSS.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidHPSS", ft); -} diff --git a/src/FluidHPSS/test.scd b/src/FluidHPSS/test.scd deleted file mode 100644 index ca26e269..00000000 --- a/src/FluidHPSS/test.scd +++ /dev/null @@ -1,33 +0,0 @@ -s.reboot; - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -b.play - -// basic param -{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play - -// params in mode 1 -{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,1,0.05,40,0.1,-40)}.play - -// params in mode 2 -{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,2,0.05,40,0.1,-40, 0.1, -10, 0.2, 10)[2].dup}.play - - - -// null test (the process add a latency of ((harmFiltSize + (winSize / hopSize) - 1) * hopSize) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,31, winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((31 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21, winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((21 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,29, winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((29 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,29, winSize:1024,hopSize:256,fftSize:2048).sum - DelayN.ar(sig, 1, ((29 + 3) * 256 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,11,29, winSize:2048,hopSize:512,fftSize:4096).sum - DelayN.ar(sig, 1, ((29 + 3) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21, winSize:2048,hopSize:256,fftSize:4096).sum - DelayN.ar(sig, 1, ((21 + 7) * 256 / s.sampleRate))]}.play - - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21,1,1,winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((21 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21,1,2,winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((21 + 1) * 512 / s.sampleRate))]}.play diff --git a/src/FluidLoudness/CMakeLists.txt b/src/FluidLoudness/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidLoudness/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidLoudness/FluidLoudness.cpp b/src/FluidLoudness/FluidLoudness.cpp deleted file mode 100644 index ccf03003..00000000 --- a/src/FluidLoudness/FluidLoudness.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidLoudness", ft); -} diff --git a/src/FluidMFCC/CMakeLists.txt b/src/FluidMFCC/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidMFCC/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidMFCC/FluidMFCC.cpp b/src/FluidMFCC/FluidMFCC.cpp deleted file mode 100644 index 79cc90fb..00000000 --- a/src/FluidMFCC/FluidMFCC.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidMFCC", ft); -} diff --git a/src/FluidManipulation/CMakeLists.txt b/src/FluidManipulation/CMakeLists.txt deleted file mode 100644 index 66790e54..00000000 --- a/src/FluidManipulation/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -cmake_minimum_required(VERSION 3.3) -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -target_include_directories( - ${PLUGIN} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../../include -) - -target_link_libraries( - ${PLUGIN} PRIVATE FLUID_DECOMPOSITION -) - -if(WIN32) - target_compile_options(${PLUGIN} PUBLIC /bigobj) -endif() - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidManipulation/FluidManipulation.cpp b/src/FluidManipulation/FluidManipulation.cpp deleted file mode 100644 index 241a2aa8..00000000 --- a/src/FluidManipulation/FluidManipulation.cpp +++ /dev/null @@ -1,71 +0,0 @@ - -// A tool from the FluCoMa project, funded by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 725899) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidDataSet",ft); - makeSCWrapper("FluidDataSetQuery",ft); - makeSCWrapper("FluidLabelSet",ft); - - makeSCWrapper("FluidKDTree",ft); - makeSCWrapper("FluidKDTreeQuery",ft); - - makeSCWrapper("FluidKMeans",ft); - makeSCWrapper("FluidKMeansQuery",ft); - - makeSCWrapper("FluidKNNClassifier",ft); - makeSCWrapper("FluidKNNClassifierQuery",ft); - - makeSCWrapper("FluidKNNRegressor",ft); - makeSCWrapper("FluidKNNRegressorQuery",ft); - - makeSCWrapper("FluidNormalize",ft); - makeSCWrapper("FluidNormalizeQuery",ft); - - makeSCWrapper("FluidRobustScale",ft); - makeSCWrapper("FluidRobustScaleQuery",ft); - - makeSCWrapper("FluidStandardize",ft); - makeSCWrapper("FluidStandardizeQuery",ft); - - makeSCWrapper("FluidPCA",ft); - makeSCWrapper("FluidPCAQuery",ft); - - makeSCWrapper("FluidMDS",ft); - - makeSCWrapper("FluidUMAP",ft); - makeSCWrapper("FluidUMAPQuery",ft); - - makeSCWrapper("FluidDataSetWr", ft); - - makeSCWrapper("FluidMLPRegressor",ft); - makeSCWrapper("FluidMLPRegressorQuery",ft); - - makeSCWrapper("FluidMLPClassifier",ft); - makeSCWrapper("FluidMLPClassifierQuery",ft); - - makeSCWrapper("FluidGrid",ft); -} diff --git a/src/FluidMelBands/CMakeLists.txt b/src/FluidMelBands/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidMelBands/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidMelBands/FluidMelBands.cpp b/src/FluidMelBands/FluidMelBands.cpp deleted file mode 100644 index 01aeff14..00000000 --- a/src/FluidMelBands/FluidMelBands.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidMelBands", ft); -} diff --git a/src/FluidNMFCross/CMakeLists.txt b/src/FluidNMFCross/CMakeLists.txt deleted file mode 100644 index 3693881d..00000000 --- a/src/FluidNMFCross/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -cmake_minimum_required(VERSION 3.3) -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -target_include_directories( - ${PLUGIN} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../../include -) - -target_link_libraries( - ${PLUGIN} PRIVATE FLUID_DECOMPOSITION -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidNMFCross/FluidNMFCross.cpp b/src/FluidNMFCross/FluidNMFCross.cpp deleted file mode 100644 index 5749fa58..00000000 --- a/src/FluidNMFCross/FluidNMFCross.cpp +++ /dev/null @@ -1,12 +0,0 @@ - -#include -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNMFCross", ft); -} diff --git a/src/FluidNMFFilter/CMakeLists.txt b/src/FluidNMFFilter/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidNMFFilter/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidNMFFilter/FluidNMFFilter.cpp b/src/FluidNMFFilter/FluidNMFFilter.cpp deleted file mode 100644 index 9324f20f..00000000 --- a/src/FluidNMFFilter/FluidNMFFilter.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidNMFFilter", ft); -} diff --git a/src/FluidNMFMatch/CMakeLists.txt b/src/FluidNMFMatch/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidNMFMatch/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidNMFMatch/FluidNMFMatch.cpp b/src/FluidNMFMatch/FluidNMFMatch.cpp deleted file mode 100644 index e84b0e8d..00000000 --- a/src/FluidNMFMatch/FluidNMFMatch.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidNMFMatch", ft); -} diff --git a/src/FluidNMFMatch/test.scd b/src/FluidNMFMatch/test.scd deleted file mode 100644 index a4bfc7e2..00000000 --- a/src/FluidNMFMatch/test.scd +++ /dev/null @@ -1,40 +0,0 @@ -s.reboot; - - //from Fixed NMF example: -( -b = Buffer.read(s,FluidFilesPath("Tremblay-AaS-AcousticStrums-M.wav")); -c = Buffer.new(s); -x = Buffer.new(s); -e = Buffer.alloc(s,1,1); -y = Buffer.alloc(s,1,1); -) - - // train only 2 seconds -( -Routine { - FluidBufNMF.process(s,b.bufnum,0,88200,0,1, c.bufnum, x.bufnum, rank:10); - s.sync; - c.query; -}.play; -) - -// find the rank that has the picking sound by changing which channel to listen to -( - ~element = 9; - {PlayBuf.ar(10,c.bufnum)[~element]}.play -) - -// copy all the other ranks on itself and the picking dictionnary as the sole component of the 1st channel -( -Routine{ - (0..9).remove(~element).do({|chan|FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum)}); - s.sync; - e.query; - s.sync; - FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: ~element, nChansA: 1, srcBufNumB: e.bufnum, dstStartChanB: 1, dstBufNum: e.bufnum); - s.sync; - e.query; -}.play; -) - -{DelayN.ar(PlayBuf.ar(1,b.bufnum),0.1,1024/44100, FluidNMFMatch.kr(PlayBuf.ar(1,b.bufnum),e.bufnum,2))}.play diff --git a/src/FluidNMFMorph/CMakeLists.txt b/src/FluidNMFMorph/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidNMFMorph/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidNMFMorph/FluidNMFMorph.cpp b/src/FluidNMFMorph/FluidNMFMorph.cpp deleted file mode 100644 index fa38d8fb..00000000 --- a/src/FluidNMFMorph/FluidNMFMorph.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidNMFMorph", ft); -} diff --git a/src/FluidNoveltyFeature/CMakeLists.txt b/src/FluidNoveltyFeature/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidNoveltyFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidNoveltyFeature/FluidNoveltyFeature.cpp b/src/FluidNoveltyFeature/FluidNoveltyFeature.cpp deleted file mode 100644 index 3051b5cd..00000000 --- a/src/FluidNoveltyFeature/FluidNoveltyFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidNoveltyFeature", ft); -} diff --git a/src/FluidNoveltySlice/CMakeLists.txt b/src/FluidNoveltySlice/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidNoveltySlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidNoveltySlice/FluidNoveltySlice.cpp b/src/FluidNoveltySlice/FluidNoveltySlice.cpp deleted file mode 100644 index 4044310a..00000000 --- a/src/FluidNoveltySlice/FluidNoveltySlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidNoveltySlice", ft); -} diff --git a/src/FluidOnsetFeature/CMakeLists.txt b/src/FluidOnsetFeature/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidOnsetFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidOnsetFeature/FluidOnsetFeature.cpp b/src/FluidOnsetFeature/FluidOnsetFeature.cpp deleted file mode 100644 index e8391519..00000000 --- a/src/FluidOnsetFeature/FluidOnsetFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidOnsetFeature", ft); -} diff --git a/src/FluidOnsetSlice/CMakeLists.txt b/src/FluidOnsetSlice/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidOnsetSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidOnsetSlice/FluidOnsetSlice.cpp b/src/FluidOnsetSlice/FluidOnsetSlice.cpp deleted file mode 100644 index aec600f0..00000000 --- a/src/FluidOnsetSlice/FluidOnsetSlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidOnsetSlice", ft); -} diff --git a/src/FluidPitch/CMakeLists.txt b/src/FluidPitch/CMakeLists.txt deleted file mode 100644 index 711f3d36..00000000 --- a/src/FluidPitch/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidPitch/FluidPitch.cpp b/src/FluidPitch/FluidPitch.cpp deleted file mode 100644 index b1d8a87e..00000000 --- a/src/FluidPitch/FluidPitch.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidPitch", ft); -} diff --git a/src/FluidSTFTPass/CMakeLists.txt b/src/FluidSTFTPass/CMakeLists.txt deleted file mode 100755 index 711f3d36..00000000 --- a/src/FluidSTFTPass/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidSTFTPass/FluidSTFTPass.cpp b/src/FluidSTFTPass/FluidSTFTPass.cpp deleted file mode 100644 index 9fff5e4e..00000000 --- a/src/FluidSTFTPass/FluidSTFTPass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidSTFTPass", ft); -} diff --git a/src/FluidSines/CMakeLists.txt b/src/FluidSines/CMakeLists.txt deleted file mode 100755 index 711f3d36..00000000 --- a/src/FluidSines/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidSines/FluidSines.cpp b/src/FluidSines/FluidSines.cpp deleted file mode 100644 index 93ac2a71..00000000 --- a/src/FluidSines/FluidSines.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidSines", ft); -} diff --git a/src/FluidSines/test.scd b/src/FluidSines/test.scd deleted file mode 100644 index dfaffef6..00000000 --- a/src/FluidSines/test.scd +++ /dev/null @@ -1,13 +0,0 @@ -s.reboot; - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -b.play - -// basic param -{FluidSines.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play - -// sexier params -{FluidSines.ar(PlayBuf.ar(1,b.bufnum,loop:1),30,MouseX.kr(),5)}.play - -// null test (the process add a latency of (( hopSize * minTrackLen) + windowSize) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidSines.ar(sig).sum - DelayN.ar(sig, 1, ((( 512 * 15) + 2048)/ s.sampleRate))]}.play diff --git a/src/FluidSpectralShape/CMakeLists.txt b/src/FluidSpectralShape/CMakeLists.txt deleted file mode 100644 index 9646a4ea..00000000 --- a/src/FluidSpectralShape/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidSpectralShape/FluidSpectralShape.cpp b/src/FluidSpectralShape/FluidSpectralShape.cpp deleted file mode 100644 index 7c6b19bc..00000000 --- a/src/FluidSpectralShape/FluidSpectralShape.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidSpectralShape", ft); -} diff --git a/src/FluidStats/CMakeLists.txt b/src/FluidStats/CMakeLists.txt deleted file mode 100644 index 711f3d36..00000000 --- a/src/FluidStats/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidStats/FluidStats.cpp b/src/FluidStats/FluidStats.cpp deleted file mode 100644 index 6442231a..00000000 --- a/src/FluidStats/FluidStats.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidStatsUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidStats", ft); -} diff --git a/src/FluidTransientSlice/CMakeLists.txt b/src/FluidTransientSlice/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidTransientSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidTransientSlice/FluidTransientSlice.cpp b/src/FluidTransientSlice/FluidTransientSlice.cpp deleted file mode 100644 index 987097d9..00000000 --- a/src/FluidTransientSlice/FluidTransientSlice.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidTransientSlice", ft); -} diff --git a/src/FluidTransientSlice/test.scd b/src/FluidTransientSlice/test.scd deleted file mode 100644 index b82344e2..00000000 --- a/src/FluidTransientSlice/test.scd +++ /dev/null @@ -1,21 +0,0 @@ -s.reboot; - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); - -// basic param (the process add a latency of (blockSize + padding - order) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidTransientSlice.ar(sig)*0.5, DelayN.ar(sig, 1, ((256 + 128 - 20)/ s.sampleRate))]}.play - -// sexier params -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidTransientSlice.ar(sig,order:80,debounce:2205)*0.5, DelayN.ar(sig, 1, ((256 + 128 - 80)/ s.sampleRate))]}.play - -// more musical trans-trigged autopan -( -{ - var sig, trig, syncd, pan; - sig = PlayBuf.ar(1,b.bufnum,loop:1); - trig = FluidTransientSlice.ar(sig,order:10,debounce:2205); - syncd = DelayN.ar(sig, 1, ((256 + 128 - 10)/ s.sampleRate)); - pan = TRand.ar(-1,1,trig); - Pan2.ar(syncd,pan); -}.play -) \ No newline at end of file diff --git a/src/FluidTransients/CMakeLists.txt b/src/FluidTransients/CMakeLists.txt deleted file mode 100755 index 9646a4ea..00000000 --- a/src/FluidTransients/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. -# Licensed under the BSD-3 License. -# See license.md file in the project root for full license information. -# This project has received funding from the European Research Council (ERC) -# under the European Union’s Horizon 2020 research and innovation programme -# (grant agreement No 725899). - -cmake_minimum_required(VERSION 3.11) - -get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE) -message("Configuring ${PLUGIN}") -set(FILENAME ${PLUGIN}.cpp) - -add_library( - ${PLUGIN} - MODULE - ${FILENAME} -) - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidTransients/FluidTransients.cpp b/src/FluidTransients/FluidTransients.cpp deleted file mode 100644 index be7816f1..00000000 --- a/src/FluidTransients/FluidTransients.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. -Licensed under the BSD-3 License. -See license.md file in the project root for full license information. -This project has received funding from the European Research Council (ERC) -under the European Union’s Horizon 2020 research and innovation programme -(grant agreement No 725899). -*/ - -#include - -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidTransients", ft); -} diff --git a/src/FluidTransients/test.scd b/src/FluidTransients/test.scd deleted file mode 100644 index 363a7196..00000000 --- a/src/FluidTransients/test.scd +++ /dev/null @@ -1,14 +0,0 @@ -s.reboot; -s.quit - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); - -// basic param -{FluidTransients.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play - -// sexier params -{FluidTransients.ar(PlayBuf.ar(1,b.bufnum,loop:1),80,threshFwd:MouseX.kr(0,5),threshBack:MouseY.kr(0,2))}.play - -// null test (the process add a latency of (blockSize + padding - order) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidTransients.ar(sig).sum - DelayN.ar(sig, 1, ((256 + 128 - 20)/ s.sampleRate))]}.play - From c912c42c14d7de15391871e74ea204109758dea4 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Thu, 26 May 2022 17:43:00 +0100 Subject: [PATCH 30/63] CMake: typo --- scripts/MakePluginSources.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/MakePluginSources.cmake b/scripts/MakePluginSources.cmake index bde37e5e..ed246949 100644 --- a/scripts/MakePluginSources.cmake +++ b/scripts/MakePluginSources.cmake @@ -6,7 +6,7 @@ # under the European Union’s Horizon 2020 research and innovation programme # (grant agreement No 725899). -include(FLuidClientStub) +include(FluidClientStub) function(make_external_name client header var) set(${var} Fluid${client} PARENT_SCOPE) From 929375f1468b1d2ce7fcb20cdd50be80fdc30764 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Thu, 26 May 2022 17:43:32 +0100 Subject: [PATCH 31/63] CI: Update nightly --- .github/workflows/nightly.yaml | 128 ++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 56 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 57c9b837..6b6b8bf6 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -7,110 +7,126 @@ on: branches: [ dev, ci/** ] jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/docs@v4 - with: - target: MAKE_SC_REF - - - uses: actions/upload-artifact@v2 - with: - name: docs - path: build/sc_ref + # docs: + # runs-on: ubuntu-latest + # steps: + # - uses: flucoma/actions/env@v4 + # - uses: flucoma/actions/docs@v4 + # with: + # target: MAKE_SC_REF + # + # - uses: actions/upload-artifact@v2 + # with: + # name: docs + # path: build/sc_ref macbuild: runs-on: macos-11 steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/sc@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 + with: + branch: origin/dev + - name: compress archive + run: zip -r FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 - with: - name: macbuild - path: install + with: + name: macbuild + path: install/FluCoMa-SC-Mac-nightly.zip winbuild: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/sc@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 + with: + branch: origin/dev - name: remove pdb files run: Remove-Item install -Recurse -Include *.pdb - - uses: actions/upload-artifact@v2 + - name: compress archive + run: 7z a FluCoMa-SC-Windows-nightly.zip FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 with: name: winbuild - path: install + path: install/FluCoMa-SC-Windows-nightly.zip linuxbuild: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/sc@v4 - - - uses: actions/upload-artifact@v2 - with: - name: linuxbuild - path: install + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 + with: + branch: origin/dev + + - name: compress archive + run: tar -zcvf FluCoMa-SC-Linux-nightly.tar.gz FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: install/FluCoMa-SC-Linux-nightly.tar.gz release: runs-on: ubuntu-latest needs: [macbuild, winbuild, linuxbuild,docs] steps: - - uses: actions/download-artifact@v2 - with: - name: docs - path: docs + # - uses: actions/download-artifact@v2 + # with: + # name: docs + # path: docs - uses: actions/download-artifact@v2 with: name: macbuild - path: mac + # path: mac - - name: copy docs to mac - run: mkdir -p mac/FluidCorpusManipulation/HelpSource && cp -r docs/* mac/FluidCorpusManipulation/HelpSource - - - - name: compress win - run: zip -r ../FluCoMa-SC-Mac-nightly.zip . - working-directory: mac + # - name: copy docs to mac + # run: mkdir -p mac/FluidCorpusManipulation/HelpSource && cp -r docs/* mac/FluidCorpusManipulation/HelpSource + # + # + # - name: compress win + # run: zip -r ../FluCoMa-SC-Mac-nightly.zip . + # working-directory: mac - uses: actions/download-artifact@v2 with: name: winbuild - path: win - - - name: copy docs to win - run: mkdir -p win/FluidCorpusManipulation/HelpSource && cp -r docs/* win/FluidCorpusManipulation/HelpSource - - - name: compress win - run: zip -r ../FluCoMa-SC-Windows-nightly.zip . - working-directory: win + # path: win + # + # - name: copy docs to win + # run: mkdir -p win/FluidCorpusManipulation/HelpSource && cp -r docs/* win/FluidCorpusManipulation/HelpSource + # + # - name: compress win + # run: zip -r ../FluCoMa-SC-Windows-nightly.zip . + # working-directory: win - uses: actions/download-artifact@v2 with: name: linuxbuild - path: linux + # path: linux - - name: copy docs to linux - run: mkdir -p linux/FluidCorpusManipulation/HelpSource && cp -r docs/* linux/FluidCorpusManipulation/HelpSource - - - name: compress linux - run: zip -r ../FluCoMa-SC-Linux-nightly.zip . - working-directory: linux + # - name: copy docs to linux + # run: mkdir -p linux/FluidCorpusManipulation/HelpSource && cp -r docs/* linux/FluidCorpusManipulation/HelpSource + # + # - name: compress linux + # run: zip -r ../FluCoMa-SC-Linux-nightly.zip . + # working-directory: linux - uses: dev-drprasad/delete-tag-and-release@v0.2.0 @@ -125,7 +141,7 @@ jobs: with: name: FluCoMa SuperCollider Nightly Release body: "This is a nightly build of the FluCoMa SuperCollider package. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" - files: FluCoMa-SC-*.zip + files: FluCoMa-SC-* prerelease: true tag_name: nightly draft: false From 84ebcbc2993c8fbb2c3df30d21b381dba0be8c74 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Thu, 26 May 2022 18:01:12 +0100 Subject: [PATCH 32/63] CI: remove lingering references to docs job --- .github/workflows/nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 6b6b8bf6..b61406fc 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -80,7 +80,7 @@ jobs: release: runs-on: ubuntu-latest - needs: [macbuild, winbuild, linuxbuild,docs] + needs: [macbuild, winbuild, linuxbuild] steps: # - uses: actions/download-artifact@v2 From 2e255cb9c5aa07d72defb5b03074cab2b2823e99 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Thu, 26 May 2022 18:10:29 +0100 Subject: [PATCH 33/63] CMake: belatedly add branch selection for flucoma deps upon which CI relies --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e2e39e4..8cf0ad13 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") ################################################################################ # Paths set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "") - +set(FLUID_BRANCH "origin/main" CACHE STRING "Branch to pull flucoma dependencies from") set(SC_LIBRARY_OUTPUT_PREFIX "release-packaging" CACHE STRING "Where in the hierarchy to write sc plugins") set(SC_PATH "" CACHE PATH "Path to the top of SuperCollider source tree") @@ -64,14 +64,14 @@ FetchContent_Declare( flucoma-core GIT_REPOSITORY https://github.com/flucoma/flucoma-core.git GIT_PROGRESS TRUE - GIT_TAG origin/main + GIT_TAG ${FLUID_BRANCH} ) FetchContent_Declare( flucoma-docs GIT_REPOSITORY https://github.com/flucoma/flucoma-docs.git GIT_PROGRESS TRUE - GIT_TAG origin/main + GIT_TAG ${FLUID_BRANCH} ) if(FLUID_PATH) From b896744357db425d0b270d2b184e0528622e69f1 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Mon, 30 May 2022 22:08:05 +0100 Subject: [PATCH 34/63] CMake: Actually commit important code for best collaborative results --- scripts/MakePluginSources.cmake | 4 ++-- scripts/settings/FluidManipulation.cmake | 3 +++ scripts/settings/FluidManipulation.cpp.in | 11 +++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 scripts/settings/FluidManipulation.cmake create mode 100644 scripts/settings/FluidManipulation.cpp.in diff --git a/scripts/MakePluginSources.cmake b/scripts/MakePluginSources.cmake index ed246949..485cfadb 100644 --- a/scripts/MakePluginSources.cmake +++ b/scripts/MakePluginSources.cmake @@ -88,7 +88,7 @@ function(add_sc_extension PLUGIN FILENAME) #optional extra build settings (e.g for /bigobj with MSVC) include( - "${CMAKE_CURRENT_SOURCE_DIR}/scripts/build-settings/${PLUGIN}.cmake" + "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/settings/${PLUGIN}.cmake" OPTIONAL ) endfunction() @@ -110,7 +110,7 @@ function(generate_sc_source) set(ENTRY_POINT "PluginLoad(FlucomaPlugin)") set(WRAPPER_TEMPLATE [=[makeSCWrapper<${class}>("${external}", inTable);]=]) - set(EXTRA_SOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/extra/${ARG_FILENAME}.cpp.in") + set(EXTRA_SOURCE_FILE "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/settings/${ARG_FILENAME}.cpp.in") if(EXISTS ${EXTRA_SOURCE_FILE}) generate_source(${ARGN} EXTRA_SOURCE ${EXTRA_SOURCE_FILE} EXTERNALS_OUT external FILE_OUT outfile) diff --git a/scripts/settings/FluidManipulation.cmake b/scripts/settings/FluidManipulation.cmake new file mode 100644 index 00000000..7e706752 --- /dev/null +++ b/scripts/settings/FluidManipulation.cmake @@ -0,0 +1,3 @@ +if(WIN32) + target_compile_options(${PLUGIN} PUBLIC /bigobj) +endif() diff --git a/scripts/settings/FluidManipulation.cpp.in b/scripts/settings/FluidManipulation.cpp.in new file mode 100644 index 00000000..f2d72cb2 --- /dev/null +++ b/scripts/settings/FluidManipulation.cpp.in @@ -0,0 +1,11 @@ + makeSCWrapper("FluidKDTreeQuery",inTable); + makeSCWrapper("FluidKMeansQuery",inTable); + makeSCWrapper("FluidKNNClassifierQuery",inTable); + makeSCWrapper("FluidKNNRegressorQuery",inTable); + makeSCWrapper("FluidNormalizeQuery",inTable); + makeSCWrapper("FluidRobustScaleQuery",inTable); + makeSCWrapper("FluidStandardizeQuery",inTable); + makeSCWrapper("FluidPCAQuery",inTable); + makeSCWrapper("FluidUMAPQuery",inTable); + makeSCWrapper("FluidMLPRegressorQuery",inTable); + makeSCWrapper("FluidMLPClassifierQuery",inTable); From aa37957cd434319fa6c939b959e92d2c5840ca52 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Mon, 30 May 2022 22:10:11 +0100 Subject: [PATCH 35/63] CMake: This file is now redundant, in fact --- scripts/settings/FluidManipulation.cmake | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 scripts/settings/FluidManipulation.cmake diff --git a/scripts/settings/FluidManipulation.cmake b/scripts/settings/FluidManipulation.cmake deleted file mode 100644 index 7e706752..00000000 --- a/scripts/settings/FluidManipulation.cmake +++ /dev/null @@ -1,3 +0,0 @@ -if(WIN32) - target_compile_options(${PLUGIN} PUBLIC /bigobj) -endif() From eea15539ce6d7f22b0425badb1e9b947baab00a7 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 31 May 2022 15:25:39 +0100 Subject: [PATCH 36/63] cmake: missing slash in install --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cf0ad13..ec910af8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,6 +261,6 @@ install(FILES ${flucoma-core_SOURCE_DIR}/distribution.lic RENAME LICENSE.md) if(DOCS) - install(DIRECTORY "${SC_DOC_OUT}" + install(DIRECTORY "${SC_DOC_OUT}/" DESTINATION "${SC_PACKAGE_ROOT}/HelpSource") endif() From 87ef9cf368150bc0e636f9ae86775df14293b82a Mon Sep 17 00:00:00 2001 From: tremblap Date: Sat, 4 Jun 2022 16:03:57 +0100 Subject: [PATCH 37/63] bufnmf: added the maxFFTsize parameter in the server call --- release-packaging/Classes/FluidBufNMF.sc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-packaging/Classes/FluidBufNMF.sc b/release-packaging/Classes/FluidBufNMF.sc index 186f341f..3ff00a2e 100644 --- a/release-packaging/Classes/FluidBufNMF.sc +++ b/release-packaging/Classes/FluidBufNMF.sc @@ -7,7 +7,7 @@ FluidBufNMF : FluidBufProcessor 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, 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| @@ -19,7 +19,7 @@ FluidBufNMF : FluidBufProcessor ^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,0],freeWhenDone,action); + ).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| @@ -31,7 +31,7 @@ FluidBufNMF : FluidBufProcessor ^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, 1],freeWhenDone,action); + ).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone,action); } } FluidBufNMFTrigger : FluidProxyUgen {} From 18b2545b51115ba78e8e9b2ac13835e440acb522 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 7 Jun 2022 10:29:49 +0100 Subject: [PATCH 38/63] FluidStats: Change where output Array reshape happens to keep SynthDescLib happy --- release-packaging/Classes/FluidStats.sc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/release-packaging/Classes/FluidStats.sc b/release-packaging/Classes/FluidStats.sc index 73b03db6..bb286def 100644 --- a/release-packaging/Classes/FluidStats.sc +++ b/release-packaging/Classes/FluidStats.sc @@ -1,23 +1,16 @@ FluidStats : MultiOutUGen { - var Date: Tue, 7 Jun 2022 16:10:35 +0100 Subject: [PATCH 39/63] FluidBufNNDSVD: maxfftsize now needed in server call, or booooom fixes #161 --- release-packaging/Classes/FluidBufNNDSVD.sc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/release-packaging/Classes/FluidBufNNDSVD.sc b/release-packaging/Classes/FluidBufNNDSVD.sc index 3aeb6ce1..29395b55 100644 --- a/release-packaging/Classes/FluidBufNNDSVD.sc +++ b/release-packaging/Classes/FluidBufNNDSVD.sc @@ -1,47 +1,47 @@ FluidBufNNDSVD : FluidBufProcessor{ - *kr { |source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| - + *kr { |source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| + source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; source = source.asUGenInput; bases = bases.asUGenInput; activations = activations.asUGenInput; - - ^FluidProxyUgen.kr1(\FluidBufNNDSVDTrigger, -1, source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, trig, blocking); + + ^FluidProxyUgen.kr1(\FluidBufNNDSVDTrigger, -1, source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, trig, blocking); } *process { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - + source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; source = source.asUGenInput; bases = bases.asUGenInput; activations = activations.asUGenInput; - + ^this.new( server, nil, [bases] ).processList( - [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize,0],freeWhenDone, action + [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone, action ) } *processBlocking { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - + source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; source = source.asUGenInput; bases = bases.asUGenInput; activations = activations.asUGenInput; - + ^this.new( server, nil, [bases] ).processList( - [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize,1],freeWhenDone, action + [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone, action ) } } From 42bd8d314bbca44487d5465ed6076faf58cbc7ef Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 7 Jun 2022 16:45:19 +0100 Subject: [PATCH 40/63] BufNMFCross: Needs MaxFFTSize --- release-packaging/Classes/FluidBufNMFCross.sc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-packaging/Classes/FluidBufNMFCross.sc b/release-packaging/Classes/FluidBufNMFCross.sc index 3f0bce80..2312f62b 100644 --- a/release-packaging/Classes/FluidBufNMFCross.sc +++ b/release-packaging/Classes/FluidBufNMFCross.sc @@ -9,7 +9,7 @@ FluidBufNMFCross : FluidBufProcessor { target.isNil.if {"FluidBufNMFCross: Invalid target buffer".throw}; output.isNil.if {"FluidBufNMFCross: Invalid output buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufNMFCrossTrigger, -1, source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNMFCrossTrigger, -1, source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, fftSize, trig, blocking); } *process { |server, source, target, output , timeSparsity = 7, polyphony = 10, continuity = 7, iterations = 50, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| @@ -25,7 +25,7 @@ FluidBufNMFCross : FluidBufProcessor { ^this.new( server, nil, [output] ).processList( - [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize,0],freeWhenDone, action + [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone, action ); } @@ -42,7 +42,7 @@ FluidBufNMFCross : FluidBufProcessor { ^this.new( server, nil, [output] ).processList( - [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize,1],freeWhenDone, action + [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone, action ); } } From 2996f7cd17f817f528b69573fd51798c33711871 Mon Sep 17 00:00:00 2001 From: weefuzzy Date: Tue, 7 Jun 2022 21:13:26 +0100 Subject: [PATCH 41/63] BufNNDSVD: Ensure activations buffer is queried at finish --- release-packaging/Classes/FluidBufNNDSVD.sc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release-packaging/Classes/FluidBufNNDSVD.sc b/release-packaging/Classes/FluidBufNNDSVD.sc index 29395b55..a890e9a3 100644 --- a/release-packaging/Classes/FluidBufNNDSVD.sc +++ b/release-packaging/Classes/FluidBufNNDSVD.sc @@ -23,7 +23,7 @@ FluidBufNNDSVD : FluidBufProcessor{ activations = activations.asUGenInput; ^this.new( - server, nil, [bases] + server, nil, [bases,activations] ).processList( [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone, action ) @@ -39,7 +39,7 @@ FluidBufNNDSVD : FluidBufProcessor{ activations = activations.asUGenInput; ^this.new( - server, nil, [bases] + server, nil, [bases,activations] ).processList( [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone, action ) From f3ce3cf3231d3d2fcaa329efd6fe6fb58784c443 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Sun, 12 Jun 2022 11:56:44 +0100 Subject: [PATCH 42/63] FluidBufToKr ensure that numFrames is an int (not a float) --- release-packaging/Classes/FluidBufToKr.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/Classes/FluidBufToKr.sc b/release-packaging/Classes/FluidBufToKr.sc index f911298a..e6d5097e 100644 --- a/release-packaging/Classes/FluidBufToKr.sc +++ b/release-packaging/Classes/FluidBufToKr.sc @@ -61,7 +61,7 @@ FluidBufToKr { }; if(numFrames > 1,{ - ^numFrames.collect{ + ^numFrames.asInteger.collect{ arg i; BufRd.kr(1,buffer,i+startFrame,0,0); } From 42d9060b9269f61aa5735ccfb8f53bf11e8e7eed Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Mon, 13 Jun 2022 12:12:48 +0100 Subject: [PATCH 43/63] Added *(Buf)Feature objects to guide (and deleted old guide) NNDSVD --> NMFSeed in Guide fixed bad links in Guide --- .../Guides/FluidCorpusManipulation.schelp | 7 +- .../FluidCorpusManipulationToolkit.schelp | 66 ------------------- 2 files changed, 5 insertions(+), 68 deletions(-) delete mode 100644 release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp diff --git a/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp b/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp index ad630e57..aace8076 100644 --- a/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp +++ b/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp @@ -23,7 +23,7 @@ table:: ## strong::on signals:: || strong:: on buffers:: || strong::digest:: ## Link::Classes/FluidAmpGate:: || LINK:: Classes/FluidBufAmpGate:: || Events from amplitude enevelope ## LINK:: Classes/FluidAmpSlice:: || Link::Classes/FluidBufAmpSlice:: || Onsets from amplitude envelope -## link::Classes/FluidOnsetSlice::||link::Classes/FluidBufOnsetSlice::||Spectral onset detecor +## link::Classes/FluidOnsetSlice::||link::Classes/FluidBufOnsetSlice::||Spectral onset detector ## link::Classes/FluidTransientSlice::||link::Classes/FluidBufTransientSlice::||Transient model onset detector ## LINK:: Classes/FluidNoveltySlice::||LINK:: Classes/FluidBufNoveltySlice::|| Novelty based onset detection on a choice of descriptors :: @@ -39,8 +39,11 @@ table:: ##link::Classes/FluidSpectralShape:: || link::Classes/FluidBufSpectralShape:: || Seven Spectral Shape Descriptors ##link::Classes/FluidChroma:: || link::Classes/FluidBufChroma:: || Pitch Classes Descriptor ##link::Classes/FluidNMFMatch:: || || Real-time activation of link::Classes/FluidBufNMF##NMF:: bases -## || link::Classes/FluidBufNNDSVD::|| Quick starting estimates for link::Classes/FluidBufNMF##NMF:: components using Singular Value Decomposition +## || link::Classes/FluidBufNMFSeed::|| Quick starting estimates for link::Classes/FluidBufNMF##NMF:: components using Singular Value Decomposition ## || link::Classes/FluidBufSTFT:: || Perform STFT / ISTFT on link::Classes/Buffer::s +##link::Classes/FluidAmpFeature:: || link::Classes/FluidBufAmpFeature:: || Detrending Amplitude Envelope Descriptor +##link::Classes/FluidNoveltyFeature:: || link::Classes/FluidBufNoveltyFeature:: || Novelty descriptor based on a choice of analysis descriptors +##link::Classes/FluidOnsetFeature:: || link::Classes/FluidBufOnsetFeature:: || Descriptor comparing spectral frames using a choice of comparisons :: section:: Decompose Audio diff --git a/release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp b/release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp deleted file mode 100644 index efd6a59b..00000000 --- a/release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp +++ /dev/null @@ -1,66 +0,0 @@ -TITLE:: Fluid Decomposition Toolbox -SUMMARY:: An overview of the FluCoMa toolbox for signal decomposition -CATEGORIES:: Libraries>FluidCorpusManipulation - - -The Fluid Decomposition toolbox provides an open-ended, loosely coupled set of objects to break up and analyse sound in terms of slices (segments in time), layers (superpositions in time and frequency) and objects (configurable or discoverable patterns in sound). Almost all objects have audio-rate and buffer-based versions. - -This toolbox was made possible thanks to the FluCoMa project ( LINK::http://www.flucoma.org/:: ) funded by the European Research Council ( LINK::https://erc.europa.eu/:: ) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 725899). - - -SECTION::Slices -Slice by amplitude envelope: -LINK::Classes/FluidAmpSlice:: LINK::Classes/FluidBufAmpSlice:: - -Slice by onsets in the spectral domain: -LINK::Classes/FluidOnsetSlice:: LINK::Classes/FluidBufOnsetSlice:: - -Slice by estimated novelty on a choice of features: -LINK::Classes/FluidNoveltySlice:: LINK::Classes/FluidBufNoveltySlice:: - -Slice by transient modelling: -LINK::Classes/FluidTransientSlice:: LINK::Classes/FluidBufTransientSlice:: - - -SECTION::Layers -Decompose into sines + residual -LINK::Classes/FluidSines:: LINK::Classes/FluidBufSines:: - -Decompose into transients + residual -LINK::Classes/FluidTransients:: LINK::Classes/FluidBufTransients:: - -Decompose into 'harmonic' and 'percussive' layers -LINK::Classes/FluidHPSS:: LINK::Classes/FluidBufHPSS:: - - -SECTION::Objects -Use Nonnegative Matrix Factorisation to explore and decompose sounds -LINK::Classes/FluidBufNMF:: LINK::Classes/FluidNMFFilter:: LINK::Classes/FluidNMFMatch:: - - -SECTION::Descriptors -Report amplitude and peak, or r128 loudness and true peak -LINK::Classes/FluidLoudness:: LINK::Classes/FluidBufLoudness:: - -A suite of pitch estimators -LINK::Classes/FluidPitch:: LINK::Classes/FluidBufPitch:: - -Energy across Mel bands -LINK::Classes/FluidMelBands:: LINK::Classes/FluidBufMelBands:: - -Mel Frequency Ceptstral Coefficients -LINK::Classes/FluidMFCC:: LINK::Classes/FluidBufMFCC:: - -Summary measures of spectral shape -LINK::Classes/FluidSpectralShape:: LINK::Classes/FluidBufSpectralShape:: - -Statistics of buffers -LINK::Classes/FluidBufStats:: - - -SECTION::Utility -Copy, slice, stack, mix concatenate. All the things you've wanted to do with buffers... -LINK::Classes/FluidBufCompose:: - -A tutorial object to experiment with multithreading in FluidBuf* objects -LINK::Classes/FluidBufThreadDemo:: From 88f58e2fbc5904d05b82e862743fb94ec37e0fc5 Mon Sep 17 00:00:00 2001 From: tremblap Date: Mon, 13 Jun 2022 13:30:31 +0100 Subject: [PATCH 44/63] change interface and file name (#113) --- .../{FluidBufNNDSVD.sc => FluidBufNMFSeed.sc} | 24 +++++++++---------- ...ufNNDSVD.schelp => FluidBufNMFSeed.schelp} | 6 ++--- 2 files changed, 15 insertions(+), 15 deletions(-) rename release-packaging/Classes/{FluidBufNNDSVD.sc => FluidBufNMFSeed.sc} (59%) rename release-packaging/HelpSource/Classes/{FluidBufNNDSVD.schelp => FluidBufNMFSeed.schelp} (94%) diff --git a/release-packaging/Classes/FluidBufNNDSVD.sc b/release-packaging/Classes/FluidBufNMFSeed.sc similarity index 59% rename from release-packaging/Classes/FluidBufNNDSVD.sc rename to release-packaging/Classes/FluidBufNMFSeed.sc index a890e9a3..dca1fcd0 100644 --- a/release-packaging/Classes/FluidBufNNDSVD.sc +++ b/release-packaging/Classes/FluidBufNMFSeed.sc @@ -1,23 +1,23 @@ -FluidBufNNDSVD : FluidBufProcessor{ +FluidBufNMFSeed : FluidBufProcessor{ *kr { |source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| - source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; - bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; + source.isNil.if {"FluidBufNMFSeed: Invalid source buffer".throw}; + bases.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + activations.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; source = source.asUGenInput; bases = bases.asUGenInput; activations = activations.asUGenInput; - ^FluidProxyUgen.kr1(\FluidBufNNDSVDTrigger, -1, source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, trig, blocking); + ^FluidProxyUgen.kr1(\FluidBufNMFSeedTrigger, -1, source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, trig, blocking); } *process { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; - bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; + source.isNil.if {"FluidBufNMFSeed: Invalid source buffer".throw}; + bases.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + activations.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; source = source.asUGenInput; bases = bases.asUGenInput; activations = activations.asUGenInput; @@ -31,9 +31,9 @@ FluidBufNNDSVD : FluidBufProcessor{ *processBlocking { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; - bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; + source.isNil.if {"FluidBufNMFSeed: Invalid source buffer".throw}; + bases.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + activations.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; source = source.asUGenInput; bases = bases.asUGenInput; activations = activations.asUGenInput; @@ -45,4 +45,4 @@ FluidBufNNDSVD : FluidBufProcessor{ ) } } -FluidBufNNDSVDTrigger : FluidProxyUgen {} +FluidBufNMFSeedTrigger : FluidProxyUgen {} diff --git a/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp b/release-packaging/HelpSource/Classes/FluidBufNMFSeed.schelp similarity index 94% rename from release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp rename to release-packaging/HelpSource/Classes/FluidBufNMFSeed.schelp index 03885534..38f1348b 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNMFSeed.schelp @@ -1,4 +1,4 @@ -TITLE:: FluidBufNNDSVD +TITLE:: FluidBufNMFSeed summary:: Non-Negative Double Singular Value Decomposition on a Buffer categories:: Libraries>FluidCorpusManipulation related:: Classes/FluidBufNMF @@ -79,7 +79,7 @@ b = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav")); //how many bases do I need to decompose the buffer with 90% accuracy ( Routine{ - FluidBufNNDSVD.process(s, b, ~bases, ~activations, coverage: 0.9, method: 1).wait; + FluidBufNMFSeed.process(s, b, ~bases, ~activations, coverage: 0.9, method: 1).wait; "% bases".format(~bases.numChannels).postln; }.play; ) @@ -89,7 +89,7 @@ Routine{ //try the same process with less accuracy ( Routine{ - FluidBufNNDSVD.process(s, b, ~bases, ~activations, coverage: 0.5).wait; + FluidBufNMFSeed.process(s, b, ~bases, ~activations, coverage: 0.5).wait; "% bases".format(~bases.numChannels).postln; }.play ) From eaa5bf4a419c4b0222ea93618c8d46a2409a5fe1 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Mon, 13 Jun 2022 14:07:52 +0100 Subject: [PATCH 45/63] hidden --> hiddenLayers in class definition (#114) --- release-packaging/Classes/FluidMLP.sc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/release-packaging/Classes/FluidMLP.sc b/release-packaging/Classes/FluidMLP.sc index e486d991..7939f75b 100644 --- a/release-packaging/Classes/FluidMLP.sc +++ b/release-packaging/Classes/FluidMLP.sc @@ -5,12 +5,12 @@ FluidMLPRegressor : FluidModelObject { const hidden, <>activation, <>outputActivation, <>tapIn, <>tapOut, <>maxIter, <>learnRate, <>momentum, <>batchSize, <>validation; + var <>hiddenLayers, <>activation, <>outputActivation, <>tapIn, <>tapOut, <>maxIter, <>learnRate, <>momentum, <>batchSize, <>validation; - *new {|server, hidden = #[3,3] , activation = 2, outputActivation = 0, tapIn = 0, tapOut = -1,maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| + *new {|server, hiddenLayers = #[3,3] , activation = 2, outputActivation = 0, tapIn = 0, tapOut = -1,maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| - ^super.new(server, [hidden.size] ++ hidden ++ [activation, outputActivation, tapIn, tapOut, maxIter, learnRate, momentum, batchSize, validation]) - .hidden_(hidden) + ^super.new(server, [hiddenLayers.size] ++ hiddenLayers ++ [activation, outputActivation, tapIn, tapOut, maxIter, learnRate, momentum, batchSize, validation]) + .hiddenLayers_(hiddenLayers) .activation_(activation) .outputActivation_(outputActivation) .tapIn_(tapIn) @@ -23,7 +23,7 @@ FluidMLPRegressor : FluidModelObject { } prGetParams{ - ^[this.id, this.hidden.size] ++ this.hidden ++ [this.activation, this.outputActivation, this.tapIn, this.tapOut, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation] + ^[this.id, this.hiddenLayers.size] ++ this.hiddenLayers ++ [this.activation, this.outputActivation, this.tapIn, this.tapOut, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation] } clearMsg{ ^this.prMakeMsg(\clear, id) } @@ -89,7 +89,7 @@ FluidMLPRegressor : FluidModelObject { prUpdateParams{|data| var rest = data.keep(-9); - this.hidden_(data.drop(1).drop(-9).copy); + this.hiddenLayers_(data.drop(1).drop(-9).copy); [\activation_, \outputActivation_, \tapIn_, \tapOut_, \maxIter_, \learnRate_, \momentum_, @@ -120,11 +120,11 @@ FluidMLPClassifier : FluidModelObject { const hidden, <>activation, <> maxIter, <>learnRate, <> momentum, <>batchSize, <>validation; + var <>hiddenLayers, <>activation, <> maxIter, <>learnRate, <> momentum, <>batchSize, <>validation; - *new {|server, hidden = #[3,3] , activation = 2, maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| - ^super.new(server,[hidden.size] ++ hidden ++ [activation, maxIter, learnRate, momentum, batchSize, validation]) - .hidden_(hidden) + *new {|server, hiddenLayers = #[3,3] , activation = 2, maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| + ^super.new(server,[hiddenLayers.size] ++ hiddenLayers ++ [activation, maxIter, learnRate, momentum, batchSize, validation]) + .hiddenLayers_(hiddenLayers) .activation_(activation) .maxIter_(maxIter) .learnRate_(learnRate) @@ -134,7 +134,7 @@ FluidMLPClassifier : FluidModelObject { } prGetParams{ - ^[this.id, this.hidden.size] ++ this.hidden ++ [this.activation, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation]; + ^[this.id, this.hiddenLayers.size] ++ this.hiddenLayers ++ [this.activation, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation]; } clearMsg{ ^this.prMakeMsg(\clear,id) } @@ -183,7 +183,7 @@ FluidMLPClassifier : FluidModelObject { prUpdateParams{|data| var rest = data.keep(-6); - this.hidden_(data.drop(1).drop(-6).copy); + this.hiddenLayers_(data.drop(1).drop(-6).copy); [\activation_, \maxIter_, \learnRate_, \momentum_, \batchSize_, \validation_] From 9c5e9d2902120d1799cc1e64551bc749c3809219 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Mon, 13 Jun 2022 15:01:55 +0100 Subject: [PATCH 46/63] reordered some max arguments --- release-packaging/Classes/FluidChroma.sc | 2 +- release-packaging/Classes/FluidMFCC.sc | 2 +- release-packaging/Classes/FluidMelBands.sc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/release-packaging/Classes/FluidChroma.sc b/release-packaging/Classes/FluidChroma.sc index d9a76025..b604f2db 100644 --- a/release-packaging/Classes/FluidChroma.sc +++ b/release-packaging/Classes/FluidChroma.sc @@ -1,6 +1,6 @@ FluidChroma : FluidRTMultiOutUGen { - *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumChroma, maxFFTSize = -1; + *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxNumChroma; maxNumChroma = maxNumChroma ? numChroma; diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index 0a1bdbe2..b392fcd3 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,6 +1,6 @@ FluidMFCC : FluidRTMultiOutUGen { - *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = nil, maxFFTSize = -1; + *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxNumCoeffs = nil; maxNumCoeffs = maxNumCoeffs ? numCoeffs; diff --git a/release-packaging/Classes/FluidMelBands.sc b/release-packaging/Classes/FluidMelBands.sc index 862e321c..486477f0 100644 --- a/release-packaging/Classes/FluidMelBands.sc +++ b/release-packaging/Classes/FluidMelBands.sc @@ -1,6 +1,6 @@ FluidMelBands : FluidRTMultiOutUGen { - *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumBands, maxFFTSize = -1; + *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxNumBands; maxNumBands = maxNumBands ? numBands; From 2982ba1bf6ffa62d57949df07ef6f108968bb29d Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Tue, 14 Jun 2022 10:03:26 +0100 Subject: [PATCH 47/63] change interp to interpolation in nmfmorph class (#115) --- release-packaging/Classes/FluidNMFMorph.sc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release-packaging/Classes/FluidNMFMorph.sc b/release-packaging/Classes/FluidNMFMorph.sc index cc64e779..21611e20 100644 --- a/release-packaging/Classes/FluidNMFMorph.sc +++ b/release-packaging/Classes/FluidNMFMorph.sc @@ -1,12 +1,12 @@ FluidNMFMorph : FluidRTUGen { - *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interp = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interpolation = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; source = source ?? {-1}; target = target ?? {-1}; activations = activations ?? {-1}; - ^this.new1('audio', source, target, activations, autoassign, interp, windowSize, hopSize, fftSize, maxFFTSize); + ^this.new1('audio', source, target, activations, autoassign, interpolation, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; From 81110de196e1cc154e7a3d07d2b130d9341a2bf3 Mon Sep 17 00:00:00 2001 From: Gerard Roma Date: Tue, 14 Jun 2022 10:05:32 +0100 Subject: [PATCH 48/63] Feature/skmeans (#66) * add PCA whitening parameter * add FluidSKMeans * SKMeans correction * added RT query * transform -> encode * added to overview Co-authored-by: Gerard Co-authored-by: tremblap --- release-packaging/Classes/FluidSKMeans.sc | 136 ++++++++++++++++++ .../Guides/FluidCorpusManipulation.schelp | 1 + scripts/settings/FluidManipulation.cpp.in | 1 + 3 files changed, 138 insertions(+) create mode 100644 release-packaging/Classes/FluidSKMeans.sc diff --git a/release-packaging/Classes/FluidSKMeans.sc b/release-packaging/Classes/FluidSKMeans.sc new file mode 100644 index 00000000..f53d4504 --- /dev/null +++ b/release-packaging/Classes/FluidSKMeans.sc @@ -0,0 +1,136 @@ +FluidSKMeans : FluidModelObject { + + var clusters, threshold, maxiter; + + *new {|server, numClusters = 4, encodingThreshold = 0.25, maxIter = 100| + ^super.new(server,[numClusters,maxIter, encodingThreshold]) + .numClusters_(numClusters) + .encodingThreshold_(encodingThreshold) + .maxIter_(maxIter); + } + + numClusters_{|n| clusters = n.asInteger} + numClusters{ ^clusters } + + encodingThreshold_{|t| threshold = t.asFloat} + encodingThreshold{ ^threshold } + + maxIter_{|i| maxiter = i.asInteger} + maxIter{ ^maxiter } + + + prGetParams{^[this.id,this.numClusters, this.encodingThreshold, this.maxIter];} + + fitMsg{ |dataSet| ^this.prMakeMsg(\fit,id,dataSet.id);} + + fit{|dataSet, action| + actions[\fit] = [ + numbers( FluidMessageResponse, _, this.numClusters ,_), + action + ]; + this.prSendMsg(this.fitMsg(dataSet)); + } + + fitPredictMsg{|dataSet, labelSet| + ^this.prMakeMsg(\fitPredict, id, dataSet.id, labelSet.id) + } + + fitPredict{|dataSet, labelSet,action| + actions[\fitPredict] = [ + numbers(FluidMessageResponse, _, this.numClusters, _), + action + ]; + this.prSendMsg(this.fitPredictMsg(dataSet,labelSet)); + } + + predictMsg{|dataSet, labelSet| + ^this.prMakeMsg(\predict, id, dataSet.id, labelSet.id) + } + + predict{ |dataSet, labelSet, action| + actions[\predict] = [ + numbers(FluidMessageResponse, _, this.numClusters, _), + action + ]; + this.prSendMsg(this.predictMsg(dataSet,labelSet)); + } + + predictPointMsg{|buffer| + ^this.prMakeMsg(\predictPoint, id, this.prEncodeBuffer(buffer)) + } + + predictPoint { |buffer, action| + actions[\predictPoint] = [number(FluidMessageResponse,_,_),action]; + this.prSendMsg(this.predictPointMsg(buffer)) + } + + fitEncodeMsg{|srcDataSet, dstDataSet| + ^this.prMakeMsg(\fitEncode, id, srcDataSet.id, dstDataSet.id) + } + + fitEncode{|srcDataSet, dstDataSet,action| + actions[\fitEncode] = [nil,action]; + this.prSendMsg(this.fitEncodeMsg(srcDataSet,dstDataSet)); + } + + encodeMsg{|srcDataSet, dstDataSet| + ^this.prMakeMsg(\encode, id, srcDataSet.id, dstDataSet.id) + } + + encode{ |srcDataSet, dstDataSet, action| + actions[\encode] = [nil,action]; + this.prSendMsg(this.encodeMsg(srcDataSet,dstDataSet)); + } + + encodePointMsg{ |sourceBuffer, targetBuffer| + ^this.prMakeMsg(\encodePoint, id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(targetBuffer), + ["/b_query", targetBuffer.asUGenInput]); + } + + encodePoint { |sourceBuffer, targetBuffer, action| + actions[\encodePoint] = [nil,{action.value(targetBuffer)}]; + this.prSendMsg(this.encodePointMsg(sourceBuffer, targetBuffer)); + } + + getMeansMsg{|dataSet| ^this.prMakeMsg(\getMeans, id, dataSet.asUGenInput) } + + getMeans{ |dataSet, action| + actions[\getMeans] = [nil, action]; + this.prSendMsg(this.getMeansMsg(dataSet)); + } + + setMeansMsg{|dataSet| ^this.prMakeMsg(\setMeans, id, dataSet.asUGenInput) } + + setMeans{ |dataSet, action| + actions[\setMeans] = [nil, action]; + this.prSendMsg(this.setMeansMsg(dataSet)); + } + + clearMsg{ ^this.prMakeMsg(\clear, id) } + + clear{ |action| + actions[\clear] = [nil, action]; + this.prSendMsg(this.clearMsg); + } + + kr{|trig, inputBuffer,outputBuffer| + ^FluidSKMeansQuery.kr(trig, + this, + this.prEncodeBuffer(inputBuffer), + this.prEncodeBuffer(outputBuffer)); + } +} + +FluidSKMeansQuery : FluidRTMultiOutUGen { + + *kr{ |trig, model,inputBuffer, outputBuffer | + ^this.multiNew('control',trig, model.asUGenInput,inputBuffer.asUGenInput, outputBuffer.asUGenInput) + } + + init { arg ... theInputs; + inputs = theInputs; + ^this.initOutputs(1, rate); + } +} diff --git a/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp b/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp index aace8076..92e2e294 100644 --- a/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp +++ b/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp @@ -99,6 +99,7 @@ table:: ##link::Classes/FluidPCA:: || Principal Component Analysis for preprocessing and dimension reduction ##link::Classes/FluidMDS:: || Multidimensional Scaling for dimension reduction ##link::Classes/FluidKMeans:: || K-Means clustering +##link::Classes/FluidSKMeans:: || Spherical K-Means clustering ##link::Classes/FluidUMAP:: || Dimension reduction with UMAP algorithm ##link::Classes/FluidGrid:: || Transform a data set of two dimensional points into a two dimensional grid using the Munkres Algorithm. :: diff --git a/scripts/settings/FluidManipulation.cpp.in b/scripts/settings/FluidManipulation.cpp.in index f2d72cb2..f8359565 100644 --- a/scripts/settings/FluidManipulation.cpp.in +++ b/scripts/settings/FluidManipulation.cpp.in @@ -1,5 +1,6 @@ makeSCWrapper("FluidKDTreeQuery",inTable); makeSCWrapper("FluidKMeansQuery",inTable); + makeSCWrapper("FluidSKMeansQuery",inTable); makeSCWrapper("FluidKNNClassifierQuery",inTable); makeSCWrapper("FluidKNNRegressorQuery",inTable); makeSCWrapper("FluidNormalizeQuery",inTable); From abb026cc6f8ecbe18c8ee1d2219cd9d84ce70505 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Tue, 14 Jun 2022 11:01:04 +0100 Subject: [PATCH 49/63] [CI] Update Release Workflow (#118) * cleanup nightly.yaml * use new release style * refactor release * remove workflow dispatch variables --- .github/workflows/nightly.yaml | 53 +---------------- .github/workflows/release.yml | 102 ++++++++++----------------------- 2 files changed, 34 insertions(+), 121 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index b61406fc..2a3bd70e 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -7,19 +7,6 @@ on: branches: [ dev, ci/** ] jobs: - # docs: - # runs-on: ubuntu-latest - # steps: - # - uses: flucoma/actions/env@v4 - # - uses: flucoma/actions/docs@v4 - # with: - # target: MAKE_SC_REF - # - # - uses: actions/upload-artifact@v2 - # with: - # name: docs - # path: build/sc_ref - macbuild: runs-on: macos-11 steps: @@ -83,51 +70,17 @@ jobs: needs: [macbuild, winbuild, linuxbuild] steps: - # - uses: actions/download-artifact@v2 - # with: - # name: docs - # path: docs - - uses: actions/download-artifact@v2 with: - name: macbuild - # path: mac + name: macbuild - # - name: copy docs to mac - # run: mkdir -p mac/FluidCorpusManipulation/HelpSource && cp -r docs/* mac/FluidCorpusManipulation/HelpSource - # - # - # - name: compress win - # run: zip -r ../FluCoMa-SC-Mac-nightly.zip . - # working-directory: mac - - - uses: actions/download-artifact@v2 with: - name: winbuild - # path: win - # - # - name: copy docs to win - # run: mkdir -p win/FluidCorpusManipulation/HelpSource && cp -r docs/* win/FluidCorpusManipulation/HelpSource - # - # - name: compress win - # run: zip -r ../FluCoMa-SC-Windows-nightly.zip . - # working-directory: win - + name: winbuild - uses: actions/download-artifact@v2 with: - name: linuxbuild - - # path: linux - - # - name: copy docs to linux - # run: mkdir -p linux/FluidCorpusManipulation/HelpSource && cp -r docs/* linux/FluidCorpusManipulation/HelpSource - # - # - name: compress linux - # run: zip -r ../FluCoMa-SC-Linux-nightly.zip . - # working-directory: linux - + name: linuxbuild - uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 545fb917..decf7a3a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,60 +2,46 @@ name: Release on: workflow_dispatch: - inputs: - base: - description: 'Base branch to deploy core from' - required: false - default: 'main' jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: flucoma/actions/env@v4 - with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/docs@v4 - with: - target: MAKE_SC_REF - branch: ${{ github.event.inputs.base }} - - - uses: actions/upload-artifact@v2 - with: - name: docs - path: build/sc_ref - macbuild: runs-on: macos-11 steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/sc@v4 + branch: origin/main + + - name: compress archive + run: zip -r FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install - uses: actions/upload-artifact@v2 - with: - name: macbuild - path: install + with: + name: macbuild + path: install/FluCoMa-SC-Mac-nightly.zip winbuild: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/sc@v4 + branch: origin/main - name: remove pdb files run: Remove-Item install -Recurse -Include *.pdb - - uses: actions/upload-artifact@v2 + - name: compress archive + run: 7z a FluCoMa-SC-Windows-nightly.zip FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 with: name: winbuild - path: install + path: install/FluCoMa-SC-Windows-nightly.zip linuxbuild: runs-on: ubuntu-18.04 @@ -63,15 +49,19 @@ jobs: version: ${{ steps.get-version.outputs.version }} steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/sc@v4 + branch: origin/main + + - name: compress archive + run: tar -zcvf FluCoMa-SC-Linux-nightly.tar.gz FluidCorpusManipulation + working-directory: install - - uses: actions/upload-artifact@v2 - with: - name: linuxbuild - path: install + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: install/FluCoMa-SC-Linux-nightly.tar.gz - id: get-version run: echo "::set-output name=version::$(cat flucoma.version.rc)" @@ -79,51 +69,21 @@ jobs: release: runs-on: ubuntu-latest - needs: [macbuild, winbuild, linuxbuild, docs] + needs: [macbuild, winbuild, linuxbuild] - steps: - - uses: actions/download-artifact@v2 - with: - name: docs - path: docs - + steps: - uses: actions/download-artifact@v2 with: name: macbuild - path: mac - - - name: copy docs to mac - run: mkdir -p mac/FluidCorpusManipulation/HelpSource && cp -r docs/* mac/FluidCorpusManipulation/HelpSource - - - name: compress win - run: zip -r ../FluCoMa-SC-Mac.zip . - working-directory: mac - uses: actions/download-artifact@v2 with: name: winbuild - path: win - - - name: copy docs to win - run: mkdir -p win/FluidCorpusManipulation/HelpSource && cp -r docs/* win/FluidCorpusManipulation/HelpSource - - - name: compress win - run: zip -r ../FluCoMa-SC-Windows.zip . - working-directory: win - uses: actions/download-artifact@v2 with: name: linuxbuild - path: linux - - - name: copy docs to linux - run: mkdir -p linux/FluidCorpusManipulation/HelpSource && cp -r docs/* linux/FluidCorpusManipulation/HelpSource - - - name: compress linux - run: zip -r ../FluCoMa-SC-Linux.zip . - working-directory: linux - - name: package and upload uses: softprops/action-gh-release@v1 with: From 58c171ea687c20128794b00fa0c08da991c2af59 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 16 Jun 2022 10:15:57 +0100 Subject: [PATCH 50/63] interface changes in 8c --- .../1-learning examples/8c-mlp-regressor-as-dim-redux.scd | 8 +++----- test/8c-mlp-regressor-as-dim-redux.scd | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/release-packaging/Examples/dataset/1-learning examples/8c-mlp-regressor-as-dim-redux.scd b/release-packaging/Examples/dataset/1-learning examples/8c-mlp-regressor-as-dim-redux.scd index 10e8ff3a..36636014 100644 --- a/release-packaging/Examples/dataset/1-learning examples/8c-mlp-regressor-as-dim-redux.scd +++ b/release-packaging/Examples/dataset/1-learning examples/8c-mlp-regressor-as-dim-redux.scd @@ -74,8 +74,6 @@ FluidBufMelBands.process(s,~audio, features: ~melfeatures,action: {\done.postln; //prepare the normalizers and the neural net for inverse query ( -~normalView.invert = 1; -~normalizer.invert = 1; ~mlp.tapIn = 2; ~mlp.tapOut = -1; ) @@ -114,9 +112,9 @@ v.mouseMoveAction = {|view, x, y| ~kdtree.kNearest(~queryPoint, action: {|nearest| //retrieve the nearest point ~norm.getPoint(nearest, ~dpN, action: { //get the normalised 40d ~raw.getPoint(nearest, ~datapoint, action: { // get the original 40d - ~normalView.transformPoint(~queryPoint, ~dQueryPoint, action: { //denormalise the 2d coordinate to get the right range of values for the MLP + ~normalView.inverseTransformPoint(~queryPoint, ~dQueryPoint, action: { //denormalise the 2d coordinate to get the right range of values for the MLP ~mlp.predictPoint(~dQueryPoint, ~dpMLPn, action: { //predict from the middle (2d) to the normalised output (40d) - ~normalizer.transformPoint(~dpMLPn, ~dpMLP, action: { //denormalised the 40d + ~normalizer.inverseTransformPoint(~dpMLPn, ~dpMLP, action: { //denormalised the 40d ~datapoint.getn(0,40,{|x|~arrayRawN = x; //retrieve the nearest ~dpN.getn(0,40,{|x|~arrayRawNn = x; // retrieve the normalised nearest ~dpMLPn.getn(0,40,{|x|~arrayMLPn = x; //retrieve the predicted normalised 40d @@ -158,4 +156,4 @@ w.drawFunc = { }; w.refresh; w.front; -) +) \ No newline at end of file diff --git a/test/8c-mlp-regressor-as-dim-redux.scd b/test/8c-mlp-regressor-as-dim-redux.scd index 4d9ee1ff..36636014 100644 --- a/test/8c-mlp-regressor-as-dim-redux.scd +++ b/test/8c-mlp-regressor-as-dim-redux.scd @@ -74,8 +74,6 @@ FluidBufMelBands.process(s,~audio, features: ~melfeatures,action: {\done.postln; //prepare the normalizers and the neural net for inverse query ( -~normalView.invert = 1; -~normalizer.invert = 1; ~mlp.tapIn = 2; ~mlp.tapOut = -1; ) @@ -114,9 +112,9 @@ v.mouseMoveAction = {|view, x, y| ~kdtree.kNearest(~queryPoint, action: {|nearest| //retrieve the nearest point ~norm.getPoint(nearest, ~dpN, action: { //get the normalised 40d ~raw.getPoint(nearest, ~datapoint, action: { // get the original 40d - ~normalView.transformPoint(~queryPoint, ~dQueryPoint, action: { //denormalise the 2d coordinate to get the right range of values for the MLP + ~normalView.inverseTransformPoint(~queryPoint, ~dQueryPoint, action: { //denormalise the 2d coordinate to get the right range of values for the MLP ~mlp.predictPoint(~dQueryPoint, ~dpMLPn, action: { //predict from the middle (2d) to the normalised output (40d) - ~normalizer.transformPoint(~dpMLPn, ~dpMLP, action: { //denormalised the 40d + ~normalizer.inverseTransformPoint(~dpMLPn, ~dpMLP, action: { //denormalised the 40d ~datapoint.getn(0,40,{|x|~arrayRawN = x; //retrieve the nearest ~dpN.getn(0,40,{|x|~arrayRawNn = x; // retrieve the normalised nearest ~dpMLPn.getn(0,40,{|x|~arrayMLPn = x; //retrieve the predicted normalised 40d From 85e9436d827842c5d713e165389776222594aef0 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 16 Jun 2022 10:18:47 +0100 Subject: [PATCH 51/63] knearest interface change in 10a --- test/10a-weighted-MFCCs-comparison.scd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/10a-weighted-MFCCs-comparison.scd b/test/10a-weighted-MFCCs-comparison.scd index 38088b7f..db3f0a62 100644 --- a/test/10a-weighted-MFCCs-comparison.scd +++ b/test/10a-weighted-MFCCs-comparison.scd @@ -166,10 +166,10 @@ FluidBufCompose.process(s,~loader.buffer,a,(b-a),numChans: 1, destination: ~targ ~flatbuf[1].getn(0,182,{|x|~curatedWBuf = Buffer.loadCollection(s, x[[0,1,4,6,7,8,11,13].collect{|x|var y=x*13+1;(y..(y+11))}.flat].postln)}) //find its nearest neighbours -~tree.kNearest(~flatbuf[0],{|x| ~friends = x.postln;}) -~treeW.kNearest(~flatbuf[1],{|x| ~friendsW = x.postln;}) -~treeC.kNearest(~curatedBuf,{|x| ~friendsC = x.postln;}) -~treeCW.kNearest(~curatedWBuf,{|x| ~friendsCW = x.postln;}) +~tree.kNearest(~flatbuf[0],action:{|x| ~friends = x.postln;}) +~treeW.kNearest(~flatbuf[1],action:{|x| ~friendsW = x.postln;}) +~treeC.kNearest(~curatedBuf,action:{|x| ~friendsC = x.postln;}) +~treeCW.kNearest(~curatedWBuf,action:{|x| ~friendsCW = x.postln;}) // play them in a row From af7992f7052c8eeed34e18f265c12930a1715d98 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 16 Jun 2022 10:34:40 +0100 Subject: [PATCH 52/63] waveform help nmf interface change --- release-packaging/HelpSource/Classes/FluidWaveform.schelp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/HelpSource/Classes/FluidWaveform.schelp b/release-packaging/HelpSource/Classes/FluidWaveform.schelp index 71466f54..7de7f4cb 100644 --- a/release-packaging/HelpSource/Classes/FluidWaveform.schelp +++ b/release-packaging/HelpSource/Classes/FluidWaveform.schelp @@ -293,7 +293,7 @@ s.waitForBoot{ ~resynths = {Buffer(s)} ! ~n_components; s.sync; - FluidBufNMF.processBlocking(s,~audio,resynth:~resynth,activations:~activations,components:~n_components); + FluidBufNMF.processBlocking(s,~audio,resynth:~resynth,resynthMode: 1,activations:~activations,components:~n_components); ~n_components.do{ arg i; From ae3cdde10112ba8c9b04a7e9fefcc902c231de79 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Thu, 16 Jun 2022 13:22:48 +0100 Subject: [PATCH 53/63] capitalise beatRemember --- .../Examples/Guides/Decomposition Examples.scd | 6 +++--- release-packaging/Examples/Guides/NMF Overview.scd | 2 +- release-packaging/HelpSource/Classes/FluidBufNMF.schelp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/release-packaging/Examples/Guides/Decomposition Examples.scd b/release-packaging/Examples/Guides/Decomposition Examples.scd index 44c8cecc..84e06d19 100644 --- a/release-packaging/Examples/Guides/Decomposition Examples.scd +++ b/release-packaging/Examples/Guides/Decomposition Examples.scd @@ -17,7 +17,7 @@ y = { ) // isolate just sines or residual; -~song = Buffer.readChannel(s,FluidFilesPath("Tremblay-beatRemember.wav"),channels:[0]); +~song = Buffer.readChannel(s,FluidFilesPath("Tremblay-BeatRemember.wav"),channels:[0]); ( y = { @@ -37,7 +37,7 @@ y.set(\mix,0); y.set(\mix,1); // a stereo example -~song = Buffer.read(s,FluidFilesPath("Tremblay-beatRemember.wav")); +~song = Buffer.read(s,FluidFilesPath("Tremblay-BeatRemember.wav")); ( y = { @@ -85,7 +85,7 @@ FluidHPSS separates a sound into "harmonic" and "percussive" components. This ca */ //load a soundfile to play -~buf = Buffer.readChannel(s,FluidFilesPath("Tremblay-beatRemember.wav"),channels:[0]); +~buf = Buffer.readChannel(s,FluidFilesPath("Tremblay-BeatRemember.wav"),channels:[0]); // run with basic parameters (left is harmonic, right is percussive) {FluidHPSS.ar(PlayBuf.ar(1,~buf,loop:1))}.play diff --git a/release-packaging/Examples/Guides/NMF Overview.scd b/release-packaging/Examples/Guides/NMF Overview.scd index d75c22ea..8c82510b 100644 --- a/release-packaging/Examples/Guides/NMF Overview.scd +++ b/release-packaging/Examples/Guides/NMF Overview.scd @@ -59,7 +59,7 @@ Routine{ Routine{ var drums = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav")); var voice = Buffer.read(s,FluidFilesPath("Tremblay-AaS-VoiceQC-B2K-M.wav")); - var song = Buffer.read(s,FluidFilesPath("Tremblay-beatRemember.wav")); + var song = Buffer.read(s,FluidFilesPath("Tremblay-BeatRemember.wav")); s.sync; "drums through the drums bases as filters".postln; diff --git a/release-packaging/HelpSource/Classes/FluidBufNMF.schelp b/release-packaging/HelpSource/Classes/FluidBufNMF.schelp index d5fae688..3497c2b3 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNMF.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNMF.schelp @@ -425,7 +425,7 @@ FluidWaveform(featureBuffer:~bases,bounds:Rect(0,0,1200,300)); // if we play a different source through FluidNMFFilter, it will try to decompose that real-time signal according to the bases // it is given (in our case the bases from the drum loop) -~song = Buffer.readChannel(s,FluidFilesPath("Tremblay-beatRemember.wav"),channels:[0]); +~song = Buffer.readChannel(s,FluidFilesPath("Tremblay-BeatRemember.wav"),channels:[0]); ( { From 557257dc8e5bde07ca19297784236220ce12bdd6 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 16 Jun 2022 17:03:16 +0100 Subject: [PATCH 54/63] two more changes of interface --- test/12-windowed-clustered-segmentation.scd | 2 +- test/13-massive-parallelisation-example.scd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/12-windowed-clustered-segmentation.scd b/test/12-windowed-clustered-segmentation.scd index ac2b8baf..95dad07d 100644 --- a/test/12-windowed-clustered-segmentation.scd +++ b/test/12-windowed-clustered-segmentation.scd @@ -4,7 +4,7 @@ //slightly oversegment with novelty //segments should still make sense but might cut a few elements in 2 or 3 -~slicer = FluidSliceCorpus({ |src,start,num,dest| FluidBufNoveltySlice.kr(src,start,num,indices:dest, feature: 1, kernelSize: 29, threshold: 0.1, filterSize: 5, hopSize: 128, blocking: 1)}); +~slicer = FluidSliceCorpus({ |src,start,num,dest| FluidBufNoveltySlice.kr(src, start, num, indices:dest, algorithm:1, kernelSize:29, threshold:0.1, filterSize:5, hopSize:128, blocking:1)}); ~slicer.play(s, ~loader.buffer,~loader.index); //test the segmentation by looping them diff --git a/test/13-massive-parallelisation-example.scd b/test/13-massive-parallelisation-example.scd index 294a0413..e642eacf 100644 --- a/test/13-massive-parallelisation-example.scd +++ b/test/13-massive-parallelisation-example.scd @@ -297,7 +297,7 @@ FluidBufMelBands.process(s, ~inBuf, features: ~inBufMels, action: { FluidBufFlatten.process(s, ~inBufStats, destination:~inBufFlat, action: { FluidBufCompose.process(s, ~inBufFlat, numFrames: ~numMelBands, destination: ~inBufComp, action: { ~standardizer.transformPoint(~inBufComp, ~inBufStand, { - ~tree.kNearest(~inBufStand,{ |a|a.postln;~nearest = a;}) + ~tree.kNearest(~inBufStand,action:{ |a|a.postln;~nearest = a;}) }) }) }) From 131e2f5b8226692c7ed56fa4eb6965dfe7533859 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Fri, 17 Jun 2022 15:47:54 +0100 Subject: [PATCH 55/63] typo --- release-packaging/Classes/FluidPlotter.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/Classes/FluidPlotter.sc b/release-packaging/Classes/FluidPlotter.sc index d78a4745..579c538e 100644 --- a/release-packaging/Classes/FluidPlotter.sc +++ b/release-packaging/Classes/FluidPlotter.sc @@ -87,7 +87,7 @@ FluidPlotter : FluidViewer { if(dict_internal.at(identifier).notNil,{ "FluidPlotter::addPoint_ There already exists a point with identifier %. Point not added. Use setPoint_ to overwrite existing points.".format(identifier).warn; },{ - this.setPoint_(identifier,x,y,size,color); + this.setPoint_(identifier,x,y,color,size); }); } From 59174de88cc0387c2e295a1a7ad1bd9e243dc944 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Mon, 20 Jun 2022 19:30:22 +0100 Subject: [PATCH 56/63] sign binaries --- .github/workflows/nightly.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 2a3bd70e..003c6796 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -16,15 +16,23 @@ jobs: with: branch: origin/dev - - name: compress archive - run: zip -r FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation - working-directory: install - + - name: sign binaries + uses: flucoma/actions/distribution@main + with: + glob: '-e scx' + package: 'install' + output_type: 'dmg' + output: FluCoMa-SC-Mac + cert: ${{ secrets.CERT }} + certpwd: ${{ secrets.CERTPWD }} + teamid: ${{ secrets.WWDRTEAMID }} + apppwd: ${{ secrets.APPSTORECONNECTPWD }} + appusr: ${{ secrets.APPSTORECONNECTUSERNAME }} + - uses: actions/upload-artifact@v2 with: name: macbuild - path: install/FluCoMa-SC-Mac-nightly.zip - + path: install/FluCoMa-SC-Mac.dmg winbuild: runs-on: windows-latest From e16536cb15fac698d45c71a1c6518f17bcac814b Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Mon, 20 Jun 2022 23:13:57 +0100 Subject: [PATCH 57/63] add -nightly affix --- .github/workflows/nightly.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 003c6796..8baf175b 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -22,7 +22,7 @@ jobs: glob: '-e scx' package: 'install' output_type: 'dmg' - output: FluCoMa-SC-Mac + output: FluCoMa-SC-Mac-nightly cert: ${{ secrets.CERT }} certpwd: ${{ secrets.CERTPWD }} teamid: ${{ secrets.WWDRTEAMID }} @@ -32,7 +32,7 @@ jobs: - uses: actions/upload-artifact@v2 with: name: macbuild - path: install/FluCoMa-SC-Mac.dmg + path: install/FluCoMa-SC-Mac-nightly.dmg winbuild: runs-on: windows-latest From 5b05aadcaff9c5c3dd15604e17c490e705bbd62b Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Tue, 21 Jun 2022 10:08:52 +0100 Subject: [PATCH 58/63] sign releases too --- .github/workflows/nightly.yaml | 33 ++++++++++++------------ .github/workflows/release.yml | 47 ++++++++++++++++++++-------------- 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 8baf175b..ba385e3c 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -1,18 +1,17 @@ -name: Nightly Releases +name: nightly on: - workflow_dispatch: push: branches: [ dev, ci/** ] jobs: macbuild: - runs-on: macos-11 + runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v5 - - uses: flucoma/actions/sc@v5 + - uses: actions/checkout@v3 + - uses: flucoma/actions/env@main + - uses: flucoma/actions/sc@main with: branch: origin/dev @@ -29,7 +28,7 @@ jobs: apppwd: ${{ secrets.APPSTORECONNECTPWD }} appusr: ${{ secrets.APPSTORECONNECTUSERNAME }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: macbuild path: install/FluCoMa-SC-Mac-nightly.dmg @@ -37,9 +36,9 @@ jobs: winbuild: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v5 - - uses: flucoma/actions/sc@v5 + - uses: actions/checkout@v3 + - uses: flucoma/actions/env@main + - uses: flucoma/actions/sc@main with: branch: origin/dev @@ -50,25 +49,25 @@ jobs: run: 7z a FluCoMa-SC-Windows-nightly.zip FluidCorpusManipulation working-directory: install - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: winbuild path: install/FluCoMa-SC-Windows-nightly.zip linuxbuild: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v5 - - uses: flucoma/actions/sc@v5 + - uses: actions/checkout@v3 + - uses: flucoma/actions/env@main + - uses: flucoma/actions/sc@main with: branch: origin/dev - name: compress archive run: tar -zcvf FluCoMa-SC-Linux-nightly.tar.gz FluidCorpusManipulation working-directory: install - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: linuxbuild path: install/FluCoMa-SC-Linux-nightly.tar.gz @@ -102,7 +101,7 @@ jobs: with: name: FluCoMa SuperCollider Nightly Release body: "This is a nightly build of the FluCoMa SuperCollider package. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" - files: FluCoMa-SC-* + files: FluCoMa* prerelease: true tag_name: nightly draft: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e336924..c54d4d4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,33 +1,42 @@ -name: Release +name: release on: workflow_dispatch: jobs: macbuild: - runs-on: macos-11 + runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v5 - - uses: flucoma/actions/sc@v5 + - uses: actions/checkout@v3 + - uses: flucoma/actions/env@main + - uses: flucoma/actions/sc@main with: branch: origin/main - - name: compress archive - run: zip -r FluCoMa-SC-Mac.zip FluidCorpusManipulation - working-directory: install + - name: sign binaries + uses: flucoma/actions/distribution@main + with: + glob: '-e scx' + package: 'install' + output_type: 'dmg' + output: FluCoMa-SC-Mac + cert: ${{ secrets.CERT }} + certpwd: ${{ secrets.CERTPWD }} + teamid: ${{ secrets.WWDRTEAMID }} + apppwd: ${{ secrets.APPSTORECONNECTPWD }} + appusr: ${{ secrets.APPSTORECONNECTUSERNAME }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: macbuild - path: install/FluCoMa-SC-Mac.zip + path: install/FluCoMa-SC-Mac.dmg winbuild: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v5 - - uses: flucoma/actions/sc@v5 + - uses: actions/checkout@v3 + - uses: flucoma/actions/env@main + - uses: flucoma/actions/sc@main with: branch: origin/main @@ -38,19 +47,19 @@ jobs: run: 7z a FluCoMa-SC-Windows.zip FluidCorpusManipulation working-directory: install - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: winbuild path: install/FluCoMa-SC-Windows.zip linuxbuild: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest outputs: version: ${{ steps.get-version.outputs.version }} steps: - - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v5 - - uses: flucoma/actions/sc@v5 + - uses: actions/checkout@v3 + - uses: flucoma/actions/env@main + - uses: flucoma/actions/sc@main with: branch: origin/main @@ -58,7 +67,7 @@ jobs: run: tar -zcvf FluCoMa-SC-Linux.tar.gz FluidCorpusManipulation working-directory: install - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: linuxbuild path: install/FluCoMa-SC-Linux.tar.gz From a9936f2a4fb791a9a4e15eb0be9d32f9fa1ba904 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Tue, 21 Jun 2022 16:05:38 +0100 Subject: [PATCH 59/63] enforce concurrency of jobs --- .github/workflows/nightly.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index ba385e3c..a9a8d24e 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -5,6 +5,10 @@ on: push: branches: [ dev, ci/** ] +concurrency: + group: environment-${{ github.ref }} + cancel-in-progress: true + jobs: macbuild: runs-on: macos-latest From 27b39f0f5b84ca7ad5b72a640b3e395cf5b3e926 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Tue, 28 Jun 2022 13:39:35 +0100 Subject: [PATCH 60/63] UMAP kr method should not allow user to pass numDimensions --- release-packaging/Classes/FluidUMAP.sc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/release-packaging/Classes/FluidUMAP.sc b/release-packaging/Classes/FluidUMAP.sc index 878ee999..24f632c3 100644 --- a/release-packaging/Classes/FluidUMAP.sc +++ b/release-packaging/Classes/FluidUMAP.sc @@ -63,10 +63,7 @@ FluidUMAP : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer,destBuffer)); } - kr{|trig, inputBuffer,outputBuffer,numDimensions| - - numDimensions = numDimensions ? this.numDimensions; - this.numDimensions_(numDimensions); + kr{|trig, inputBuffer,outputBuffer| ^FluidUMAPQuery.kr(trig, this, From 5496cf5a6948089879c0edd9a1235d8f0d4142bc Mon Sep 17 00:00:00 2001 From: gianlucaelia Date: Wed, 29 Jun 2022 14:42:43 +0100 Subject: [PATCH 61/63] slicers: change algo/metric select to symbols (#103) * slicers: change algo/metric selection to symbols * slicers: algo/metric accept UGen --- .../Classes/FluidBufNoveltyFeature.sc | 14 +++++++ .../Classes/FluidBufNoveltySlice.sc | 24 ++++++++--- .../Classes/FluidBufOnsetFeature.sc | 14 +++++++ .../Classes/FluidBufOnsetSlice.sc | 29 +++++++++---- .../Classes/FluidNoveltyFeature.sc | 16 ++++--- .../Classes/FluidNoveltySlice.sc | 31 ++++++++++---- .../Classes/FluidOnsetFeature.sc | 8 ++++ release-packaging/Classes/FluidOnsetSlice.sc | 42 ++++++++++++++----- 8 files changed, 143 insertions(+), 35 deletions(-) diff --git a/release-packaging/Classes/FluidBufNoveltyFeature.sc b/release-packaging/Classes/FluidBufNoveltyFeature.sc index 868c37a2..1fca9ace 100644 --- a/release-packaging/Classes/FluidBufNoveltyFeature.sc +++ b/release-packaging/Classes/FluidBufNoveltyFeature.sc @@ -6,6 +6,10 @@ FluidBufNoveltyFeature : FluidBufProcessor { source = source.asUGenInput; features = features.asUGenInput; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm) ?? { + ("FluidBufNoveltySlice: % is not a recognised algorithm") + .format(algorithm).throw; + }; source.isNil.if {"FluidBufNoveltyFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufNoveltyFeature: Invalid features buffer".throw}; @@ -20,6 +24,11 @@ FluidBufNoveltyFeature : FluidBufProcessor { source = source.asUGenInput; features = features.asUGenInput; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm); + if (algorithm.isNil or: algorithm.isUGen) { + ("FluidBufNoveltySlice: % is not a recognised algorithm") + .format(algorithm).throw; + }; source.isNil.if {"FluidBufNoveltyFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufNoveltyFeature: Invalid features buffer".throw}; @@ -40,6 +49,11 @@ FluidBufNoveltyFeature : FluidBufProcessor { source.isNil.if {"FluidBufNoveltyFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufNoveltyFeature: Invalid features buffer".throw}; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm); + if (algorithm.isNil or: algorithm.isUGen) { + ("FluidBufNoveltySlice: % is not a recognised algorithm") + .format(algorithm).throw; + }; ^this.new( server, nil, [features] diff --git a/release-packaging/Classes/FluidBufNoveltySlice.sc b/release-packaging/Classes/FluidBufNoveltySlice.sc index b53820e5..82952fea 100644 --- a/release-packaging/Classes/FluidBufNoveltySlice.sc +++ b/release-packaging/Classes/FluidBufNoveltySlice.sc @@ -1,11 +1,15 @@ FluidBufNoveltySlice : FluidBufProcessor { - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, algorithm = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1 , blocking = 0| + *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, algorithm = 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1 , blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm) ?? { + ("FluidBufNoveltySlice: % is not a recognised algorithm") + .format(algorithm).throw; + }; source.isNil.if {"FluidBufNoveltySlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufNoveltySlice: Invalid features buffer".throw}; @@ -15,15 +19,20 @@ FluidBufNoveltySlice : FluidBufProcessor { } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, algorithm= 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action | - + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm); + if (algorithm.isNil or: algorithm.isUGen) { + ("FluidBufNoveltySlice: % is not a recognised algorithm") + .format(algorithm).throw; + }; source.isNil.if {"FluidBufNoveltySlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufNoveltySlice: Invalid features buffer".throw}; - + ^this.new( server, nil, [indices] ).processList( @@ -32,15 +41,20 @@ FluidBufNoveltySlice : FluidBufProcessor { } *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, algorithm= 0, kernelSize = 3, threshold = 0.5, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action | - + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm); + if (algorithm.isNil or: algorithm.isUGen) { + ("FluidBufNoveltySlice: % is not a recognised algorithm") + .format(algorithm).throw; + }; source.isNil.if {"FluidBufNoveltySlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufNoveltySlice: Invalid features buffer".throw}; - + ^this.new( server, nil, [indices] ).processList( diff --git a/release-packaging/Classes/FluidBufOnsetFeature.sc b/release-packaging/Classes/FluidBufOnsetFeature.sc index 6ea08b01..1b3235c8 100644 --- a/release-packaging/Classes/FluidBufOnsetFeature.sc +++ b/release-packaging/Classes/FluidBufOnsetFeature.sc @@ -5,6 +5,10 @@ FluidBufOnsetFeature : FluidBufProcessor { source = source.asUGenInput; features = features.asUGenInput; + metric = FluidOnsetSlice.prSelectMetric(metric) ?? { + ("FluidBufOnsetSlice: % is not a recognised metric") + .format(metric).throw; + }; source.isNil.if {"FluidBufOnsetFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufOnsetFeature: Invalid features buffer".throw}; @@ -18,6 +22,11 @@ FluidBufOnsetFeature : FluidBufProcessor { source = source.asUGenInput; features = features.asUGenInput; + metric = FluidOnsetSlice.prSelectMetric(metric); + if (metric.isNil or: metric.isUGen) { + ("FluidBufOnsetSlice: % is not a recognised metric") + .format(metric).throw; + }; source.isNil.if {"FluidBufOnsetFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufOnsetFeature: Invalid features buffer".throw}; @@ -35,6 +44,11 @@ FluidBufOnsetFeature : FluidBufProcessor { source = source.asUGenInput; features = features.asUGenInput; + metric = FluidOnsetSlice.prSelectMetric(metric); + if (metric.isNil or: metric.isUGen) { + ("FluidBufOnsetSlice: % is not a recognised metric") + .format(metric).throw; + }; source.isNil.if {"FluidBufOnsetFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufOnsetFeature: Invalid features buffer".throw}; diff --git a/release-packaging/Classes/FluidBufOnsetSlice.sc b/release-packaging/Classes/FluidBufOnsetSlice.sc index 2f9a7548..0a3f6d78 100644 --- a/release-packaging/Classes/FluidBufOnsetSlice.sc +++ b/release-packaging/Classes/FluidBufOnsetSlice.sc @@ -1,27 +1,37 @@ FluidBufOnsetSlice : FluidBufProcessor { - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| - + + *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; + metric = FluidOnsetSlice.prSelectMetric(metric) ?? { + ("FluidBufOnsetSlice: % is not a recognised metric") + .format(metric).throw; + }; source.isNil.if {"FluidBufOnsetSlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufOnsetSlice: Invalid features buffer".throw}; - + ^FluidProxyUgen.kr(\FluidBufOnsetSliceTrigger, -1, source, startFrame, numFrames, startChan, numChans, indices, metric, threshold, minSliceLength, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; + metric = FluidOnsetSlice.prSelectMetric(metric); + if (metric.isNil or: metric.isUGen) { + ("FluidBufOnsetSlice: % is not a recognised metric") + .format(metric).throw; + }; source.isNil.if {"FluidBufOnsetSlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufOnsetSlice: Invalid features buffer".throw}; - + ^this.new( server, nil, [indices] ).processList( @@ -30,15 +40,20 @@ FluidBufOnsetSlice : FluidBufProcessor { } *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - + var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source = source.asUGenInput; indices = indices.asUGenInput; + metric = FluidOnsetSlice.prSelectMetric(metric); + if (metric.isNil or: metric.isUGen) { + ("FluidBufOnsetSlice: % is not a recognised metric") + .format(metric).throw; + }; source.isNil.if {"FluidBufOnsetSlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufOnsetSlice: Invalid features buffer".throw}; - + ^this.new( server, nil, [indices] ).processList( diff --git a/release-packaging/Classes/FluidNoveltyFeature.sc b/release-packaging/Classes/FluidNoveltyFeature.sc index ddb63139..a83df30f 100644 --- a/release-packaging/Classes/FluidNoveltyFeature.sc +++ b/release-packaging/Classes/FluidNoveltyFeature.sc @@ -1,13 +1,19 @@ FluidNoveltyFeature : FluidRTUGen { *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxKernelSize, maxFilterSize; - - maxKernelSize = maxKernelSize ? kernelSize; - maxFilterSize = maxFilterSize ? filterSize; - + + maxKernelSize = maxKernelSize ? kernelSize; + maxFilterSize = maxFilterSize ? filterSize; + algorithm = FluidNoveltySlice.prSelectAlgorithm(algorithm) ?? { + ("FluidNoveltySlice: % is not a recognised algorithm").format(algorithm); + }; + ^this.multiNew('control', in.asAudioRateInput(this), algorithm, kernelSize, maxKernelSize, filterSize, maxFilterSize, windowSize, hopSize, fftSize, maxFFTSize) } - + checkInputs { + if([\scalar, \control].includes(inputs.at(1).rate).not) { + ^(": invalid algorithm"); + }; if(inputs.at(9).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; diff --git a/release-packaging/Classes/FluidNoveltySlice.sc b/release-packaging/Classes/FluidNoveltySlice.sc index 9dd78dfa..da43d54f 100644 --- a/release-packaging/Classes/FluidNoveltySlice.sc +++ b/release-packaging/Classes/FluidNoveltySlice.sc @@ -1,20 +1,35 @@ FluidNoveltySlice : FluidRTUGen { - const = 0 && (sym < algorithms.size)) { + ^sym + } { + ^nil + } + }; + ^algorithms.indexOf(sym.asSymbol) + } *ar { arg in = 0, algorithm = 0, kernelSize = 3, threshold = 0.8, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxKernelSize, maxFilterSize; - + maxKernelSize = maxKernelSize ? kernelSize; - maxFilterSize = maxFilterSize ? filterSize; - + maxFilterSize = maxFilterSize ? filterSize; + + algorithm = this.prSelectAlgorithm(algorithm) ?? { + ("FluidNoveltySlice: % is not a recognised algorithm").format(algorithm); + }; + ^this.multiNew('audio', in.asAudioRateInput(this), algorithm, kernelSize, maxKernelSize, threshold, filterSize, maxFilterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize) } checkInputs { + if([\scalar, \control].includes(inputs.at(1).rate).not) { + ^(": invalid algorithm"); + }; if(inputs.at(11).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; diff --git a/release-packaging/Classes/FluidOnsetFeature.sc b/release-packaging/Classes/FluidOnsetFeature.sc index 894b3e90..d5b7786a 100644 --- a/release-packaging/Classes/FluidOnsetFeature.sc +++ b/release-packaging/Classes/FluidOnsetFeature.sc @@ -1,8 +1,16 @@ FluidOnsetFeature : FluidRTUGen { *kr { arg in = 0, metric = 0, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + + metric = FluidOnsetSlice.prSelectMetric(metric) ?? { + ("% is not a recognised metric").format(metric); + }; + ^this.multiNew('control', in.asAudioRateInput(this), metric, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize) } checkInputs { + if([\scalar, \control].includes(inputs.at(1).rate).not) { + ^(": invalid metric"); + }; if(inputs.at(7).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; diff --git a/release-packaging/Classes/FluidOnsetSlice.sc b/release-packaging/Classes/FluidOnsetSlice.sc index 91dd2c8d..507e1286 100644 --- a/release-packaging/Classes/FluidOnsetSlice.sc +++ b/release-packaging/Classes/FluidOnsetSlice.sc @@ -1,20 +1,42 @@ FluidOnsetSlice : FluidRTUGen { - const = 0 && (sym < metrics.size)) { + ^sym + } { + ^nil + } + }; + ^metrics.indexOf(sym.asSymbol) + } *ar { arg in = 0, metric = 0, threshold = 0.5, minSliceLength = 2, filterSize = 5, frameDelta = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + + metric = this.prSelectMetric(metric) ?? { + ("% is not a recognised metric").format(metric); + }; + ^this.multiNew('audio', in.asAudioRateInput(this), metric, threshold, minSliceLength, filterSize, frameDelta, windowSize, hopSize, fftSize, maxFFTSize) } checkInputs { + if([\scalar, \control].includes(inputs.at(1).rate).not) { + ^(": invalid metric"); + }; if(inputs.at(9).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; From 0a8da0281b60060fbd2b39cae1b9c86f121e7442 Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Thu, 30 Jun 2022 12:24:57 +0100 Subject: [PATCH 62/63] FluidDataSetWr example code (#124) --- .../HelpSource/Classes/FluidDataSetWr.schelp | 92 ++++++++----------- 1 file changed, 39 insertions(+), 53 deletions(-) diff --git a/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp b/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp index ba674ab1..ef71b59c 100644 --- a/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp +++ b/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp @@ -1,7 +1,7 @@ TITLE:: FluidDataSetWr summary:: Write to FluidDataSet on the server categories:: Libraries>FluidCorpusManipulation -related:: Classes/FLuidDataSet +related:: Classes/FluidDataSet DESCRIPTION:: A UGen that adds data points with associated identifiers to a link::Classes/FluidDataSet:: Internally, this calls code::setPoint::, so IDs that already exist will be overwritten, and new IDs will be added. The actual work is done on the server's command queue, rather than the real-thread. @@ -21,10 +21,10 @@ CLASSMETHODS:: private:: *new1 METHOD:: kr -The equivalent of calling link::Classes/FluidDataSet#-addPoint::, but within a link::Classes/Synth:: +The equivalent of calling link::Classes/FluidDataSet#-setPoint::, but within a link::Classes/Synth:: ARGUMENT:: dataset -An instance of link::Classes/FluidDataSet:: or an instance's name. +An instance of link::Classes/FluidDataSet:: ARGUMENT:: idPrefix A string or symbol with a prefix for generated identifiers. @@ -67,58 +67,38 @@ s.reboot; ( ~ds.clear; OSCFunc({ - "FluidDataSetWr help: all points written".postln; - ~ds.print + "FluidDataSetWr help: all points written".postln; + ~ds.print },'/datasetwrdone').oneShot; -{ |n| - var b = LocalBuf.newFrom([0,1,2,3]); - var trig = Impulse.kr(ControlRate.ir / 8); - var idx = Stepper.kr(trig,min:-1, max:n); //we need to start at -1 to catch the first increment - 4.collect{|i| BufWr.kr([(4 * idx) + i],b,i)}; - FluidDataSetWr.kr(~ds,idNumber:idx,buf:b,trig:trig); - SendReply.kr(idx >= (n-1), '/datasetwrdone'); - FreeSelf.kr(idx >= (n-1)); -}.play(s,args:[n:100]); +{ + arg n; + var buf = LocalBuf(4); + var trig = Impulse.kr(ControlRate.ir / 8); // can't go any faster + var idx = Stepper.kr(trig,min:-1, max:n); //we need to start at -1 to catch the first increment + + FluidKrToBuf.kr((idx * 4) + [0,1,2,3],buf); + FluidDataSetWr.kr(~ds,"point-",idNumber:idx,buf:buf,trig:trig); + SendReply.kr(idx >= (n-1), '/datasetwrdone'); + FreeSelf.kr(idx >= (n-1)); +}.play(args:[\n,100]); ) +:: -//it printed with the return function - -//Again, but as fast as possible using a feedback of the trigger we are given when the writing is done -( -~ds.clear; -OSCFunc({ - "FluidDataSetWr help: all points written".postln; - ~ds.print -},'/datasetwrdone').oneShot; - -{ |n| - var b = LocalBuf.newFrom([0,1,2,3]); - var trig = LocalIn.kr(1,1); - var idx = Stepper.kr(trig,min:-1, max:n); - var wr = FluidDataSetWr.kr(~ds,idNumber:idx,buf:b,trig:trig); - 4.collect{|i| BufWr.kr([(4 * idx) + i],b,i)}; - LocalOut.kr(Done.kr(wr)); - SendReply.kr(idx >= (n-1), '/datasetwrdone'); - FreeSelf.kr(idx >= (n-1)); -}.play(s,args:[n:100]); -) +strong::incremental buffer writing - sky is the limit:: +code:: -// incremental buffer writing - sky is the limit -~ds.clear // start the entry maker, trigging twice a second ( +~ds.clear; { - var buf = LocalBuf.newFrom([0,1,2,3]); - var noise = 4.collect{WhiteNoise.kr()}; - var trig = Impulse.kr(2); - var count = PulseCount.kr(trig); - 4.do{|i| - BufWr.kr(noise[i], buf, DC.kr(i)); - }; - FluidDataSetWr.kr(~ds, idNumber: count, trig: trig, buf:buf); -}.play(s); + var buf = LocalBuf(4); + var trig = Impulse.kr(30); + var count = PulseCount.kr(trig) - 1; + FluidKrToBuf.kr(WhiteNoise.kr(1.dup(4)),buf); + FluidDataSetWr.kr(~ds,"point-",idNumber: count, trig: trig, buf:buf); +}.play; ) //print a few times @@ -132,18 +112,24 @@ OSCFunc({ ~ds.print; ~ds.clear -// circular writing +:: +strong::circular writing:: +Each time link::Classes/FluidDataSetWr:: is triggered it is like the link::Classes/FluidDataSet#-setPoint:: method so if the identifier does not exist it creates it. If the identifier does it exist then it updates it with the new values. + +By looping code::idNumber:: values, we can use a link::Classes/FluidDataSet:: similar to a "circle buffer", always have the most recent code::n:: points in it that we want. + +code:: + +// always have only the most recent 10 points in the buffer ( { var buf = LocalBuf.newFrom([0,1,2,3]); - var noise = 4.collect{WhiteNoise.kr()}; + var noise = WhiteNoise.kr(1.dup(4)) + Sweep.kr(1,1); var trig = Impulse.kr(2); var count = Stepper.kr(trig, min: 0, max: 9, resetval: -1); //0 to 9, starting at -1 to catch the first entry - 4.do{|i| - BufWr.kr(noise[i], buf, DC.kr(i)); - }; - FluidDataSetWr.kr(~ds, idNumber: count, trig: trig, buf:buf); -}.play(s); + FluidKrToBuf.kr(noise,buf); + FluidDataSetWr.kr(~ds, "point-",idNumber: count, trig: trig, buf:buf); +}.play; ) //print regularly to see a specific identifier being overwritten From 3e46bb163a9129e4b0dd96d3ca7816dfdf9c8c8f Mon Sep 17 00:00:00 2001 From: Ted Moore Date: Thu, 7 Jul 2022 12:58:19 +0100 Subject: [PATCH 63/63] typos and formatting fixes for FluidDataSetWr help file --- .../HelpSource/Classes/FluidDataSetWr.schelp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp b/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp index ef71b59c..49849bd9 100644 --- a/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp +++ b/release-packaging/HelpSource/Classes/FluidDataSetWr.schelp @@ -89,7 +89,7 @@ strong::incremental buffer writing - sky is the limit:: code:: -// start the entry maker, trigging twice a second +// start the entry maker, trigging 30 times per second ( ~ds.clear; { @@ -113,13 +113,16 @@ code:: ~ds.clear :: -strong::circular writing:: +strong::Circular Writing:: + Each time link::Classes/FluidDataSetWr:: is triggered it is like the link::Classes/FluidDataSet#-setPoint:: method so if the identifier does not exist it creates it. If the identifier does it exist then it updates it with the new values. By looping code::idNumber:: values, we can use a link::Classes/FluidDataSet:: similar to a "circle buffer", always have the most recent code::n:: points in it that we want. code:: +~ds.clear; + // always have only the most recent 10 points in the buffer ( { @@ -134,6 +137,6 @@ code:: //print regularly to see a specific identifier being overwritten ~ds.print; -~ds.clear +~ds.clear; ::