Real time and non real time transient modelling segmentation
parent
9bcfa3199b
commit
37876f09ee
@ -0,0 +1,13 @@
|
||||
FluidBufTransientSlice{
|
||||
*process { arg server, src, offsetframes = 0, numframes = -1, offsetchans = 0, numchans = -1, transbuf, order = 200, blocksize = 2048, padding = 1024, skew = 0, threshfwd = 3, threshback = 1.1, windowsize = 14, debounce = 25;
|
||||
|
||||
server = server ? Server.default
|
||||
;if(src.bufnum.isNil) {Error("Invalid Buffer").format(thisMethod.name, this.class.name).throw};
|
||||
|
||||
server.sendMsg(\cmd, \BufTransientSlice, src.bufnum, offsetframes, numframes, offsetchans, numchans,
|
||||
if( transbuf.isNil, -1, {transbuf.bufnum}), order, blocksize, padding, skew, threshfwd, threshback, windowsize, debounce);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
s.reboot
|
||||
b = Buffer.read(s,"/Users/owen/Desktop/denoise_stn/sources/01-mix.wav",0,44100);
|
||||
c = Buffer.new
|
||||
FluidBufTransientSlice.process(s,b,0,-1,0,-1,c,20,1024,1024,0,3,1.1,14,25)
|
||||
//Num frames => num transients, values = indices (in samps)
|
||||
c.query
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
s.reboot
|
||||
////////////////////////////
|
||||
// test for efficiency
|
||||
|
||||
(
|
||||
b = Buffer.read(s,"/Users/pa/Documents/documents@hudd/research/projects/fluid corpus navigation/research/fluid_decomposition/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav");
|
||||
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, 44100, 44100, 0, 0, c.bufnum, d.bufnum, 100, 512,256,1,2,1,12,20);
|
||||
s.sync;
|
||||
(Main.elapsedTime - t).postln;
|
||||
}.play
|
||||
);
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
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)
|
||||
Loading…
Reference in New Issue