From 905cb6cc7f8b3514ae8ba57edcba97d4a52839ba Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 10:50:08 +0000 Subject: [PATCH 01/12] Tag release to correct commit --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6dab9c1..1607cfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,5 +101,6 @@ jobs: files: FluCoMa* prerelease: true tag_name: ${{ needs.linuxbuild.outputs.version }} + target_commitish: ${{ github.sha }} draft: false From 2225db6dc0b1381f26eb753f0a08250477c553bb Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 13:13:25 +0000 Subject: [PATCH 02/12] release: delete pre-existing --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1607cfd..3bb3b0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,6 +93,14 @@ jobs: with: name: linuxbuild + - name: delete pre-existing release + uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true # default: false + tag_name: ${{ needs.linuxbuild.outputs.version }} # tag name to delete + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: package and upload uses: softprops/action-gh-release@v1 with: From 13c0f1ae23c7534881e90609f57d84c8cbe52988 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 28 Mar 2023 14:06:42 +0100 Subject: [PATCH 03/12] amended script tag management version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bb3b0d..5e03eb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,7 +94,7 @@ jobs: name: linuxbuild - name: delete pre-existing release - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + uses: dev-drprasad/delete-tag-and-release@v0.2.1 with: delete_release: true # default: false tag_name: ${{ needs.linuxbuild.outputs.version }} # tag name to delete From 8a7fcb889867a538d78bf98f6e8ba85eb5cfe399 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 30 Mar 2023 15:55:26 +0100 Subject: [PATCH 04/12] removed date on copyright --- CMakeLists.txt | 2 +- LICENSE.md | 2 +- include/FluidSCWrapper.hpp | 2 +- include/SCBufferAdaptor.hpp | 2 +- include/wrapper/SCWorldAllocator.hpp | 2 +- scripts/MakeDevTree.cmake | 2 +- scripts/MakePluginSources.cmake | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbe963b..6119f79 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2017-2019 University of Huddersfield. +# Copyright 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) diff --git a/LICENSE.md b/LICENSE.md index e0c0ffc..3b3d13c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2017-2020 University of Huddersfield +Copyright University of Huddersfield All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index 0a82411..b728512 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -1,6 +1,6 @@ /* Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. +Copyright 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) diff --git a/include/SCBufferAdaptor.hpp b/include/SCBufferAdaptor.hpp index e7d3c29..bd27c3d 100644 --- a/include/SCBufferAdaptor.hpp +++ b/include/SCBufferAdaptor.hpp @@ -1,6 +1,6 @@ /* Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. +Copyright 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) diff --git a/include/wrapper/SCWorldAllocator.hpp b/include/wrapper/SCWorldAllocator.hpp index a6bae72..fabddab 100644 --- a/include/wrapper/SCWorldAllocator.hpp +++ b/include/wrapper/SCWorldAllocator.hpp @@ -1,6 +1,6 @@ /* Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) - Copyright 2017-2019 University of Huddersfield. + Copyright 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) diff --git a/scripts/MakeDevTree.cmake b/scripts/MakeDevTree.cmake index e883f7c..ce79d20 100644 --- a/scripts/MakeDevTree.cmake +++ b/scripts/MakeDevTree.cmake @@ -1,5 +1,5 @@ # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. +# Copyright 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) diff --git a/scripts/MakePluginSources.cmake b/scripts/MakePluginSources.cmake index 485cfad..0b81361 100644 --- a/scripts/MakePluginSources.cmake +++ b/scripts/MakePluginSources.cmake @@ -1,5 +1,5 @@ # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. +# Copyright 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) From 574e2e417a190b06b1a75fe7d738390359ae8c10 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 30 Mar 2023 16:40:57 +0100 Subject: [PATCH 05/12] Update nightly.yaml --- .github/workflows/nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 15cd983..6bd114e 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -93,7 +93,7 @@ jobs: with: name: linuxbuild - - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + - uses: dev-drprasad/delete-tag-and-release@v0.2.1 with: delete_release: true # default: false tag_name: nightly # tag name to delete From 69ca627c9932289c970135e2ab4ca05b646eef22 Mon Sep 17 00:00:00 2001 From: lewardo Date: Mon, 14 Aug 2023 13:52:21 +0100 Subject: [PATCH 06/12] .gitattributes sane defaults --- .gitattributes | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eb661f1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,18 @@ +* text=auto + +*.cmake text +*.cpp text +*.csv text +*.gitignore text +*.hpp text +*.in text +*.json text +*.md text +*.sc text +*.scd text +*.schelp text +*.txt text +*.yaml text +*.yml text + +*.png binary From b2963b17fdcef29703496f07aea8eb04a422a22c Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Mon, 14 Aug 2023 19:33:07 +0200 Subject: [PATCH 07/12] Update nightly.yaml --- .github/workflows/nightly.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 6bd114e..78fe701 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -100,12 +100,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: package and upload - uses: softprops/action-gh-release@v1 + - name: create release + uses: ncipollo/release-action@v1 with: name: FluCoMa SuperCollider Nightly Release + artifacts: "FluCoMa*" body: "This is a nightly build of the FluCoMa SuperCollider package. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" - files: FluCoMa* + tag: nightly prerelease: true - tag_name: nightly draft: false + allowUpdates: true From 61b5363c33dedd903a5fd5c6842b1dd5da526327 Mon Sep 17 00:00:00 2001 From: tremblap Date: Sun, 3 Sep 2023 15:53:20 +0100 Subject: [PATCH 08/12] fix the shape of the output making it as the doc says (array of size 2 containing an array of freq and an array of mag) --- release-packaging/Classes/FluidSineFeature.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-packaging/Classes/FluidSineFeature.sc b/release-packaging/Classes/FluidSineFeature.sc index 5c92c25..c5a4a1e 100644 --- a/release-packaging/Classes/FluidSineFeature.sc +++ b/release-packaging/Classes/FluidSineFeature.sc @@ -3,7 +3,7 @@ FluidSineFeature : FluidRTMultiOutUGen { maxNumPeaks = maxNumPeaks ? numPeaks; - ^this.multiNew('control', in.asAudioRateInput(this), numPeaks, maxNumPeaks, detectionThreshold, order, freqUnit, magUnit, windowSize, hopSize, fftSize, maxFFTSize) + ^this.multiNew('control', in.asAudioRateInput(this), numPeaks, maxNumPeaks, detectionThreshold, order, freqUnit, magUnit, windowSize, hopSize, fftSize, maxFFTSize).reshape(2,maxNumPeaks) } init { arg ... theInputs; From 0daeef1466dc868c24122d244bef9f519aa80236 Mon Sep 17 00:00:00 2001 From: tremblap Date: Mon, 4 Sep 2023 19:28:00 +0200 Subject: [PATCH 09/12] add clang-format rules --- .clang-format | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..90dfd01 --- /dev/null +++ b/.clang-format @@ -0,0 +1,121 @@ +--- +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: true +AlignEscapedNewlines: Right +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: true +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: true + AfterExternBlock: false + BeforeCatch: false + BeforeElse: true + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 80 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IncludeBlocks: Merge +# Try and group includes by 'locality' +# We use "" with rel paths for headers in same repo +# Headers in quotes wiht no relative path at top +# Group ../ and ../../ with different priorities, so they get sorted separately +# <> headers *with a folder break* likely not to be STL -> STL / systems headers last +IncludeCategories: + - Regex: '<.+/' + Priority: 4 + - Regex: '"../../' + Priority: 3 + - Regex: '../' # + Priority: 2 + - Regex: '".+hpp"' + Priority: 1 +IncludeIsMainRegex: '(Test)?$' +IndentCaseLabels: false +IndentPPDirectives: None +IndentWidth: 2 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 8 +UseTab: Never +... From 7fbaf8fdabdaa80f8f3f4e1ebde73894660162ad Mon Sep 17 00:00:00 2001 From: tremblap Date: Mon, 4 Sep 2023 21:53:19 +0100 Subject: [PATCH 10/12] Feature/add multiple out support to kr (#164) * Tag release to correct commit * release: delete pre-existing * almost working class def and no difference to the wrapper * removed the print outs and added size check of the inputs - still not sure how I get that shape of output when it should be 3 of in.asArray.size * input shape now working * correct input count division (was the wrong way round) * computes the real size of the input to decline the output size * and finally a working class. We're all set! * troubleshooting prints all over * new proper class for proper algo * remove the debugging pritns * clang-format-ed * pre-clang-format * clang-format-ed with the right style sheet --------- Co-authored-by: Owen Green --- include/FluidSCWrapper.hpp | 92 +++++++++++++++----------------- include/wrapper/RealTimeBase.hpp | 58 ++++++++++++-------- 2 files changed, 81 insertions(+), 69 deletions(-) diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index b728512..331cbc2 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -24,10 +24,10 @@ template class FluidSCWrapper : public impl::FluidSCWrapperBase { using FloatControlsIter = impl::FloatControlsIter; - - //I would like to template these to something more scaleable, but baby steps - friend class impl::RealTime; - friend class impl::NonRealTime; + + // I would like to template these to something more scaleable, but baby steps + friend class impl::RealTime; + friend class impl::NonRealTime; static void doVersion(Unit*, sc_msg_iter*) { @@ -38,12 +38,14 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase bool mInit{false}; public: - template - using ArgumentSetter = typename ClientParams::template Setter; + using ArgumentSetter = + typename ClientParams::template Setter; template - using ControlSetter = typename ClientParams::template Setter; + using ControlSetter = + typename ClientParams::template Setter; using Client = C; using ParamSetType = typename C::ParamSetType; @@ -66,14 +68,14 @@ public: getInterfaceTable(ft); impl::FluidSCWrapperBase::setup(ft, name); ft->fDefineUnitCmd(name, "version", doVersion); - + std::string commandName("/"); commandName += getName(); commandName += "/version"; - ft->fDefinePlugInCmd(commandName.c_str(), - [](World*, void*, sc_msg_iter*, void*){ doVersion(nullptr,nullptr); }, - nullptr); - + ft->fDefinePlugInCmd( + commandName.c_str(), + [](World*, void*, sc_msg_iter*, void*) { doVersion(nullptr, nullptr); }, + nullptr); } static auto& setParams(Unit* x, ParamSetType& p, FloatControlsIter& inputs, @@ -81,58 +83,52 @@ public: bool initialized = true) { bool verbose = x->mWorld->mVerbosity > 0; - + using Reportage = decltype(static_cast(x)->mReportage); - - Reportage* reportage = initialized ? &(static_cast(x)->mReportage) : new Reportage(); + + Reportage* reportage = initialized + ? &(static_cast(x)->mReportage) + : new Reportage(); p.template setParameterValuesRT( verbose ? reportage : nullptr, x, inputs, p, alloc); if (constrain) p.constrainParameterValuesRT(verbose ? reportage : nullptr); - if(verbose) + if (verbose) { - for(auto& r:*reportage) + for (auto& r : *reportage) { - if(!r.ok()) printResult(x->mParent->mNode.mWorld, r); + if (!r.ok()) printResult(x->mParent->mNode.mWorld, r); } } - if(!initialized) delete reportage; + if (!initialized) delete reportage; return p; } -// static void printResult(SharedState& x, Result& r) -// { -// if (!x.get() || !x->mNodeAlive) return; -// FluidSCWrapper::printResult(x->mNode->mWorld, r); -// } - - static void printResult(World* w,Result& r) + static void printResult(World* w, Result& r) { - + switch (r.status()) { - case Result::Status::kWarning: - { - if (!w || w->mVerbosity > 0) - std::cout << "WARNING: " << getName() << " - " << r.message().c_str() << '\n'; - break; - } - case Result::Status::kError: - { - std::cout << "ERROR: " << getName() << " - " << r.message().c_str() << '\n'; - break; - } - case Result::Status::kCancelled: - { - std::cout << getName() << ": Task cancelled\n" << '\n'; - break; - } - default: - { - } - } + case Result::Status::kWarning: { + if (!w || w->mVerbosity > 0) + std::cout << "WARNING: " << getName() << " - " << r.message().c_str() + << '\n'; + break; + } + case Result::Status::kError: { + std::cout << "ERROR: " << getName() << " - " << r.message().c_str() + << '\n'; + break; + } + case Result::Status::kCancelled: { + std::cout << getName() << ": Task cancelled\n" << '\n'; + break; + } + default: { + } + } } - + private: std::array mReportage; }; diff --git a/include/wrapper/RealTimeBase.hpp b/include/wrapper/RealTimeBase.hpp index ffeb5c7..59e6654 100644 --- a/include/wrapper/RealTimeBase.hpp +++ b/include/wrapper/RealTimeBase.hpp @@ -1,8 +1,8 @@ #pragma once +#include #include #include -#include namespace fluid { namespace client { @@ -82,9 +82,10 @@ struct RealTimeBase std::forward(countScan)); return countScan; } - - void init(SCUnit& unit, Client& client, FloatControlsIter& controls, Allocator& alloc) + + void init(SCUnit& unit, Client& client, FloatControlsIter& controls, + Allocator& alloc) { assert(!(client.audioChannelsOut() > 0 && client.controlChannelsOut().count > 0) && @@ -92,7 +93,7 @@ struct RealTimeBase client.sampleRate(unit.fullSampleRate()); mInputConnections.reserve(asUnsigned(client.audioChannelsIn())); mOutputConnections.reserve(asUnsigned(client.audioChannelsOut())); - mContext = FluidContext(unit.fullBufferSize(), alloc); + mContext = FluidContext(unit.fullBufferSize(), alloc); Result r; if (!(r = expectedSize(controls)).ok()) { @@ -113,16 +114,22 @@ struct RealTimeBase } else if (client.controlChannelsIn()) { - mControlInputBuffer.resize(unit.mSpecialIndex + 1); - mAudioInputs.emplace_back(mControlInputBuffer); + mControlInputBuffer.resize(client.controlChannelsIn(), + (unit.mSpecialIndex + 1) / + client.controlChannelsIn()); + for (index i = 0; i < client.controlChannelsIn(); ++i) + { + mAudioInputs.emplace_back(mControlInputBuffer.row(i)); + } mInputMapper = &RealTimeBase::mapControlInputs; } - else mInputMapper = &RealTimeBase::mapNoOp; + else { mInputMapper = &RealTimeBase::mapNoOp; } index outputSize = client.controlChannelsOut().size > 0 ? std::max(client.audioChannelsOut(), client.maxControlChannelsOut()) - : unit.mSpecialIndex + 1; + : (unit.mSpecialIndex + 1); + mOutputs.reserve(asUnsigned(outputSize)); if (client.audioChannelsOut()) @@ -132,7 +139,7 @@ struct RealTimeBase mOutputConnections.emplace_back(true); mOutputs.emplace_back(nullptr, 0, 0); } - + mOutMapperPre = &RealTimeBase::mapAudioOutputs; mOutMapperPost = &RealTimeBase::mapNoOp; } @@ -177,19 +184,28 @@ struct RealTimeBase } } - void mapControlInputs(SCUnit& unit, Client&) + void mapControlInputs(SCUnit& unit, Client& client) { - for (index i = 0; i < unit.mSpecialIndex + 1; ++i) + assert((unit.mSpecialIndex + 1) % client.controlChannelsIn() == 0 && + "Control channels can't be mapped"); + index itemsPerChannel = + (unit.mSpecialIndex + 1) / client.controlChannelsIn(); + for (index i = 0, offset = 0; i < client.controlChannelsIn(); + ++i, offset += itemsPerChannel) { - assert(i <= std::numeric_limits::max()); - mControlInputBuffer[i] = unit.in0(static_cast(i)); + for (index j = 0; j < itemsPerChannel; ++j) + { + assert(j <= std::numeric_limits::max()); + mControlInputBuffer(i, j) = unit.in0(static_cast(offset + j)); + } } } void mapControlOutputs(SCUnit& unit, Client&) { - index numOuts = std::min(mControlOutputBuffer.size(),unit.mNumOutputs); - + index numOuts = + std::min(mControlOutputBuffer.size(), unit.mNumOutputs); + for (index i = 0; i < numOuts; ++i) { assert(i <= std::numeric_limits::max()); @@ -205,9 +221,9 @@ struct RealTimeBase IsModel_t::value ? !mPrevTrig && unit.in0(0) > 0 : false; mPrevTrig = trig; - #ifdef EIGEN_RUNTIME_NO_MALLOC +#ifdef EIGEN_RUNTIME_NO_MALLOC Eigen::internal::set_is_malloc_allowed(false); - #endif +#endif if (updateParams) { Wrapper::setParams(&unit, params, controls, alloc); @@ -218,9 +234,9 @@ struct RealTimeBase (this->*mOutMapperPre)(unit, client); client.process(mAudioInputs, mOutputs, mContext); (this->*mOutMapperPost)(unit, client); - #ifdef EIGEN_RUNTIME_NO_MALLOC - Eigen::internal::set_is_malloc_allowed(true); //not really - #endif +#ifdef EIGEN_RUNTIME_NO_MALLOC + Eigen::internal::set_is_malloc_allowed(true); // not really +#endif } private: @@ -228,7 +244,7 @@ private: std::vector mOutputConnections; std::vector mAudioInputs; std::vector mOutputs; - FluidTensor mControlInputBuffer; + FluidTensor mControlInputBuffer; FluidTensor mControlOutputBuffer; bool mPrevTrig; IOMapFn mInputMapper; From 278c64ab39af5ee402fe0dd7c9cc7bf66e95ca04 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 27 Feb 2024 11:23:51 +0000 Subject: [PATCH 11/12] added knearestdist to datasert (#169) --- release-packaging/Classes/FluidDataSet.sc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release-packaging/Classes/FluidDataSet.sc b/release-packaging/Classes/FluidDataSet.sc index 4ce9347..75c7273 100644 --- a/release-packaging/Classes/FluidDataSet.sc +++ b/release-packaging/Classes/FluidDataSet.sc @@ -110,4 +110,13 @@ FluidDataSet : FluidDataObject actions[\kNearest] = [strings(FluidMessageResponse,_,_),action]; this.prSendMsg(this.kNearestMsg(buffer,k)); } + + kNearestDistMsg {|buffer, k| + ^this.prMakeMsg(\kNearestDist,id,this.prEncodeBuffer(buffer),k); + } + + kNearestDist { |buffer, k, action| + actions[\kNearestDist] = [numbers(FluidMessageResponse,_,nil,_),action]; + this.prSendMsg(this.kNearestDistMsg(buffer,k)); + } } From 014a38c919e246610736d850b523ddfe65f5d32b Mon Sep 17 00:00:00 2001 From: tremblap Date: Fri, 1 Mar 2024 10:34:22 +0000 Subject: [PATCH 12/12] fixes for hisstools header only --- CMakeLists.txt | 5 ----- scripts/MakePluginSources.cmake | 1 - 2 files changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6119f79..0610452 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,11 +132,6 @@ if(APPLE OR WIN32) set(CMAKE_SHARED_MODULE_SUFFIX ".scx") endif() -#needed for complaint-free static linking with GCC -if(CMAKE_COMPILER_IS_GNUCXX) - target_compile_options( HISSTools_FFT PUBLIC -fPIC ) -endif() - #sandbox regrettable dependency on SC internals for SendReply() if(SYSTEM_BOOST) diff --git a/scripts/MakePluginSources.cmake b/scripts/MakePluginSources.cmake index 0b81361..4f4c155 100644 --- a/scripts/MakePluginSources.cmake +++ b/scripts/MakePluginSources.cmake @@ -42,7 +42,6 @@ function(add_sc_extension PLUGIN FILENAME) PRIVATE FLUID_DECOMPOSITION FLUID_SC_WRAPPER - HISSTools_FFT ) target_include_directories(