aadding FluidBufSpectralSHape
parent
31ebbf68c3
commit
2798bcd1d7
@ -0,0 +1,24 @@
|
||||
FluidBufSpectralShape{
|
||||
*process { arg server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, winSize = 1024, hopSize = -1, fftSize = -1, action;
|
||||
|
||||
var maxFFTSize = if (fftSize == -1) {winSize.nextPowerOfTwo} {fftSize};
|
||||
|
||||
source = source.asUGenInput;
|
||||
features = features.asUGenInput;
|
||||
|
||||
source.isNil.if {"FluidBufSpectralShape: Invalid source buffer".throw};
|
||||
features.isNil.if {"FluidBufSpectralShape: Invalid features buffer".throw};
|
||||
|
||||
server = server ? Server.default;
|
||||
|
||||
//NB For wrapped versions of NRT classes, we set the params for maxima to
|
||||
//whatever has been passed in language-side (e.g maxFFTSize still exists as a parameter for the server plugin, but makes less sense here: it just needs to be set to a legal value)
|
||||
|
||||
forkIfNeeded{
|
||||
server.sendMsg(\cmd, \BufSpectralShape, source, startFrame, numFrames, startChan, numChans, features, winSize, hopSize, fftSize, maxFFTSize);
|
||||
server.sync;
|
||||
features = server.cachedBufferAt(features); features.updateInfo; server.sync;
|
||||
action.value(features);
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -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