FluidStats UGen first try

nix
Owen Green 4 years ago
parent 120dd3e722
commit 0156942315

@ -0,0 +1,51 @@
FluidStats : MultiOutUGen {
var <channels;
*kr { arg inputs;
// ^super.new.rate_('control').inputs_(inputs.asArray++0).initOutputs(inputs.asArray.size);
^this.new1('control',inputs);
}
init {arg ...theInputs;
inputs = theInputs ++ 0;
^this.initOutputs(inputs.asArray.size - 1,rate);
}
checkInputs {
/* if(inputs.any.rate != 'control') {
^"input array input is not control rate";
};*/
this.specialIndex = (inputs.size - 2).min(0);
this.specialIndex.postln;
^this.checkValidInputs;
}
initOutputs{|numChans,rate|
if(numChans.isNil or: {numChans < 1})
{
Error("No input channels").throw
};
channels = Array.fill(numChans * 2, { |i|
// Array.fill(numChans,{ |j|
OutputProxy('control',this,i);
});
// });
^channels;
}
// synthIndex_ { arg index;
// synthIndex = index;
// channels.do{
// arg outputGroup;
// outputGroup.do{
// arg output;
// output.synthIndex_(index);
// }
// }
// }
numOutputs { ^(channels.size); }
}

@ -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).
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/rt/RunningStatsClient.hpp>
#include <FluidSCWrapper.hpp>
static InterfaceTable *ft;
PluginLoad(FluidStatsUGen)
{
ft = inTable;
using namespace fluid::client;
makeSCWrapper<RunningStatsClient>("FluidStats", ft);
}
Loading…
Cancel
Save