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 upnix
parent
4398cfe4a1
commit
9cbd7d5e39
@ -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
|
||||
@ -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;
|
||||
)
|
||||
@ -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
|
||||
@ -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
|
||||
);
|
||||
@ -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
|
||||
);
|
||||
|
||||
@ -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
|
||||
);
|
||||
|
||||
@ -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
|
||||
@ -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)
|
||||
@ -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)
|
||||
@ -1,12 +0,0 @@
|
||||
|
||||
#include <clients/nrt/NMFCrossClient.hpp>
|
||||
#include <FluidSCWrapper.hpp>
|
||||
|
||||
static InterfaceTable *ft;
|
||||
|
||||
PluginLoad(OfflineFluidDecompositionUGens)
|
||||
{
|
||||
ft = inTable;
|
||||
using namespace fluid::client;
|
||||
makeSCWrapper<NRTNMFCrossClient>("FluidBufNMFCross", ft);
|
||||
}
|
||||
@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue