Merge branch 'pre-production' into production

nix
Pierre Alexandre Tremblay 12 months ago
commit 25b1383749

@ -32,7 +32,7 @@ jobs:
apppwd: ${{ secrets.APPSTORECONNECTPWD }}
appusr: ${{ secrets.APPSTORECONNECTUSERNAME }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.6
with:
name: macbuild
path: install/FluCoMa-SC-Mac-nightly.dmg
@ -53,7 +53,7 @@ jobs:
run: 7z a FluCoMa-SC-Windows-nightly.zip FluidCorpusManipulation
working-directory: install
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.6
with:
name: winbuild
path: install/FluCoMa-SC-Windows-nightly.zip
@ -71,7 +71,7 @@ jobs:
- name: compress archive
run: tar -zcvf FluCoMa-SC-Linux-nightly.tar.gz FluidCorpusManipulation
working-directory: install
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.6
with:
name: linuxbuild
path: install/FluCoMa-SC-Linux-nightly.tar.gz
@ -81,15 +81,15 @@ jobs:
needs: [macbuild, winbuild, linuxbuild]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: macbuild
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: winbuild
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: linuxbuild

@ -26,7 +26,7 @@ jobs:
apppwd: ${{ secrets.APPSTORECONNECTPWD }}
appusr: ${{ secrets.APPSTORECONNECTUSERNAME }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.6
with:
name: macbuild
path: install/FluCoMa-SC-Mac.dmg
@ -47,7 +47,7 @@ jobs:
run: 7z a FluCoMa-SC-Windows.zip FluidCorpusManipulation
working-directory: install
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.6
with:
name: winbuild
path: install/FluCoMa-SC-Windows.zip
@ -67,7 +67,7 @@ jobs:
run: tar -zcvf FluCoMa-SC-Linux.tar.gz FluidCorpusManipulation
working-directory: install
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.3.6
with:
name: linuxbuild
path: install/FluCoMa-SC-Linux.tar.gz
@ -81,15 +81,15 @@ jobs:
needs: [macbuild, winbuild, linuxbuild]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: macbuild
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: winbuild
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.7
with:
name: linuxbuild

@ -27,7 +27,7 @@ set(FLUID_PATH "" CACHE PATH "Optional path to the Fluid Decomposition repo")
if (APPLE)
set(CMAKE_XCODE_GENERATE_SCHEME ON)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" 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++")
endif()

@ -55,13 +55,13 @@ FluidDataSetQuery : FluidDataObject {
this.prSendMsg(this.clearMsg);
}
limitMsg{|rows|
^this.prMakeMsg(\limit,id,rows);
limitMsg{|points|
^this.prMakeMsg(\limit,id,points);
}
limit{|rows, action|
limit{|points, action|
actions[\limit] = [nil,action];
this.prSendMsg(this.limitMsg(rows));
this.prSendMsg(this.limitMsg(points));
}
transformMsg{|sourceDataSet, destDataSet|

@ -117,6 +117,7 @@ t = Main.elapsedTime;
});
});
)
~curator.transform(~ds,~curated)
~curator.transform(~dsW,~curatedW)

@ -192,18 +192,17 @@ s.boot;
// always be a Symbol)
~ds.dump({
arg dict;
defer{
// dict.at("data").postln;
~fp = FluidPlotter(bounds:Rect(200,200,600,600),dict:dict,mouseMoveAction:{
arg view, x, y, modifiers;
// [x,y].postln;
[x,y].postln;
~xybuf.setn(0,[x,y]);
~kdtree.kNearest(~xybuf,{
~kdtree.kNearest(~xybuf, 1, {
arg nearest;
nearest.postln;
view.highlight_(nearest);
});
// [view, x, y, modifiers].postln;
// "".postln;
});
});
}});
)

