diff --git a/release-packaging/Classes/FluidAudioTransport.sc b/release-packaging/Classes/FluidAudioTransport.sc index 3f26c36..ce46568 100644 --- a/release-packaging/Classes/FluidAudioTransport.sc +++ b/release-packaging/Classes/FluidAudioTransport.sc @@ -7,7 +7,7 @@ FluidAudioTransport : FluidRTUGen { // ^this.initOutputs(1,rate); } - *ar { arg in = 0, in2 = 0 , interpolation=0.0, bandwidth=255,windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput, in2, interpolation, bandwidth, windowSize, hopSize, fftSize, maxFFTSize) + *ar { arg in = 0, in2 = 0, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + ^this.multiNew('audio', in.asAudioRateInput, in2, interpolation, windowSize, hopSize, fftSize, maxFFTSize) } -} \ No newline at end of file +} diff --git a/release-packaging/Classes/FluidBufAudioTransport.sc b/release-packaging/Classes/FluidBufAudioTransport.sc index 52a8182..5850a0c 100644 --- a/release-packaging/Classes/FluidBufAudioTransport.sc +++ b/release-packaging/Classes/FluidBufAudioTransport.sc @@ -4,7 +4,7 @@ FluidBufAudioTransport : FluidBufProcessor { ^\FluidBufAudioTransp } - *kr { |source1, startFrame1 = 0, numFrames1 = -1, startChan1 = 0, numChans1 = -1, source2, startFrame2 = 0, numFrames2 = -1, startChan2 = 0, numChans2 = -1, destination, interpolation=0.0, bandwidth=255, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| + *kr { |source1, startFrame1 = 0, numFrames1 = -1, startChan1 = 0, numChans1 = -1, source2, startFrame2 = 0, numFrames2 = -1, startChan2 = 0, numChans2 = -1, destination, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source1.isNil.if {"FluidAudioTransport: Invalid source 1 buffer".throw}; @@ -16,11 +16,11 @@ FluidBufAudioTransport : FluidBufProcessor { destination = destination.asUGenInput; - ^FluidProxyUgen.kr(this.objectClassName++\Trigger,-1, source1, startFrame1, numFrames1, startChan1, numChans1, source2, startFrame1, numFrames1, startChan2, numChans2, destination, interpolation, bandwidth, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^FluidProxyUgen.kr(this.objectClassName++\Trigger,-1, source1, startFrame1, numFrames1, startChan1, numChans1, source2, startFrame1, numFrames1, startChan2, numChans2, destination, interpolation, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } - *process { |server, source1, startFrame1 = 0, numFrames1 = -1, startChan1 = 0, numChans1 = -1, source2, startFrame2 = 0, numFrames2 = -1, startChan2 = 0, numChans2 = -1, destination, interpolation=0.0, bandwidth=255, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| + *process { |server, source1, startFrame1 = 0, numFrames1 = -1, startChan1 = 0, numChans1 = -1, source2, startFrame2 = 0, numFrames2 = -1, startChan2 = 0, numChans2 = -1, destination, interpolation=0.0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source1.isNil.if {"FluidAudioTransport: Invalid source 1 buffer".throw}; @@ -34,11 +34,11 @@ FluidBufAudioTransport : FluidBufProcessor { ^this.new( server, nil, [destination] ).processList( - [source1, startFrame1, numFrames1, startChan1, numChans1, source2, startFrame2, numFrames2, startChan2, numChans2, destination, interpolation, bandwidth, windowSize, hopSize, fftSize,maxFFTSize,0], freeWhenDone, action + [source1, startFrame1, numFrames1, startChan1, numChans1, source2, startFrame2, numFrames2, startChan2, numChans2, destination, interpolation, windowSize, hopSize, fftSize,maxFFTSize,0], freeWhenDone, action ) } - *processBlocking { |server, source1, startFrame1 = 0, numFrames1 = -1, startChan1 = 0, numChans1 = -1, source2, startFrame2 = 0, numFrames2 = -1, startChan2 = 0, numChans2 = -1, destination, interpolation=0.0, bandwidth=255, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| + *processBlocking { |server, source1, startFrame1 = 0, numFrames1 = -1, startChan1 = 0, numChans1 = -1, source2, startFrame2 = 0, numFrames2 = -1, startChan2 = 0, numChans2 = -1, destination, interpolation=0.0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; source1.isNil.if {"FluidAudioTransport: Invalid source 1 buffer".throw}; @@ -52,7 +52,7 @@ FluidBufAudioTransport : FluidBufProcessor { ^this.new( server, nil, [destination] ).processList( - [source1, startFrame1, numFrames1, startChan1, numChans1, source2, startFrame2, numFrames2, startChan2, numChans2, destination, interpolation, bandwidth, windowSize, hopSize, fftSize,maxFFTSize,1], freeWhenDone, action + [source1, startFrame1, numFrames1, startChan1, numChans1, source2, startFrame2, numFrames2, startChan2, numChans2, destination, interpolation, windowSize, hopSize, fftSize,maxFFTSize,1], freeWhenDone, action ) } } diff --git a/release-packaging/HelpSource/Classes/FluidAudioTransport.schelp b/release-packaging/HelpSource/Classes/FluidAudioTransport.schelp index d56c1c5..aa8a147 100644 --- a/release-packaging/HelpSource/Classes/FluidAudioTransport.schelp +++ b/release-packaging/HelpSource/Classes/FluidAudioTransport.schelp @@ -24,9 +24,6 @@ Source B ARGUMENT:: interpolation The amount to interpolate between A and B (0-1, 0 = A, 1 = B) -ARGUMENT:: bandwidth -The width in bins of an ideal sine wave, which is correlated with the spectrum for peak detection. Larger values provide enhanced resolution, at a computational cost. - ARGUMENT:: windowSize The window size in samples. As AudioTransport relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty diff --git a/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp b/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp index a960987..102e6ee 100644 --- a/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufAudioTransport.schelp @@ -53,9 +53,6 @@ buffer for interpolated audio ARGUMENT:: interpolation The amount to interpolate between A and B (0-1, 0 = A, 1 = B) -ARGUMENT:: bandwidth -The width in bins of an ideal sine wave, which is correlated with the spectrum for peak detection. Larger values provide enhanced resolution, at a computational cost. - ARGUMENT:: windowSize The window size. As spectral differencing relies on spectral frames, we need to decide what precision we give it spectrally and temporally, in line with Gabor Uncertainty principles. http://www.subsurfwiki.org/wiki/Gabor_uncertainty diff --git a/src/FluidAudioTransport/CMakeLists.txt b/src/FluidAudioTransport/CMakeLists.txt new file mode 100644 index 0000000..9646a4e --- /dev/null +++ b/src/FluidAudioTransport/CMakeLists.txt @@ -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 Union’s 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) diff --git a/src/FluidAudioTransport/FluidAudioTransport.cpp b/src/FluidAudioTransport/FluidAudioTransport.cpp new file mode 100644 index 0000000..1815e8b --- /dev/null +++ b/src/FluidAudioTransport/FluidAudioTransport.cpp @@ -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 Union’s Horizon 2020 research and innovation programme +(grant agreement No 725899). +*/ + +#include +#include + +static InterfaceTable *ft; + +PluginLoad(FluidSTFTUGen) +{ + ft = inTable; + using namespace fluid::client; + makeSCWrapper("FluidAudioTransport",ft); +} diff --git a/src/FluidBufAudioTransport/CMakeLists.txt b/src/FluidBufAudioTransport/CMakeLists.txt new file mode 100644 index 0000000..9646a4e --- /dev/null +++ b/src/FluidBufAudioTransport/CMakeLists.txt @@ -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 Union’s 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) diff --git a/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp b/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp new file mode 100644 index 0000000..2d1476e --- /dev/null +++ b/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp @@ -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 Union’s Horizon 2020 research and innovation programme +(grant agreement No 725899). +*/ + +#include +#include + +static InterfaceTable *ft; + +PluginLoad(FluidSTFTUGen) +{ + ft = inTable; + using namespace fluid::client; + makeSCWrapper("FluidBufAudioTransp",ft); +} diff --git a/src/FluidManipulation/FluidManipulation.cpp b/src/FluidManipulation/FluidManipulation.cpp index 9442611..9de5f6e 100644 --- a/src/FluidManipulation/FluidManipulation.cpp +++ b/src/FluidManipulation/FluidManipulation.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -39,8 +38,6 @@ PluginLoad(FluidSTFTUGen) makeSCWrapper("FluidPCA",ft); makeSCWrapper("FluidMDS",ft); makeSCWrapper("FluidUMAP",ft); - makeSCWrapper("FluidAudioTransport",ft); - makeSCWrapper("FluidBufAudioTransp",ft); makeSCWrapper("FluidDataSetWr", ft); makeSCWrapper("FluidMLPRegressor",ft); makeSCWrapper("FluidMLPClassifier",ft);