Add NMFCross
parent
deb785f4e6
commit
718f8b5bc6
@ -0,0 +1,34 @@
|
||||
FluidBufNMFCross : UGen{
|
||||
|
||||
*new1 { |rate, source, target, output , timeSparsity = 10, polyphony = 7, iterations = 50, windowSize = 1024, hopSize = -1, fftSize = -1, doneAction = 0, blocking = 0|
|
||||
|
||||
source = source.asUGenInput;
|
||||
target = target.asUGenInput;
|
||||
output = output.asUGenInput;
|
||||
source.isNil.if {"FluidBufNMFCross: Invalid source buffer".throw};
|
||||
target.isNil.if {"FluidBufNMFCross: Invalid target buffer".throw};
|
||||
output.isNil.if {"FluidBufNMFCross: Invalid output buffer".throw};
|
||||
|
||||
^super.new1(rate, source, target, output, timeSparsity, polyphony, iterations, windowSize, hopSize, fftSize, doneAction, blocking);
|
||||
}
|
||||
|
||||
*kr { |source, target, output , timeSparsity = 10, polyphony = 7, iterations = 50, windowSize = 1024, hopSize = -1, fftSize = -1, doneAction = 0|
|
||||
^this.multiNew(\control, source, target, output, timeSparsity, polyphony, iterations, windowSize, hopSize, fftSize, doneAction);
|
||||
}
|
||||
|
||||
*process { |server, source, target, output , timeSparsity = 10, polyphony = 7, iterations = 50, windowSize = 1024, hopSize = -1, fftSize = -1, action|
|
||||
^FluidNRTProcess.new(
|
||||
server, this, action, [output].select{|x| x!= -1}
|
||||
).process(
|
||||
source, target, output, timeSparsity, polyphony, iterations, windowSize, hopSize, fftSize
|
||||
);
|
||||
}
|
||||
|
||||
*processBlocking { |server, source, target, output , timeSparsity = 10, polyphony = 7, iterations = 50, windowSize = 1024, hopSize = -1, fftSize = -1, action|
|
||||
^FluidNRTProcess.new(
|
||||
server, this, action, [output].select{|x| x!= -1}, blocking: 1
|
||||
).process(
|
||||
source, target, output, timeSparsity, polyphony, iterations, windowSize, hopSize, fftSize
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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)
|
||||
@ -0,0 +1,12 @@
|
||||
|
||||
#include <clients/nrt/NMFCrossClient.hpp>
|
||||
#include <FluidSCWrapper.hpp>
|
||||
|
||||
static InterfaceTable *ft;
|
||||
|
||||
PluginLoad(OfflineFluidDecompositionUGens)
|
||||
{
|
||||
ft = inTable;
|
||||
using namespace fluid::client;
|
||||
makeSCWrapper<NRTNMFCrossClient>("FluidBufNMFCross", ft);
|
||||
}
|
||||
Loading…
Reference in New Issue