@ -1,34 +1,30 @@
(
// og test
s.waitForBoot{
Task{
var buf = Buffer.read(s,"/Users/macprocomputer/Desktop/_flucoma/code/flucoma-core-src/AudioFiles/Nicol-LoopE-M.wav");
var buf = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));
var slicepoints = Buffer(s);
FluidBufAmpSlice.process(s,buf,indices:slicepoints,fastRampUp:10,fastRampDown:2205,slowRampUp:4410,slowRampDown:4410,onThreshold:10,offThreshold:5,floor:-40,minSliceLength:4410,highPassFreq:20,action:{
FluidWaveform(buf,slicepoints,bounds:Rect(0,0,1600,400)).front;
defer{FluidWaveform(buf,slicepoints,bounds:Rect(0,0,1600,400)).front};
});
}.play(AppClock);
}
)
(
(
// embed it in a different window
s.waitForBoot{
var buf = Buffer.read(s,"/Users/macprocomputer/Desktop/_flucoma/code/flucoma-core-src/AudioFiles/Nicol-LoopE-M.wav");
var buf = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));
var slicepoints = Buffer(s);
FluidBufAmpSlice.process(s,buf,indices:slicepoints,fastRampUp:10,fastRampDown:2205,slowRampUp:4410,slowRampDown:4410,onThreshold:10,offThreshold:5,floor:-40,minSliceLength:4410,highPassFreq:20,action:{
fork({
defer{
~win = Window("test",Rect(0,0,1600,400));
FluidWaveform(buf,slicepoints,bounds:Rect(100,100,1400,200),parent:~win).front;
},AppClock);
FluidWaveform(buf,slicepoints,bounds:Rect(100,100,1400,200),parent:~win);
~win.front;
};
});
}
)
@ -78,6 +74,8 @@ s.waitForBoot{
~pitch_analysis = Buffer(s);
FluidBufPitch.processBlocking(s,~audio,features:~pitch_analysis);
s.sync;
~fw = FluidWaveform(bounds:Rect(100,100,1200,300));
~fw.addImageLayer(~mels,1,1);
@ -111,7 +109,7 @@ s.waitForBoot{
s.sync;
~fw = FluidWaveform(~audio,~indices,~pitch_analysis,imageBuffer:~mels,bounds:Rect(100,100,1200,300),imageColorScaling:1,imageColorScheme:1).front;
~fw = FluidWaveform(~audio,~indices,~pitch_analysis,imageBuffer:~mels,bounds:Rect(100,100,1200,300),imageColorScaling:1,imageColorScheme:1);
}
)
@ -132,11 +130,11 @@ s.waitForBoot{
s.sync;
~fw = FluidWaveform(~audio,~indices,~pitch_analysis,bounds:Rect(100,100,1200,300),imageColorScaling:1,imageColorScheme:1).front;
~fw = FluidWaveform(~audio,~indices,~pitch_analysis,bounds:Rect(100,100,1200,300),imageColorScaling:1,imageColorScheme:1);
}
)
// adding layers one at a time kinda test
(
s.waitForBoot{
// do some analysis
@ -163,25 +161,26 @@ s.waitForBoot{
)
(
// plot most of it, but then...
~fw = FluidWaveform(bounds:Rect(100,100,1200,300));
// plot some of it, but then...
~fw = FluidWaveform(bounds:Rect(100,450,1200,300));
~fw.addImageLayer(~mels,2,imageColorScaling:1);
~fw.addAudioLayer(~audio,Color(1,1,1,0.5));
~fw.addIndicesLayer(~indices,~audio,Color.black);
~fw.front;
)
// add one more
~fw.addFeaturesLayer(~pitch_analysis,[Color.cyan,Color.yellow]).front;
// add one feature at a time
~fw.addAudioLayer(~audio,Color(1,1,1,0.5)).refresh;
~fw.addIndicesLayer(~indices,~audio,Color.black).refresh;
~fw.addFeaturesLayer(~pitch_analysis,[Color.cyan,Color.yellow]).refresh;
// check how many layers
~fw.layers
(
// plot differen components with different colors
s.waitForBoot{
Routine{
~audio = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));
// ~audio = Buffer.read(s,FluidFilesPath("Tremblay-ASWINE-ScratchySynth-M.wav"));
~resynth = Buffer(s);
~n_components = 3;
~resynths = {Buffer(s)} ! ~n_components;
@ -196,7 +195,9 @@ s.waitForBoot{
~hopSize = 256;
s.sync;
FluidBufNMF.processBlocking(s,~audio,resynth:~resynth,activations:~activations,components:~n_components);
FluidBufNMF.processBlocking(s,~audio,resynth:~resynth,activations:~activations,components:~n_components,resynthMode: 1);
2.do{
arg i;
FluidBufHPSS.processBlocking(s,~audio,harmonic:~harm[i],percussive:~perc[i],maskingMode:i,harmFilterSize:51,percFilterSize:91);
@ -220,20 +221,14 @@ s.waitForBoot{
~colors = FluidViewer.createCatColors.collect{
arg color;
// color.alpha_(0.4);
color;
};
s.sync;
// ~resynths.postln;
defer{
~melsfw = FluidWaveform(bounds:Rect(0,0,1600,400));
// ~n_components.do{
// arg i;
// ~fw.addAudioLayer(~resynths[i],~colors[i]);
// };
~n_components.do{
arg i;
~melsfw.addImageLayer(~mels[i],~colors[i],1,1);
@ -246,9 +241,10 @@ s.waitForBoot{
~binaryfw.addImageLayer(~harmmels[1],~colors[1],1);
~binaryfw.front;
~softfw = FluidWaveform(bounds:Rect(0,0,1600,400));
~softfw = FluidWaveform(bounds:Rect(0,800,1600,400));
~softfw.addImageLayer(~percmels[0],~colors[0],1);
~softfw.addImageLayer(~harmmels[0],~colors[1],1);
~softfw.front;
}
};
}.play;
)

@ -7,15 +7,15 @@ fork{
[(i/2).asInteger,Array.fill(5,{rrand(-1.0,1.0)})]
}).flatten)
]);
// ~dict.at("data").at(0).postln;
~ds = FluidDataSet(s).load(~dict);
~pca = FluidPCA(s,5);
~pca.fit(~ds);
b = Buffer.alloc(s,5);
e = 5.collect{rrand(-1.0,1.0)}.postln;
s.sync;
b.setn(0,Array.fill(5,{rrand(-1.0,1.0)}).postln);
// ~ds.getPoint(0,b);
b.setn(0,e);
c = Buffer.alloc(s,5);
d = Buffer();
}
)
@ -30,11 +30,12 @@ c.loadToFloatArray(action:{
});
)
~pca.inverseTransformPoint(c,b);
~pca.inverseTransformPoint(c,d);
(
b.loadToFloatArray(action:{
d.loadToFloatArray(action:{
arg fa;
fa.postln;
(fa - e).postln;
});
)

@ -1,101 +0,0 @@
TestFluidCorpusManipulationServer : UnitTest
{
var waitForCounts, countsListener;
setUp{
waitForCounts = Condition.new(false);
countsListener = { |s,changed|
if(changed == \counts) {
waitForCounts.test = true;
waitForCounts.signal;
}
};
Server.default.addDependant(countsListener);
}
tearDown{
Server.default.removeDependant(countsListener);
Server.default.quit;
}
test_DataSetPersistence{
var foo, bar, tree, testPoint;
//No server on? You get nothing
this.assertEquals(nil,FluidDataSet(Server.default,\foo));
this.bootServer(Server.default);
// while {Server.default.serverRunning.not}{0.2.wait};
waitForCounts.test = false;
Server.default.doWhenBooted{foo=FluidDataSet(Server.default,\foo)};
waitForCounts.wait;
this.assertEquals(Server.default.numSynths,1,"Dataset: One Synth present after deferred boot");
waitForCounts.test = false;
foo.free;
waitForCounts.wait;
this.assertEquals(Server.default.numSynths,0,"Dataset: No synth present via cretation after free");
foo=FluidDataSet(Server.default,\foo);
//Uniqueness test (difficult to run with previous instance of foo, because
//UnitTest.bootServer messes with Server alloctors and screws up the ID cache
this.assertException({
bar = FluidDataSet(Server.default,\foo);
},FluidDataSetExistsError,"DataSetDuplicateError on reused name", onFailure:{
"Exception fail".postln;
});
waitForCounts.test = false;
bar = FluidDataSet(Server.default,\bar);
waitForCounts.wait;
this.assertEquals(Server.default.numSynths,2,"Dataset: Two Synths present after new valid Dataset added");
testPoint = Buffer.alloc(Server.default,8);
Server.default.sync;
testPoint.setn(0,[1,2,3,4,5,6,7,8]);
Server.default.sync;
foo.addPoint(\one,testPoint);
Server.default.sync;
foo.size({|size|
this.assertEquals(size,1,"Dataset size is 1");
});
Server.default.sync;
foo.cols({|cols|
this.assertEquals(cols,8,"Dataset cols is 8");
});
Server.default.sync;
waitForCounts.test = false;
tree = FluidKDTree(Server.default);
waitForCounts.wait;
this.assert(tree.synth.notNil,"Tree should have a valid synth");
this.assertEquals(Server.default.numSynths,3,"Dataset: Three Synths remain after cmd-.");
tree.fit(foo);
Server.default.sync;
tree.cols({|cols|
this.assertEquals(cols,8,"KDTree correct dims after fit")
});
Server.default.sync;
//Test cmd-period resistance
waitForCounts.test = false;
Server.default.freeAll;
Server.default.sync;
Server.default.sync;
waitForCounts.wait;
this.assertEquals(Server.default.numSynths,3,"Dataset: Three Synths remain after cmd-.");
foo.size({|size|
this.assertEquals(size,1,"Dataset size is still 1 after Cmd-.");
});
Server.default.sync;
foo.cols({|cols|
this.assertEquals(cols,8,"Dataset cols is still 8 after Cmd-.");
});
Server.default.sync;
tree.cols({|cols| this.assertEquals(cols,8,"KDTree correct dims after Cmd-.")});
Server.default.sync;
}
}

@ -1,72 +0,0 @@
(
s.waitForBoot{
//var audio = Buffer.readChannel(s,FluidFilesPath("Tremblay-CEL-GlitchyMusicBoxMelo.wav"),channels:[0]);
// var audio = Buffer.readChannel(s,FluidFilesPath("Nicol-LoopE-M.wav"),channels:[0]);
var audio = Buffer.readChannel(s,FluidFilesPath("Harker-DS-TenOboeMultiphonics-M.wav"),channels:[0]);
var window = Window(bounds:Rect(0,0,1600,400));
var mels = Buffer(s);
var mags = Buffer(s);
var chroma = Buffer(s);
var mfccs = Buffer(s);
var addLayer = {
arg win, imageBuffer, color, imageAlpha, colorScaling;
imageBuffer.loadToFloatArray(action:{
arg vals;
fork({
var colors = CSVFileReader.readInterpret(FluidFilesPath("../color-schemes/%.csv".format(color))).collect{
arg row;
Color.fromArray(row);
};
var img = Image(imageBuffer.numFrames,imageBuffer.numChannels);
colorScaling.switch(
0,{
var minItem = vals.minItem;
vals = (vals - minItem) / (vals.maxItem - minItem);
vals = (vals * 255).asInteger;
},
1,{
vals = (vals + 1e-6).log;
vals = vals.linlin(vals.minItem,vals.maxItem,0.0,255.0).asInteger;
// vals.postln;
},
{
"% colorScaling argument % is invalid.".format(thisMethod,colorScaling).warn;
}
);
vals.do{
arg val, index;
/* img.postln;
index.postln;
val.postln;*/
img.setColor(colors[val], index.div(imageBuffer.numChannels), imageBuffer.numChannels - 1 - index.mod(imageBuffer.numChannels));
};
UserView(win,Rect(0,0,win.bounds.width,win.bounds.height))
.drawFunc_{
img.drawInRect(Rect(0,0,win.bounds.width,win.bounds.height),fraction:imageAlpha);
};
},AppClock)
});
};
FluidBufMelBands.processBlocking(s,audio,features:mels);
FluidBufSTFT.processBlocking(s,audio,magnitude:mags);
FluidBufChroma.processBlocking(s,audio,features:chroma);
FluidBufMFCC.processBlocking(s,audio,features:mfccs);
s.sync;
"analysis done".postln;
// addLayer.(window,imageBuffer:mags,color:"CET-L02",imageAlpha:0.7,colorScaling:1);
addLayer.(window,imageBuffer:mels,color:"CET-L02",imageAlpha:1,colorScaling:1);
// addLayer.(window,imageBuffer:chroma,color:"CET-L16",imageAlpha:0.5,colorScaling:1);
addLayer.(window,imageBuffer:mfccs,color:"CET-L16",imageAlpha:0.3,colorScaling:0);
window.front;
};
)
Loading…
Cancel
Save