Add FluidBufScale and FluidBufThresh

nix
Owen Green 5 years ago
parent 63e528bc9d
commit 69b319d1d1

@ -0,0 +1,31 @@
FluidBufScale : UGen {
*new1 { |rate, source, destination, inlo, inhi, outlo, outhi, trig = 1, blocking|
source = source.asUGenInput;
destination = destination.asUGenInput;
source.isNil.if {"FluidBufScale: Invalid source buffer".throw};
destination.isNil.if {"FluidBufScale: Invalid destination buffer".throw};
^super.new1(rate, source, destination, inlo, inhi, outlo, outhi, trig, blocking);
}
*kr { |source, destination, inlo = 0 , inhi = 1, outlo = 0, outhi = 1, trig = 1, blocking = 1|
^this.new1('control', source, destination, inlo, inhi, outlo, outhi, trig, blocking);
}
*process { |server, source, destination, inlo = 0 , inhi = 1, outlo = 0, outhi = 1, action|
^FluidNRTProcess.new(
server, this, action, [destination], blocking:1
).process(
source, destination, inlo, inhi, outlo, outhi
);
}
*processBlocking { |server, source, destination, inlo = 0 , inhi = 1, outlo = 0 , outhi = 1, action|
^process(
source, destination, inlo, inhi, outlo, outhi
);
}
}

@ -0,0 +1,31 @@
FluidBufThresh : UGen {
*new1 { |rate, source, destination, thresh = 0, trig = 1, blocking|
source = source.asUGenInput;
destination = destination.asUGenInput;
source.isNil.if {"FluidBufThresh: Invalid source buffer".throw};
destination.isNil.if {"FluidBufThresh: Invalid destination buffer".throw};
^super.new1(rate, source, destination, thresh, trig, blocking);
}
*kr { |source, destination, thresh = 0, trig = 1, blocking = 1|
^this.new1('control', source, destination, thresh, trig, blocking);
}
*process { |server, source, destination, thresh = 0, action|
^FluidNRTProcess.new(
server, this, action, [destination], blocking:1
).process(
source, destination, thresh
);
}
*processBlocking { |server, source, destination, thresh = 0, action|
^process(
source, destination, thresh
);
}
}

@ -0,0 +1,21 @@
# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
# Copyright 2017-2019 University of Huddersfield.
# Licensed under the BSD-3 License.
# See license.md file in the project root for full license information.
# This project has received funding from the European Research Council (ERC)
# under the European Unions Horizon 2020 research and innovation programme
# (grant agreement No 725899).
cmake_minimum_required(VERSION 3.11)
get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE)
message("Configuring ${PLUGIN}")
set(FILENAME ${PLUGIN}.cpp)
add_library(
${PLUGIN}
MODULE
${FILENAME}
)
include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake)

@ -0,0 +1,22 @@
/*
Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
Copyright 2017-2019 University of Huddersfield.
Licensed under the BSD-3 License.
See license.md file in the project root for full license information.
This project has received funding from the European Research Council (ERC)
under the European Unions Horizon 2020 research and innovation programme
(grant agreement No 725899).
*/
#include <clients/nrt/BufScaleClient.hpp>
#include <FluidSCWrapper.hpp>
static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable;
using namespace fluid::client;
makeSCWrapper<NRTThreadedBufferScaleClient>("FluidBufScale", ft);
}

@ -0,0 +1,21 @@
# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
# Copyright 2017-2019 University of Huddersfield.
# Licensed under the BSD-3 License.
# See license.md file in the project root for full license information.
# This project has received funding from the European Research Council (ERC)
# under the European Unions Horizon 2020 research and innovation programme
# (grant agreement No 725899).
cmake_minimum_required(VERSION 3.11)
get_filename_component(PLUGIN ${CMAKE_CURRENT_LIST_DIR} NAME_WE)
message("Configuring ${PLUGIN}")
set(FILENAME ${PLUGIN}.cpp)
add_library(
${PLUGIN}
MODULE
${FILENAME}
)
include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake)

@ -0,0 +1,22 @@
/*
Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/)
Copyright 2017-2019 University of Huddersfield.
Licensed under the BSD-3 License.
See license.md file in the project root for full license information.
This project has received funding from the European Research Council (ERC)
under the European Unions Horizon 2020 research and innovation programme
(grant agreement No 725899).
*/
#include <clients/nrt/BufThreshClient.hpp>
#include <FluidSCWrapper.hpp>
static InterfaceTable *ft;
PluginLoad(OfflineFluidDecompositionUGens)
{
ft = inTable;
using namespace fluid::client;
makeSCWrapper<NRTThreadedBufferThreshClient>("FluidBufThresh", ft);
}
Loading…
Cancel
Save