diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 57c9b83..2a3bd70 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -7,111 +7,80 @@ on: branches: [ dev, ci/** ] jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/docs@v4 - with: - target: MAKE_SC_REF - - - uses: actions/upload-artifact@v2 - with: - name: docs - path: build/sc_ref - macbuild: runs-on: macos-11 steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/sc@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 + with: + branch: origin/dev + - name: compress archive + run: zip -r FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 - with: - name: macbuild - path: install + with: + name: macbuild + path: install/FluCoMa-SC-Mac-nightly.zip winbuild: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/sc@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 + with: + branch: origin/dev - name: remove pdb files run: Remove-Item install -Recurse -Include *.pdb - - uses: actions/upload-artifact@v2 + - name: compress archive + run: 7z a FluCoMa-SC-Windows-nightly.zip FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 with: name: winbuild - path: install + path: install/FluCoMa-SC-Windows-nightly.zip linuxbuild: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 - - uses: flucoma/actions/sc@v4 - - - uses: actions/upload-artifact@v2 - with: - name: linuxbuild - path: install + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 + with: + branch: origin/dev + + - name: compress archive + run: tar -zcvf FluCoMa-SC-Linux-nightly.tar.gz FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: install/FluCoMa-SC-Linux-nightly.tar.gz release: runs-on: ubuntu-latest - needs: [macbuild, winbuild, linuxbuild,docs] + needs: [macbuild, winbuild, linuxbuild] steps: - uses: actions/download-artifact@v2 with: - name: docs - path: docs - - - uses: actions/download-artifact@v2 - with: - name: macbuild - path: mac - - - name: copy docs to mac - run: mkdir -p mac/FluidCorpusManipulation/HelpSource && cp -r docs/* mac/FluidCorpusManipulation/HelpSource - - - - name: compress win - run: zip -r ../FluCoMa-SC-Mac-nightly.zip . - working-directory: mac + name: macbuild - - uses: actions/download-artifact@v2 with: - name: winbuild - path: win - - - name: copy docs to win - run: mkdir -p win/FluidCorpusManipulation/HelpSource && cp -r docs/* win/FluidCorpusManipulation/HelpSource - - - name: compress win - run: zip -r ../FluCoMa-SC-Windows-nightly.zip . - working-directory: win - + name: winbuild - uses: actions/download-artifact@v2 with: - name: linuxbuild - - path: linux - - - name: copy docs to linux - run: mkdir -p linux/FluidCorpusManipulation/HelpSource && cp -r docs/* linux/FluidCorpusManipulation/HelpSource - - - name: compress linux - run: zip -r ../FluCoMa-SC-Linux-nightly.zip . - working-directory: linux - + name: linuxbuild - uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: @@ -125,7 +94,7 @@ jobs: with: name: FluCoMa SuperCollider Nightly Release 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-SC-*.zip + files: FluCoMa-SC-* prerelease: true tag_name: nightly draft: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 545fb91..decf7a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,60 +2,46 @@ name: Release on: workflow_dispatch: - inputs: - base: - description: 'Base branch to deploy core from' - required: false - default: 'main' jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: flucoma/actions/env@v4 - with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/docs@v4 - with: - target: MAKE_SC_REF - branch: ${{ github.event.inputs.base }} - - - uses: actions/upload-artifact@v2 - with: - name: docs - path: build/sc_ref - macbuild: runs-on: macos-11 steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/sc@v4 + branch: origin/main + + - name: compress archive + run: zip -r FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install - uses: actions/upload-artifact@v2 - with: - name: macbuild - path: install + with: + name: macbuild + path: install/FluCoMa-SC-Mac-nightly.zip winbuild: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/sc@v4 + branch: origin/main - name: remove pdb files run: Remove-Item install -Recurse -Include *.pdb - - uses: actions/upload-artifact@v2 + - name: compress archive + run: 7z a FluCoMa-SC-Windows-nightly.zip FluidCorpusManipulation + working-directory: install + - uses: actions/upload-artifact@v2 with: name: winbuild - path: install + path: install/FluCoMa-SC-Windows-nightly.zip linuxbuild: runs-on: ubuntu-18.04 @@ -63,15 +49,19 @@ jobs: version: ${{ steps.get-version.outputs.version }} steps: - uses: actions/checkout@v2 - - uses: flucoma/actions/env@v4 + - uses: flucoma/actions/env@v5 + - uses: flucoma/actions/sc@v5 with: - branch: ${{ github.event.inputs.base }} - - uses: flucoma/actions/sc@v4 + branch: origin/main + + - name: compress archive + run: tar -zcvf FluCoMa-SC-Linux-nightly.tar.gz FluidCorpusManipulation + working-directory: install - - uses: actions/upload-artifact@v2 - with: - name: linuxbuild - path: install + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: install/FluCoMa-SC-Linux-nightly.tar.gz - id: get-version run: echo "::set-output name=version::$(cat flucoma.version.rc)" @@ -79,51 +69,21 @@ jobs: release: runs-on: ubuntu-latest - needs: [macbuild, winbuild, linuxbuild, docs] + needs: [macbuild, winbuild, linuxbuild] - steps: - - uses: actions/download-artifact@v2 - with: - name: docs - path: docs - + steps: - uses: actions/download-artifact@v2 with: name: macbuild - path: mac - - - name: copy docs to mac - run: mkdir -p mac/FluidCorpusManipulation/HelpSource && cp -r docs/* mac/FluidCorpusManipulation/HelpSource - - - name: compress win - run: zip -r ../FluCoMa-SC-Mac.zip . - working-directory: mac - uses: actions/download-artifact@v2 with: name: winbuild - path: win - - - name: copy docs to win - run: mkdir -p win/FluidCorpusManipulation/HelpSource && cp -r docs/* win/FluidCorpusManipulation/HelpSource - - - name: compress win - run: zip -r ../FluCoMa-SC-Windows.zip . - working-directory: win - uses: actions/download-artifact@v2 with: name: linuxbuild - path: linux - - - name: copy docs to linux - run: mkdir -p linux/FluidCorpusManipulation/HelpSource && cp -r docs/* linux/FluidCorpusManipulation/HelpSource - - - name: compress linux - run: zip -r ../FluCoMa-SC-Linux.zip . - working-directory: linux - - name: package and upload uses: softprops/action-gh-release@v1 with: diff --git a/.gitignore b/.gitignore index 6f98b5b..5be2720 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -build +build* **/build/* **/.DS_Store release-packaging/Plugins diff --git a/CMakeLists.txt b/CMakeLists.txt index 40c5273..ec910af 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,10 +7,15 @@ cmake_minimum_required(VERSION 3.11) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + ################################################################################ # Paths set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "") - +set(FLUID_BRANCH "origin/main" CACHE STRING "Branch to pull flucoma dependencies from") set(SC_LIBRARY_OUTPUT_PREFIX "release-packaging" CACHE STRING "Where in the hierarchy to write sc plugins") set(SC_PATH "" CACHE PATH "Path to the top of SuperCollider source tree") @@ -22,7 +27,6 @@ set(FLUID_PATH "" CACHE PATH "Optional path to the Fluid Decomposition repo") if (APPLE) set(CMAKE_XCODE_GENERATE_SCHEME ON) - set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "") set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "") #A consequence of targetting 10.8. Needs to be set globally from 10.15 onwards in order for the test program to compile successfully during configure string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") @@ -30,6 +34,8 @@ endif() option(SYSTEM_BOOST "Use boost libraries from system. If your SC was built with this enabled, so should FluCoMa-sc" OFF) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/scripts") + ################################################################################ # Main project project (flucoma-sc LANGUAGES CXX) @@ -52,33 +58,20 @@ endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY ON) -MACRO(SUBDIRLIST result curdir) - FILE(GLOB children RELATIVE ${curdir} ${curdir}/*) - SET(dirlist "") - FOREACH(child ${children}) - IF(IS_DIRECTORY ${curdir}/${child}) - LIST(APPEND dirlist ${child}) - ENDIF() - ENDFOREACH() - SET(${result} ${dirlist}) -ENDMACRO() - include(FetchContent) -set(FETCHCONTENT_QUIET FALSE) - FetchContent_Declare( flucoma-core GIT_REPOSITORY https://github.com/flucoma/flucoma-core.git GIT_PROGRESS TRUE - GIT_TAG origin/main + GIT_TAG ${FLUID_BRANCH} ) FetchContent_Declare( flucoma-docs GIT_REPOSITORY https://github.com/flucoma/flucoma-docs.git GIT_PROGRESS TRUE - GIT_TAG origin/main + GIT_TAG ${FLUID_BRANCH} ) if(FLUID_PATH) @@ -87,14 +80,14 @@ if(FLUID_PATH) ) endif() -FetchContent_GetProperties(flucoma-core) -if(NOT flucoma-core_POPULATED) - FetchContent_Populate(flucoma-core) - add_subdirectory(${flucoma-core_SOURCE_DIR} ${flucoma-core_BINARY_DIR}) - include(flucoma_version) - include(flucoma-buildtools) - include(flucoma-buildtype) -endif() +FetchContent_MakeAvailable(flucoma-core) +# if(NOT flucoma-core_POPULATED) +# FetchContent_Populate(flucoma-core) +# add_subdirectory(${flucoma-core_SOURCE_DIR} ${flucoma-core_BINARY_DIR}) +include(flucoma_version) +include(flucoma-buildtools) +include(flucoma-buildtype) +# endif() option(DOCS "Generate scdocs" OFF) set(FLUID_DOCS_PATH "" CACHE PATH "Optional path to flucoma-docs (needed for docs); will download if absent") @@ -108,15 +101,17 @@ if(DOCS) FETCHCONTENT_SOURCE_DIR_FLUCOMA-DOCS ${FLUID_DOCS_PATH} ABSOLUTE ) endif() - - FetchContent_GetProperties(flucoma-docs) - if(NOT flucoma-docs_POPULATED) - FetchContent_Populate(flucoma-docs) - file(GLOB_RECURSE DOC_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${flucoma-docs_SOURCE_DIR}/**/*.cpp" ) - source_group("\\SC Doc Gen" FILES ${DOC_SOURCE}) - add_subdirectory(${flucoma-docs_SOURCE_DIR} ${flucoma-docs_BINARY_DIR}) - endif() - + FetchContent_MakeAvailable(flucoma-docs) + # FetchContent_GetProperties(flucoma-docs) + # if(NOT flucoma-docs_POPULATED) + # FetchContent_Populate(flucoma-docs) + # file(GLOB_RECURSE DOC_SOURCE RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${flucoma-docs_SOURCE_DIR}/**/*.cpp" ) + # source_group("\\SC Doc Gen" FILES ${DOC_SOURCE}) + # add_subdirectory(${flucoma-docs_SOURCE_DIR} ${flucoma-docs_BINARY_DIR}) + # endif() + include(FlucomaDocs) + set(SC_DOC_OUT "${CMAKE_BINARY_DIR}/sc_ref") + add_ref_target(sc "Making SC docs") add_custom_target(SC_MAKE_DOCS ALL DEPENDS MAKE_SC_REF) endif() @@ -130,6 +125,9 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_LIBRARY_OUTPUT_DIRECT set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_TEST "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") set(CMAKE_SHARED_MODULE_PREFIX "") +set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/pdbtmp") +set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/pdbtmp") + if(APPLE OR WIN32) set(CMAKE_SHARED_MODULE_SUFFIX ".scx") endif() @@ -189,8 +187,8 @@ if(APPLE) target_compile_options(FLUID_SC_COPYREPLYADDR PRIVATE -stdlib=libc++) endif() -target_compile_definitions(FLUID_SC_COPYREPLYADDR PRIVATE BOOST_ALL_NO_LIB BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE) - +target_compile_definitions(FLUID_SC_COPYREPLYADDR PRIVATE BOOST_ALL_NO_LIB PUBLIC BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE) + add_library(FLUID_SC_WRAPPER INTERFACE) target_include_directories(FLUID_SC_WRAPPER INTERFACE @@ -205,18 +203,39 @@ target_sources(FLUID_SC_WRAPPER target_link_libraries(FLUID_SC_WRAPPER INTERFACE FLUID_SC_COPYREPLYADDR) -SUBDIRLIST(PROJECT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") -foreach (project_dir ${PROJECT_DIRS}) - if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/${project_dir}/CMakeLists.txt") - message("Generating: ${project_dir}") - add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/${project_dir}") - endif () -endforeach () +include(MakePluginSources) +# generate targets for standalone clients +get_client_group(NONE client_list) +foreach(client ${client_list}) + get_core_client_header(${client} header) + get_core_client_class(${client} class) + generate_sc_source( + CLIENTS ${client} + HEADERS ${header} + CLASSES ${class} + ) +endforeach() + +add_client(DataSetWr clients/rt/FluidDataSetWr.hpp CLASS NRTThreadedDataSetWriter GROUP MANIPULATION) +#generate target for MANIPULATION group +get_client_group(MANIPULATION client_list) +foreach(client ${client_list}) + get_core_client_header(${client} header) + get_core_client_class(${client} class) + list(APPEND MANIPULATION_CLIENTS ${client}) + list(APPEND MANIPULATION_HEADERS ${header}) + list(APPEND MANIPULATION_CLASSES ${class}) +endforeach() +generate_sc_source( + CLIENTS ${MANIPULATION_CLIENTS} + HEADERS ${MANIPULATION_HEADERS} + CLASSES ${MANIPULATION_CLASSES} + FILENAME FluidManipulation +) #install bits. - set(SC_INSTALL_PREFIX "." CACHE PATH "Prefix for assembling SC packages") set(FLUID_PACKAGE_NAME FluidCorpusManipulation CACHE STRING "Name for published package") set(SC_PACKAGE_ROOT ${SC_INSTALL_PREFIX}/${FLUID_PACKAGE_NAME}) @@ -242,6 +261,6 @@ install(FILES ${flucoma-core_SOURCE_DIR}/distribution.lic RENAME LICENSE.md) if(DOCS) - install(DIRECTORY "${SC_DOC_OUT}" + install(DIRECTORY "${SC_DOC_OUT}/" DESTINATION "${SC_PACKAGE_ROOT}/HelpSource") endif() diff --git a/include/wrapper/ArgsFromClient.hpp b/include/wrapper/ArgsFromClient.hpp index 88ae458..9f7b091 100644 --- a/include/wrapper/ArgsFromClient.hpp +++ b/include/wrapper/ArgsFromClient.hpp @@ -77,6 +77,11 @@ struct ParamReader return args.next(); } + static auto fromArgs(Unit*, Controls& args, typename ChoicesT::type, int) + { + return typename ChoicesT::type(std::size_t(static_cast(args.next()))); + } + static SCBufferAdaptor* fetchBuffer(Unit* x, index bufnum) { if(bufnum >= x->mWorld->mNumSndBufs) @@ -114,6 +119,12 @@ struct ParamReader auto id = fromArgs(x, args, index{}, 0); return {id >= 0 ? std::to_string(id).c_str() : "" }; } + + static auto fromArgs(Unit*,Controls& args,typename LongRuntimeMaxT::type&, int) + { + return typename LongRuntimeMaxT::type{static_cast(args.next()), static_cast(args.next())}; + } + }; // NRT case: we're decoding data from sc_msg_iter*, there will be a World*, we can't have LocalBufs @@ -135,38 +146,45 @@ struct ParamReader } } - static const char* argTypeToString(std::string&) + + template + static const char* argTypeToString(Optional&) + { + return argTypeToString(T{}); + } + + static const char* argTypeToString(const std::string&) { return "string"; } template static std::enable_if_t::value, const char*> - argTypeToString(T&) + argTypeToString(T) { return "integer"; } template static std::enable_if_t::value, const char*> - argTypeToString(T&) + argTypeToString(T) { return "float"; } - static const char* argTypeToString(BufferT::type&) + static const char* argTypeToString(const BufferT::type&) { return "buffer"; } - static const char* argTypeToString(InputBufferT::type&) + static const char* argTypeToString(const InputBufferT::type&) { return "buffer"; } template static std::enable_if_t::value,const char*> - argTypeToString(P&) + argTypeToString(const P&) { return "shared_object"; //not ideal } @@ -179,28 +197,34 @@ struct ParamReader template static std::enable_if_t::value || std::is_floating_point::value, bool> - argTypeOK(T&, char tag) + argTypeOK(T, char tag) { return tag == 'i' || tag == 'f' || tag == 'd'; } - static bool argTypeOK(BufferT::type&, char tag) + static bool argTypeOK(const BufferT::type&, char tag) { return tag == 'i'; } - static bool argTypeOK(InputBufferT::type&, char tag) + static bool argTypeOK(const InputBufferT::type&, char tag) { return tag == 'i'; } template static std::enable_if_t::value,bool> - argTypeOK(P&, char tag) + argTypeOK(const P&, char tag) { return tag == 'i'; } + template + static bool argTypeOK(const Optional&, char tag) + { + return argTypeOK(T{},tag); + } + static auto fromArgs(World*, sc_msg_iter& args, std::string, int) { const char* recv = args.gets(""); @@ -266,6 +290,23 @@ struct ParamReader res[i] = static_cast(args.geti()); return res; } + + static auto fromArgs(World*,sc_msg_iter& args,typename LongRuntimeMaxT::type&, int) + { + return typename LongRuntimeMaxT::type{args.geti(), args.geti()}; + } + + static auto fromArgs(World*, sc_msg_iter& args, typename ChoicesT::type, int) + { + int x = args.geti(); + return typename ChoicesT::type(asUnsigned(x)); + } + + template + static auto fromArgs(World* w, sc_msg_iter& args, Optional, int) + { + return Optional{fromArgs(w,args,T{},int{})}; + } }; diff --git a/include/wrapper/Messaging.hpp b/include/wrapper/Messaging.hpp index 77c4d05..9237525 100644 --- a/include/wrapper/Messaging.hpp +++ b/include/wrapper/Messaging.hpp @@ -35,23 +35,54 @@ struct FluidSCMessaging{ }; +private: + static bool is_vowel(const char p_char) + { + constexpr char vowels[] = { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' }; + return std::find(std::begin(vowels), std::end(vowels), p_char) != std::end(vowels); + } + + static std::string remove_vowel(std::string st) + { + auto to_erase = std::remove_if(st.begin(), st.end(), is_vowel); + st.erase(to_erase, st.end()); + return st; + } + + +public: template struct SetupMessageCmd { - void operator()(const T& message) { - static std::string messageName = std::string{getName()} + '/' + message.name; - auto ft = getInterfaceTable(); - ft->fDefinePlugInCmd(messageName.c_str(), doMessage,(void*)messageName.c_str()); + static std::string messageName = std::string{getName()} + '/' + message.name; + FluidSCWrapper::registerMessage(messageName.c_str(),doMessage); } }; + + template + static auto constexpr filterOneOptional(const T&) { return std::make_tuple(T{}); } + + template + static auto constexpr filterOneOptional(const Optional&) { return std::make_tuple(); } + + + template + static auto constexpr filterOptional(std::tuple) + { + return std::tuple_cat(filterOneOptional(Ts{})...); + } + + template - static bool validateMessageArgs(Message* msg, sc_msg_iter* inArgs) + static Optional validateMessageArgs(Message* msg, sc_msg_iter* inArgs) { + //we can be sure that optional args always follow mandatory ones, as this is enforced at compile time in flucoma-core using ArgTuple = decltype(msg->args); + using MandatoryArgsTuple = decltype(filterOptional(msg->args)); std::string tags(inArgs->tags + inArgs->count);//evidently this needs commenting: construct string at pointer offset by tag count, to pick up args bool willContinue = true; @@ -59,7 +90,7 @@ struct FluidSCMessaging{ auto& args = msg->args; - constexpr size_t expectedArgCount = std::tuple_size::value; + static constexpr size_t expectedArgCount = std::tuple_size::value; /// TODO this squawks if we have a completion message, so maybe we can check if extra arg is a 'b' and squawk if not? // if(tags.size() > expectedArgCount) @@ -77,14 +108,16 @@ struct FluidSCMessaging{ auto tagsIter = tags.begin(); auto tagsEnd = tags.end(); - ForEach(args,[&typesMatch,&tagsIter,&tagsEnd](auto& arg){ + size_t argCount = 0; + ForEach(args,[&typesMatch,&tagsIter,&tagsEnd,firstTag=tags.begin(),&argCount](auto& arg){ if(tagsIter == tagsEnd) { - typesMatch = false; + if(std::distance(firstTag,tagsIter) < asSigned(expectedArgCount)) typesMatch = false; return; } char t = *(tagsIter++); typesMatch = typesMatch && ParamReader::argTypeOK(arg,t); + argCount++; }); willContinue = willContinue && typesMatch; @@ -116,7 +149,7 @@ struct FluidSCMessaging{ report << ")\n"; } - return willContinue; + return willContinue ? Optional(argCount) : Optional(); } static void refreshParams(Params& p, MessageResult& r) @@ -137,9 +170,9 @@ struct FluidSCMessaging{ msg->id = args->geti(); msg->replyAddr = copyReplyAddress(replyAddr); ///TODO make this step contingent on verbosity or something, in the name of effieciency - bool willContinue = validateMessageArgs(msg, args); + auto tagCount = validateMessageArgs(msg, args); - if(!willContinue) + if(!tagCount.has_value()) { delete msg; return; @@ -148,9 +181,10 @@ struct FluidSCMessaging{ msg->name = std::string{'/'} + (const char*)(inUserData); - ForEach(msg-> args,[inWorld,&args](auto& thisarg) + ForEach(msg-> args,[inWorld,&args,tagCount,n=0](auto& thisarg)mutable { - thisarg = ParamReader::fromArgs(inWorld, *args,thisarg,0); + if(n++ < asSigned(tagCount.value())) + thisarg = ParamReader::fromArgs(inWorld, *args,thisarg,0); }); size_t completionMsgSize{args ? args->getbsize() : 0}; diff --git a/include/wrapper/NonRealtime.hpp b/include/wrapper/NonRealtime.hpp index 32ca380..1782fe2 100644 --- a/include/wrapper/NonRealtime.hpp +++ b/include/wrapper/NonRealtime.hpp @@ -20,6 +20,12 @@ namespace impl { /// Non Real Time Processor + using ServerCommandFn = void(*)(World* world, void*, struct sc_msg_iter* args, + void* replyAddr); + + using CommandMap = std::unordered_map; + + template class NonRealTime : public SCUnit { @@ -829,8 +835,8 @@ private: completionMsgData); if (completionMsgSize) ft->fRTFree(world, completionMsgData); - }; - ft->fDefinePlugInCmd(Command::name(), commandRunner, nullptr); + }; + mCommandDispatchTable[Command::name()] = commandRunner; } @@ -1106,6 +1112,12 @@ private: static constexpr bool IsModel = Client::isModelObject::value; public: + + static void registerMessage(const char* name, ServerCommandFn f) + { + mCommandDispatchTable[name] = f; + } + static void setup(InterfaceTable* ft, const char*) { defineNRTCommand(); @@ -1125,6 +1137,21 @@ public: static std::string flushCmd = std::string(Wrapper::getName()) + "/flush"; + ft->fDefinePlugInCmd( + Wrapper::getName(), + [](World* w, void* inUserData, struct sc_msg_iter* msg, void* replyAddr) + { + const char* name = msg->gets(); + + auto cmd = mCommandDispatchTable.find(name); + + if (cmd != mCommandDispatchTable.end()) + cmd->second(w, inUserData ? inUserData : (void*)name, msg, replyAddr); + else + std::cout << "ERROR: message " << name << " not registered."; + + }, nullptr); + ft->fDefinePlugInCmd( flushCmd.c_str(), [](World*, void*, struct sc_msg_iter*, void*) { mCache.clear(); }, @@ -1176,14 +1203,21 @@ private: index mPreviousTrigger{0}; bool mSynchronous{true}; Result mResult; + + static CommandMap mCommandDispatchTable; }; + template World* NonRealTime::mWorld{nullptr}; template typename NonRealTime::Cache NonRealTime::mCache{}; + +template +CommandMap NonRealTime::mCommandDispatchTable{}; + } // namespace impl } // namespace client diff --git a/include/wrapper/RealTimeBase.hpp b/include/wrapper/RealTimeBase.hpp index 885b407..feccfb8 100644 --- a/include/wrapper/RealTimeBase.hpp +++ b/include/wrapper/RealTimeBase.hpp @@ -118,7 +118,7 @@ struct RealTimeBase index outputSize = client.controlChannelsOut().size > 0 ? std::max(client.audioChannelsOut(), - client.controlChannelsOut().size) + client.maxControlChannelsOut()) : unit.mSpecialIndex + 1; mOutputs.reserve(asUnsigned(outputSize)); @@ -174,18 +174,20 @@ struct RealTimeBase } } - void mapControlInputs(SCUnit& unit, Client& client) + void mapControlInputs(SCUnit& unit, Client&) { for (index i = 0; i < unit.mSpecialIndex + 1; ++i) { assert(i <= std::numeric_limits::max()); - mControlInputBuffer[asUnsigned(i)] = unit.in0(static_cast(i)); + mControlInputBuffer[i] = unit.in0(static_cast(i)); } } - void mapControlOutputs(SCUnit& unit, Client& client) + void mapControlOutputs(SCUnit& unit, Client&) { - for (index i = 0; i < mControlOutputBuffer.size(); ++i) + index numOuts = std::min(mControlOutputBuffer.size(),unit.mNumOutputs); + + for (index i = 0; i < numOuts; ++i) { assert(i <= std::numeric_limits::max()); unit.out0(static_cast(i)) = mControlOutputBuffer(i); diff --git a/release-packaging/Classes/FluidAudioTransport.sc b/release-packaging/Classes/FluidAudioTransport.sc index ce46568..49a3357 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, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + *ar { arg in = 0, in2 = 0, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; ^this.multiNew('audio', in.asAudioRateInput, in2, interpolation, windowSize, hopSize, fftSize, maxFFTSize) } } diff --git a/release-packaging/Classes/FluidBufAudioTransport.sc b/release-packaging/Classes/FluidBufAudioTransport.sc index 973afa6..33a4477 100644 --- a/release-packaging/Classes/FluidBufAudioTransport.sc +++ b/release-packaging/Classes/FluidBufAudioTransport.sc @@ -1,9 +1,5 @@ FluidBufAudioTransport : FluidBufProcessor { - *objectClassName{ - ^\FluidBufAudioTransp - } - *kr { |sourceA, startFrameA = 0, numFramesA = -1, startChanA = 0, numChansA = -1, sourceB, startFrameB = 0, numFramesB = -1, startChanB = 0, numChansB = -1, destination, interpolation = 0.0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; diff --git a/release-packaging/Classes/FluidBufChroma.sc b/release-packaging/Classes/FluidBufChroma.sc index ed8fba5..14cbf16 100644 --- a/release-packaging/Classes/FluidBufChroma.sc +++ b/release-packaging/Classes/FluidBufChroma.sc @@ -9,7 +9,7 @@ FluidBufChroma : FluidBufProcessor { source.isNil.if {"FluidBufChroma: Invalid source buffer".throw}; features.isNil.if {"FluidBufChroma: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufChromaTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, ref, normalize, minFreq, maxFreq, numChroma, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufChromaTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numChroma = 12, ref = 440, normalize = 0,minFreq = 0,maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| @@ -25,7 +25,7 @@ FluidBufChroma : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, ref, normalize, minFreq, maxFreq, numChroma, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -42,7 +42,7 @@ FluidBufChroma : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, ref, normalize, minFreq, maxFreq, numChroma, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numChroma, numChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufHPSS.sc b/release-packaging/Classes/FluidBufHPSS.sc index d8913ad..5ec4f9d 100644 --- a/release-packaging/Classes/FluidBufHPSS.sc +++ b/release-packaging/Classes/FluidBufHPSS.sc @@ -9,7 +9,7 @@ FluidBufHPSS : FluidBufProcessor { residual = residual ? -1; source.isNil.if {"FluidBufHPSS: Invalid source buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufHPSSTrigger, -1, source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, harmFilterSize, percFilterSize, trig, blocking + ^FluidProxyUgen.kr(\FluidBufHPSSTrigger, -1, source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, harmFilterSize, percFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking ); } @@ -26,7 +26,7 @@ FluidBufHPSS : FluidBufProcessor { ^this.new( server, nil, [harmonic, percussive, residual].select{|x| x!= -1} ).processList( - [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, harmFilterSize, percFilterSize,0], freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, harmFilterSize, percFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone,action ); } @@ -44,7 +44,7 @@ FluidBufHPSS : FluidBufProcessor { ^this.new( server, nil, [harmonic, percussive, residual].select{|x| x!= -1} ).processList( - [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize,harmFilterSize, percFilterSize,1], freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, harmonic, percussive, residual, harmFilterSize, harmFilterSize, percFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone,action ); } diff --git a/release-packaging/Classes/FluidBufLoudness.sc b/release-packaging/Classes/FluidBufLoudness.sc index 8b15d68..6b95a20 100644 --- a/release-packaging/Classes/FluidBufLoudness.sc +++ b/release-packaging/Classes/FluidBufLoudness.sc @@ -1,7 +1,30 @@ FluidBufLoudness : FluidBufProcessor{ - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, trig = 1, blocking = 0| + + const (1< 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, trig = 1, blocking = 0| var maxwindowSize = windowSize.nextPowerOfTwo; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -9,13 +32,15 @@ FluidBufLoudness : FluidBufProcessor{ source.isNil.if {"FluidBufPitch: Invalid source buffer".throw}; features.isNil.if {"FluidBufPitch: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufLoudnessTrigger, -1, source, startFrame, numFrames, startChan, numChans, features,padding, kWeighting, truePeak, windowSize, hopSize, maxwindowSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufLoudnessTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action| + *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action| var maxwindowSize = windowSize.nextPowerOfTwo; - + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + source = source.asUGenInput; features = features.asUGenInput; @@ -25,13 +50,15 @@ FluidBufLoudness : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,0],freeWhenDone,action ); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action| + *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, padding = 1, freeWhenDone = true, action| var maxwindowSize = windowSize.nextPowerOfTwo; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -42,7 +69,7 @@ FluidBufLoudness : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features,padding, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features,padding, selectbits, kWeighting, truePeak, windowSize, hopSize, maxwindowSize,1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufMFCC.sc b/release-packaging/Classes/FluidBufMFCC.sc index aca9644..af29b39 100644 --- a/release-packaging/Classes/FluidBufMFCC.sc +++ b/release-packaging/Classes/FluidBufMFCC.sc @@ -8,7 +8,7 @@ FluidBufMFCC : FluidBufProcessor{ source.isNil.if {"FluidBufMFCC: Invalid source buffer".throw}; features.isNil.if {"FluidBufMFCC: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufMFCCTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numBands, startCoeff, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize,trig, blocking); + ^FluidProxyUgen.kr(\FluidBufMFCCTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,trig, blocking); } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone=true, action | @@ -23,7 +23,7 @@ FluidBufMFCC : FluidBufProcessor{ ^this.new( server, nil,[features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numBands, startCoeff, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,0],freeWhenDone,action ); } @@ -39,7 +39,7 @@ FluidBufMFCC : FluidBufProcessor{ ^this.new( server, nil,[features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numBands, startCoeff, minFreq, maxFreq, numCoeffs, windowSize, hopSize, fftSize, maxFFTSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numCoeffs, numCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize,1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufMelBands.sc b/release-packaging/Classes/FluidBufMelBands.sc index 469689e..1d2f8d9 100644 --- a/release-packaging/Classes/FluidBufMelBands.sc +++ b/release-packaging/Classes/FluidBufMelBands.sc @@ -11,7 +11,7 @@ FluidBufMelBands : FluidBufProcessor { features.isNil.if {"FluidBufMelBands: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufMelBandsTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numBands, minFreq, maxFreq, numBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufMelBandsTrigger,-1, source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| @@ -27,7 +27,7 @@ FluidBufMelBands : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, minFreq, maxFreq, numBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -44,7 +44,7 @@ FluidBufMelBands : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, minFreq, maxFreq, numBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, numBands, numBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufNMF.sc b/release-packaging/Classes/FluidBufNMF.sc index 40052d0..3ff00a2 100644 --- a/release-packaging/Classes/FluidBufNMF.sc +++ b/release-packaging/Classes/FluidBufNMF.sc @@ -1,16 +1,16 @@ FluidBufNMF : FluidBufProcessor { - *kr {|source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| + *kr {|source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth, resynthMode = 0, bases, basesMode = 0, activations, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| source.isNil.if {"FluidBufNMF: Invalid source buffer".throw}; resynth = resynth ? -1; bases = bases ? -1; activations = activations ? -1; - ^FluidProxyUgen.kr(\FluidBufNMFTrigger,-1,source.asUGenInput, startFrame, numFrames, startChan, numChans, resynth.asUGenInput, bases.asUGenInput, basesMode, activations.asUGenInput, actMode, components, iterations, windowSize, hopSize, fftSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNMFTrigger,-1,source.asUGenInput, startFrame, numFrames, startChan, numChans, resynth.asUGenInput, resynthMode, bases.asUGenInput, basesMode, activations.asUGenInput, actMode, components, iterations, windowSize, hopSize, fftSize, fftSize, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action| + *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, resynthMode = 0, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action| source.isNil.if {"FluidBufNMF: Invalid source buffer".throw}; resynth = resynth ? -1; @@ -19,10 +19,10 @@ FluidBufNMF : FluidBufProcessor ^this.new( server,nil,[resynth, bases, activations].select{|x| x!= -1} - ).processList([source, startFrame, numFrames, startChan, numChans, resynth, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize,0],freeWhenDone,action); + ).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone,action); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action| + *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, resynth = -1, resynthMode = 0, bases = -1, basesMode = 0, activations = -1, actMode = 0, components = 1, iterations = 100, windowSize = 1024, hopSize = -1, fftSize = -1,freeWhenDone = true, action| source.isNil.if {"FluidBufNMF: Invalid source buffer".throw}; resynth = resynth ? -1; @@ -31,7 +31,7 @@ FluidBufNMF : FluidBufProcessor ^this.new( server,nil,[resynth, bases, activations].select{|x| x!= -1} - ).processList([source, startFrame, numFrames, startChan, numChans, resynth, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, 1],freeWhenDone,action); + ).processList([source, startFrame, numFrames, startChan, numChans, resynth, resynthMode, bases, basesMode, activations, actMode, components,iterations, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone,action); } } FluidBufNMFTrigger : FluidProxyUgen {} diff --git a/release-packaging/Classes/FluidBufNMFCross.sc b/release-packaging/Classes/FluidBufNMFCross.sc index 3f0bce8..2312f62 100644 --- a/release-packaging/Classes/FluidBufNMFCross.sc +++ b/release-packaging/Classes/FluidBufNMFCross.sc @@ -9,7 +9,7 @@ FluidBufNMFCross : FluidBufProcessor { target.isNil.if {"FluidBufNMFCross: Invalid target buffer".throw}; output.isNil.if {"FluidBufNMFCross: Invalid output buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufNMFCrossTrigger, -1, source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNMFCrossTrigger, -1, source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, fftSize, trig, blocking); } *process { |server, source, target, output , timeSparsity = 7, polyphony = 10, continuity = 7, iterations = 50, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| @@ -25,7 +25,7 @@ FluidBufNMFCross : FluidBufProcessor { ^this.new( server, nil, [output] ).processList( - [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize,0],freeWhenDone, action + [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone, action ); } @@ -42,7 +42,7 @@ FluidBufNMFCross : FluidBufProcessor { ^this.new( server, nil, [output] ).processList( - [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize,1],freeWhenDone, action + [source, target, output, timeSparsity, polyphony, continuity, iterations, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone, action ); } } diff --git a/release-packaging/Classes/FluidBufNMFSeed.sc b/release-packaging/Classes/FluidBufNMFSeed.sc new file mode 100644 index 0000000..dca1fcd --- /dev/null +++ b/release-packaging/Classes/FluidBufNMFSeed.sc @@ -0,0 +1,48 @@ +FluidBufNMFSeed : FluidBufProcessor{ + + *kr { |source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| + + source.isNil.if {"FluidBufNMFSeed: Invalid source buffer".throw}; + bases.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + activations.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + source = source.asUGenInput; + bases = bases.asUGenInput; + activations = activations.asUGenInput; + + ^FluidProxyUgen.kr1(\FluidBufNMFSeedTrigger, -1, source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, trig, blocking); + } + + + *process { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| + + source.isNil.if {"FluidBufNMFSeed: Invalid source buffer".throw}; + bases.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + activations.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + source = source.asUGenInput; + bases = bases.asUGenInput; + activations = activations.asUGenInput; + + ^this.new( + server, nil, [bases,activations] + ).processList( + [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, 0],freeWhenDone, action + ) + } + + *processBlocking { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| + + source.isNil.if {"FluidBufNMFSeed: Invalid source buffer".throw}; + bases.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + activations.isNil.if {"FluidBufNMFSeed: Invalid bases buffer".throw}; + source = source.asUGenInput; + bases = bases.asUGenInput; + activations = activations.asUGenInput; + + ^this.new( + server, nil, [bases,activations] + ).processList( + [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, fftSize, 1],freeWhenDone, action + ) + } +} +FluidBufNMFSeedTrigger : FluidProxyUgen {} diff --git a/release-packaging/Classes/FluidBufNNDSVD.sc b/release-packaging/Classes/FluidBufNNDSVD.sc deleted file mode 100644 index 3aeb6ce..0000000 --- a/release-packaging/Classes/FluidBufNNDSVD.sc +++ /dev/null @@ -1,48 +0,0 @@ -FluidBufNNDSVD : FluidBufProcessor{ - - *kr { |source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, trig = 1, blocking = 0| - - source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; - bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - source = source.asUGenInput; - bases = bases.asUGenInput; - activations = activations.asUGenInput; - - ^FluidProxyUgen.kr1(\FluidBufNNDSVDTrigger, -1, source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize, trig, blocking); - } - - - *process { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - - source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; - bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - source = source.asUGenInput; - bases = bases.asUGenInput; - activations = activations.asUGenInput; - - ^this.new( - server, nil, [bases] - ).processList( - [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize,0],freeWhenDone, action - ) - } - - *processBlocking { |server, source, bases, activations, minComponents = 1, maxComponents = 200, coverage = 0.5, method = 0, windowSize = 1024, hopSize = -1, fftSize = -1, freeWhenDone = true, action| - - source.isNil.if {"FluidBufNNDSVD: Invalid source buffer".throw}; - bases.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - activations.isNil.if {"FluidBufNNDSVD: Invalid bases buffer".throw}; - source = source.asUGenInput; - bases = bases.asUGenInput; - activations = activations.asUGenInput; - - ^this.new( - server, nil, [bases] - ).processList( - [source, bases, activations, minComponents, maxComponents, coverage, method, windowSize, hopSize, fftSize,1],freeWhenDone, action - ) - } -} -FluidBufNNDSVDTrigger : FluidProxyUgen {} diff --git a/release-packaging/Classes/FluidBufNoveltyFeature.sc b/release-packaging/Classes/FluidBufNoveltyFeature.sc index 83b666c..868c37a 100644 --- a/release-packaging/Classes/FluidBufNoveltyFeature.sc +++ b/release-packaging/Classes/FluidBufNoveltyFeature.sc @@ -1,9 +1,5 @@ FluidBufNoveltyFeature : FluidBufProcessor { - *objectClassName{ - ^\FluidBufNoveltyF - } - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; @@ -14,7 +10,7 @@ FluidBufNoveltyFeature : FluidBufProcessor { source.isNil.if {"FluidBufNoveltyFeature: Invalid source buffer".throw}; features.isNil.if {"FluidBufNoveltyFeature: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufNoveltyFeatureTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNoveltyFeatureTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, kernelSize, filterSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } @@ -31,7 +27,7 @@ FluidBufNoveltyFeature : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, kernelSize, filterSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -48,7 +44,7 @@ FluidBufNoveltyFeature : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, kernelSize, kernelSize, filterSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufNoveltySlice.sc b/release-packaging/Classes/FluidBufNoveltySlice.sc index c4d36ab..b53820e 100644 --- a/release-packaging/Classes/FluidBufNoveltySlice.sc +++ b/release-packaging/Classes/FluidBufNoveltySlice.sc @@ -10,7 +10,7 @@ FluidBufNoveltySlice : FluidBufProcessor { source.isNil.if {"FluidBufNoveltySlice: Invalid source buffer".throw}; indices.isNil.if {"FluidBufNoveltySlice: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufNoveltySliceTrigger, -1, source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufNoveltySliceTrigger, -1, source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, kernelSize, threshold, filterSize, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } @@ -27,7 +27,7 @@ FluidBufNoveltySlice : FluidBufProcessor { ^this.new( server, nil, [indices] ).processList( - [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,0],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, kernelSize, threshold, filterSize, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, 0],freeWhenDone,action ); } @@ -44,7 +44,7 @@ FluidBufNoveltySlice : FluidBufProcessor { ^this.new( server, nil, [indices] ).processList( - [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, kernelSize, filterSize,1],freeWhenDone,action + [source, startFrame, numFrames, startChan, numChans, indices, algorithm, kernelSize, kernelSize, threshold, filterSize, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, 1],freeWhenDone,action ); } } diff --git a/release-packaging/Classes/FluidBufPitch.sc b/release-packaging/Classes/FluidBufPitch.sc index d62190b..86a0cb1 100644 --- a/release-packaging/Classes/FluidBufPitch.sc +++ b/release-packaging/Classes/FluidBufPitch.sc @@ -1,8 +1,30 @@ FluidBufPitch : FluidBufProcessor{ - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| + const (1< 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -10,14 +32,16 @@ FluidBufPitch : FluidBufProcessor{ source.isNil.if {"FluidBufPitch: Invalid source buffer".throw}; features.isNil.if {"FluidBufPitch: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(\FluidBufPitchTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufPitchTrigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + source = source.asUGenInput; features = features.asUGenInput; @@ -27,13 +51,15 @@ FluidBufPitch : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action ); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -44,7 +70,7 @@ FluidBufPitch : FluidBufProcessor{ ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action ); } } diff --git a/release-packaging/Classes/FluidBufSTFT.sc b/release-packaging/Classes/FluidBufSTFT.sc index 3726ef2..67245a0 100644 --- a/release-packaging/Classes/FluidBufSTFT.sc +++ b/release-packaging/Classes/FluidBufSTFT.sc @@ -10,7 +10,7 @@ FluidBufSTFT : FluidBufProcessor { phase = phase ? -1; resynth = resynth ? - 1; - ^FluidProxyUgen.kr(\FluidBufSTFTTrigger, -1, source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, trig, blocking); + ^FluidProxyUgen.kr(\FluidBufSTFTTrigger, -1, source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, -1, trig, blocking); } *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, magnitude, phase, resynth, inverse = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| @@ -26,7 +26,7 @@ FluidBufSTFT : FluidBufProcessor { ^this.new( server, nil, [magnitude,phase,resynth].select{|b| b != -1} ).processList( - [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, 0], freeWhenDone, action + [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, -1, 0], freeWhenDone, action ); } @@ -41,7 +41,7 @@ FluidBufSTFT : FluidBufProcessor { ^this.new( server, nil, [magnitude,phase,resynth].select{|b| b != -1} ).processList( - [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, 1], freeWhenDone, action + [source, startFrame, numFrames, startChan, magnitude, phase, resynth, inverse, padding, windowSize, hopSize, fftSize, -1, 1], freeWhenDone, action ); } } diff --git a/release-packaging/Classes/FluidBufSpectralShape.sc b/release-packaging/Classes/FluidBufSpectralShape.sc index 4eda3e7..6ef0b68 100644 --- a/release-packaging/Classes/FluidBufSpectralShape.sc +++ b/release-packaging/Classes/FluidBufSpectralShape.sc @@ -1,12 +1,9 @@ FluidBufSpectralShape : FluidBufProcessor { - *objectClassName{ - ^\FluidBufSpecShp - } - - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| + *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, trig = 1, blocking = 0| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {FluidSpectralShape.prProcessSelect(select)} ?? {FluidSpectralShape.prProcessSelect(FluidSpectralShape.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -14,13 +11,15 @@ FluidBufSpectralShape : FluidBufProcessor { source.isNil.if {"FluidBufSpectralShape: Invalid source buffer".throw}; features.isNil.if {"FluidBufSpectralShape: Invalid features buffer".throw}; - ^FluidProxyUgen.kr(this.objectClassName++\Trigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); + + ^FluidProxyUgen.kr(this.objectClassName++\Trigger, -1, source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, trig, blocking); } - *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *process { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {FluidSpectralShape.prProcessSelect(select)} ?? {FluidSpectralShape.prProcessSelect(FluidSpectralShape.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -31,13 +30,14 @@ FluidBufSpectralShape : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 0], freeWhenDone, action ); } - *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| + *processBlocking { |server, source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, features, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, padding = 1, freeWhenDone = true, action| var maxFFTSize = if (fftSize == -1) {windowSize.nextPowerOfTwo} {fftSize}; + var selectbits = select !? {FluidSpectralShape.prProcessSelect(select)} ?? {FluidSpectralShape.prProcessSelect(FluidSpectralShape.features)}; source = source.asUGenInput; features = features.asUGenInput; @@ -48,7 +48,7 @@ FluidBufSpectralShape : FluidBufProcessor { ^this.new( server, nil, [features] ).processList( - [source, startFrame, numFrames, startChan, numChans, features, padding, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action + [source, startFrame, numFrames, startChan, numChans, features, padding, selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize, 1], freeWhenDone, action ); } } diff --git a/release-packaging/Classes/FluidBufStats.sc b/release-packaging/Classes/FluidBufStats.sc index c181c9a..e0875fb 100644 --- a/release-packaging/Classes/FluidBufStats.sc +++ b/release-packaging/Classes/FluidBufStats.sc @@ -1,7 +1,28 @@ FluidBufStats : FluidBufProcessor { - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, stats, numDerivs = 0, low = 0, middle = 50, high = 100, outliersCutoff = -1, weights, trig = 1, blocking = 0| - + const 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (statslookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + *initClass { + statslookup = Dictionary.with(*this.stats.collect{|x,i| x->(1< 1,{ - ^numFrames.collect{ + ^numFrames.asInteger.collect{ arg i; BufRd.kr(1,buffer,i+startFrame,0,0); } diff --git a/release-packaging/Classes/FluidBufTransientSlice.sc b/release-packaging/Classes/FluidBufTransientSlice.sc index 38ff7a7..81bff0c 100644 --- a/release-packaging/Classes/FluidBufTransientSlice.sc +++ b/release-packaging/Classes/FluidBufTransientSlice.sc @@ -1,7 +1,5 @@ FluidBufTransientSlice : FluidBufProcessor { - *objectClassName{^\FluidBufTrSlice} - *kr { |source, startFrame = 0, numFrames = -1, startChan = 0, numChans = -1, indices, order = 20, blockSize = 256, padSize = 128, skew = 0, threshFwd = 2, threshBack = 1.1, windowSize = 14, clumpLength = 25, minSliceLength = 1000, trig = 1, blocking = 0| source = source.asUGenInput; diff --git a/release-packaging/Classes/FluidChroma.sc b/release-packaging/Classes/FluidChroma.sc index 50c1a7a..b604f2d 100644 --- a/release-packaging/Classes/FluidChroma.sc +++ b/release-packaging/Classes/FluidChroma.sc @@ -1,20 +1,23 @@ FluidChroma : FluidRTMultiOutUGen { - *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumChroma = 120, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numChroma, ref, normalize, minFreq, maxFreq, maxNumChroma, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numChroma = 12, ref = 440, normalize = 0, minFreq = 0, maxFreq = -1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxNumChroma; + + maxNumChroma = maxNumChroma ? numChroma; + + ^this.multiNew('control', in.asAudioRateInput(this), numChroma, maxNumChroma, ref, normalize, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - ^this.initOutputs(inputs.at(6),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(2),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { // the checks of rates here are in the order of the kr method definition - if(inputs.at(10).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxNumChroma cannot be modulated."); }; - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); };^this.checkValidInputs; } diff --git a/release-packaging/Classes/FluidHPSS.sc b/release-packaging/Classes/FluidHPSS.sc index 8fecd18..a2960e5 100644 --- a/release-packaging/Classes/FluidHPSS.sc +++ b/release-packaging/Classes/FluidHPSS.sc @@ -1,6 +1,10 @@ FluidHPSS : FluidRTMultiOutUGen { - *ar { arg in = 0, harmFilterSize=17, percFilterSize = 31, maskingMode=0, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384, maxHarmFilterSize = 101, maxPercFilterSize = 101; - ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, percFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize, maxHarmFilterSize, maxPercFilterSize) + *ar { arg in = 0, harmFilterSize=17, percFilterSize = 31, maskingMode=0, harmThreshFreq1 = 0.1, harmThreshAmp1 = 0, harmThreshFreq2 = 0.5, harmThreshAmp2 = 0, percThreshFreq1 = 0.1, percThreshAmp1 = 0, percThreshFreq2 = 0.5, percThreshAmp2 = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = -1, maxHarmFilterSize, maxPercFilterSize; + + maxHarmFilterSize = maxHarmFilterSize ? harmFilterSize; + maxPercFilterSize = maxPercFilterSize ? percFilterSize; + + ^this.multiNew('audio', in.asAudioRateInput(this), harmFilterSize, maxHarmFilterSize, percFilterSize, maxPercFilterSize, maskingMode, harmThreshFreq1, harmThreshAmp1, harmThreshFreq2, harmThreshAmp2, percThreshFreq1, percThreshAmp1, percThreshFreq2, percThreshAmp2, windowSize, hopSize, fftSize, maxFFTSize) } init { arg ... theInputs; inputs = theInputs; @@ -12,13 +16,13 @@ FluidHPSS : FluidRTMultiOutUGen { ^channels } checkInputs { - if(inputs.at(15).rate != 'scalar') { + if(inputs.at(17).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; - if(inputs.at(16).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxHarmFilterSize cannot be modulated."); }; - if(inputs.at(17).rate != 'scalar') { + if(inputs.at(4).rate != 'scalar') { ^(": maxPercFilterSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidKDTree.sc b/release-packaging/Classes/FluidKDTree.sc index 8ce1aac..3dc3c04 100644 --- a/release-packaging/Classes/FluidKDTree.sc +++ b/release-packaging/Classes/FluidKDTree.sc @@ -24,13 +24,16 @@ FluidKDTree : FluidModelObject this.prSendMsg(this.fitMsg(dataSet)); } - kNearestMsg{|buffer| - ^this.prMakeMsg(\kNearest,id,this.prEncodeBuffer(buffer)); + kNearestMsg{|buffer,k| + k !? + {^this.prMakeMsg(\kNearest,id,this.prEncodeBuffer(buffer),k);} + ?? + {^this.prMakeMsg(\kNearest,id,this.prEncodeBuffer(buffer));} } - kNearest{ |buffer, action| + kNearest{ |buffer, k, action| actions[\kNearest] = [strings(FluidMessageResponse,_,_),action]; - this.prSendMsg(this.kNearestMsg(buffer)); + this.prSendMsg(this.kNearestMsg(buffer,k)); } kNearestDistMsg {|buffer| diff --git a/release-packaging/Classes/FluidLoudness.sc b/release-packaging/Classes/FluidLoudness.sc index f5ca703..4018dc9 100644 --- a/release-packaging/Classes/FluidLoudness.sc +++ b/release-packaging/Classes/FluidLoudness.sc @@ -1,15 +1,41 @@ FluidLoudness : FluidRTMultiOutUGen { - *kr { arg in = 0, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, maxWindowSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), kWeighting, truePeak, windowSize, hopSize, maxWindowSize); + + const (1< 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + *kr { arg in = 0, select, kWeighting = 1, truePeak = 1, windowSize = 1024, hopSize = 512, maxWindowSize = 16384; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + + ^this.multiNew('control', in.asAudioRateInput(this), selectbits, kWeighting, truePeak, windowSize, hopSize, maxWindowSize); } - init {arg ...theInputs; + init {arg ...theInputs; + var numChannels; inputs = theInputs; - ^this.initOutputs(2,rate); + numChannels = inputs.at(1).asBinaryDigits.sum; + ^this.initOutputs(numChannels,rate); } checkInputs { - if(inputs.at(5).rate != 'scalar') { + if(inputs.at(6).rate != 'scalar') { ^(": maxwindowSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidMFCC.sc b/release-packaging/Classes/FluidMFCC.sc index ac1f695..b392fcd 100644 --- a/release-packaging/Classes/FluidMFCC.sc +++ b/release-packaging/Classes/FluidMFCC.sc @@ -1,18 +1,21 @@ FluidMFCC : FluidRTMultiOutUGen { - *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumCoeffs = 13, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, numBands, startCoeff, minFreq, maxFreq, maxNumCoeffs, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numCoeffs = 13, numBands = 40, startCoeff = 0, minFreq = 20, maxFreq = 20000, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxNumCoeffs = nil; + + maxNumCoeffs = maxNumCoeffs ? numCoeffs; + + ^this.multiNew('control', in.asAudioRateInput(this), numCoeffs, maxNumCoeffs, numBands, startCoeff, minFreq, maxFreq, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - ^this.initOutputs(inputs.at(6),rate);//this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(2),rate);//this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { // the checks of rates here are in the order of the kr method definition - if(inputs.at(6).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxNumCoeffs cannot be modulated."); }; if(inputs.at(10).rate != 'scalar') { diff --git a/release-packaging/Classes/FluidMLP.sc b/release-packaging/Classes/FluidMLP.sc index e486d99..7939f75 100644 --- a/release-packaging/Classes/FluidMLP.sc +++ b/release-packaging/Classes/FluidMLP.sc @@ -5,12 +5,12 @@ FluidMLPRegressor : FluidModelObject { const hidden, <>activation, <>outputActivation, <>tapIn, <>tapOut, <>maxIter, <>learnRate, <>momentum, <>batchSize, <>validation; + var <>hiddenLayers, <>activation, <>outputActivation, <>tapIn, <>tapOut, <>maxIter, <>learnRate, <>momentum, <>batchSize, <>validation; - *new {|server, hidden = #[3,3] , activation = 2, outputActivation = 0, tapIn = 0, tapOut = -1,maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| + *new {|server, hiddenLayers = #[3,3] , activation = 2, outputActivation = 0, tapIn = 0, tapOut = -1,maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| - ^super.new(server, [hidden.size] ++ hidden ++ [activation, outputActivation, tapIn, tapOut, maxIter, learnRate, momentum, batchSize, validation]) - .hidden_(hidden) + ^super.new(server, [hiddenLayers.size] ++ hiddenLayers ++ [activation, outputActivation, tapIn, tapOut, maxIter, learnRate, momentum, batchSize, validation]) + .hiddenLayers_(hiddenLayers) .activation_(activation) .outputActivation_(outputActivation) .tapIn_(tapIn) @@ -23,7 +23,7 @@ FluidMLPRegressor : FluidModelObject { } prGetParams{ - ^[this.id, this.hidden.size] ++ this.hidden ++ [this.activation, this.outputActivation, this.tapIn, this.tapOut, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation] + ^[this.id, this.hiddenLayers.size] ++ this.hiddenLayers ++ [this.activation, this.outputActivation, this.tapIn, this.tapOut, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation] } clearMsg{ ^this.prMakeMsg(\clear, id) } @@ -89,7 +89,7 @@ FluidMLPRegressor : FluidModelObject { prUpdateParams{|data| var rest = data.keep(-9); - this.hidden_(data.drop(1).drop(-9).copy); + this.hiddenLayers_(data.drop(1).drop(-9).copy); [\activation_, \outputActivation_, \tapIn_, \tapOut_, \maxIter_, \learnRate_, \momentum_, @@ -120,11 +120,11 @@ FluidMLPClassifier : FluidModelObject { const hidden, <>activation, <> maxIter, <>learnRate, <> momentum, <>batchSize, <>validation; + var <>hiddenLayers, <>activation, <> maxIter, <>learnRate, <> momentum, <>batchSize, <>validation; - *new {|server, hidden = #[3,3] , activation = 2, maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| - ^super.new(server,[hidden.size] ++ hidden ++ [activation, maxIter, learnRate, momentum, batchSize, validation]) - .hidden_(hidden) + *new {|server, hiddenLayers = #[3,3] , activation = 2, maxIter = 1000, learnRate = 0.0001, momentum = 0.9, batchSize = 50, validation = 0.2| + ^super.new(server,[hiddenLayers.size] ++ hiddenLayers ++ [activation, maxIter, learnRate, momentum, batchSize, validation]) + .hiddenLayers_(hiddenLayers) .activation_(activation) .maxIter_(maxIter) .learnRate_(learnRate) @@ -134,7 +134,7 @@ FluidMLPClassifier : FluidModelObject { } prGetParams{ - ^[this.id, this.hidden.size] ++ this.hidden ++ [this.activation, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation]; + ^[this.id, this.hiddenLayers.size] ++ this.hiddenLayers ++ [this.activation, this.maxIter, this.learnRate, this.momentum, this.batchSize, this.validation]; } clearMsg{ ^this.prMakeMsg(\clear,id) } @@ -183,7 +183,7 @@ FluidMLPClassifier : FluidModelObject { prUpdateParams{|data| var rest = data.keep(-6); - this.hidden_(data.drop(1).drop(-6).copy); + this.hiddenLayers_(data.drop(1).drop(-6).copy); [\activation_, \maxIter_, \learnRate_, \momentum_, \batchSize_, \validation_] diff --git a/release-packaging/Classes/FluidMelBands.sc b/release-packaging/Classes/FluidMelBands.sc index a2c6b2e..486477f 100644 --- a/release-packaging/Classes/FluidMelBands.sc +++ b/release-packaging/Classes/FluidMelBands.sc @@ -1,20 +1,23 @@ FluidMelBands : FluidRTMultiOutUGen { - *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxNumBands = 120, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), numBands, minFreq, maxFreq, maxNumBands, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, numBands = 40, minFreq = 20, maxFreq = 20000, normalize = 1, scale = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxNumBands; + + maxNumBands = maxNumBands ? numBands; + + ^this.multiNew('control', in.asAudioRateInput(this), numBands, maxNumBands, minFreq, maxFreq, normalize, scale, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; inputs = theInputs; - ^this.initOutputs(inputs.at(4),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order + ^this.initOutputs(inputs.at(2),rate); //this instantiate the number of output from the maxNumCoeffs in the multiNew order } checkInputs { // the checks of rates here are in the order of the kr method definition - if(inputs.at(10).rate != 'scalar') { + if(inputs.at(2).rate != 'scalar') { ^(": maxNumBands cannot be modulated."); }; - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); };^this.checkValidInputs; } diff --git a/release-packaging/Classes/FluidNMFFilter.sc b/release-packaging/Classes/FluidNMFFilter.sc index 75a0f74..6c60c49 100644 --- a/release-packaging/Classes/FluidNMFFilter.sc +++ b/release-packaging/Classes/FluidNMFFilter.sc @@ -1,7 +1,7 @@ FluidNMFFilter : FluidRTMultiOutUGen { - *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); + *ar { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + ^this.multiNew('audio', in.asAudioRateInput(this), bases, maxComponents, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; @@ -10,10 +10,10 @@ FluidNMFFilter : FluidRTMultiOutUGen { } checkInputs { - if(inputs.at(2).rate != 'scalar') { + if(inputs.at(3).rate != 'scalar') { ^(": maxComponents cannot be modulated."); }; - if(inputs.at(7).rate != 'scalar') { + if(inputs.at(8).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidNMFMatch.sc b/release-packaging/Classes/FluidNMFMatch.sc index 16dd827..a0904a6 100644 --- a/release-packaging/Classes/FluidNMFMatch.sc +++ b/release-packaging/Classes/FluidNMFMatch.sc @@ -1,7 +1,7 @@ FluidNMFMatch : FluidRTMultiOutUGen { - *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); + *kr { arg in = 0, bases, maxComponents = 1, iterations = 10, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + ^this.multiNew('control', in.asAudioRateInput(this), bases, maxComponents, maxComponents, iterations, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; @@ -10,10 +10,10 @@ FluidNMFMatch : FluidRTMultiOutUGen { } checkInputs { - if(inputs.at(2).rate != 'scalar') { + if(inputs.at(3).rate != 'scalar') { ^(": maxComponents cannot be modulated."); }; - if(inputs.at(7).rate != 'scalar') { + if(inputs.at(8).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidNMFMorph.sc b/release-packaging/Classes/FluidNMFMorph.sc index ed95f43..21611e2 100644 --- a/release-packaging/Classes/FluidNMFMorph.sc +++ b/release-packaging/Classes/FluidNMFMorph.sc @@ -1,12 +1,12 @@ FluidNMFMorph : FluidRTUGen { - *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interp = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; + *ar { arg source = -1, target = -1, activations = -1, autoassign = 1, interpolation = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; source = source ?? {-1}; target = target ?? {-1}; activations = activations ?? {-1}; - ^this.new1('audio', source, target, activations, autoassign, interp, windowSize, hopSize, fftSize, maxFFTSize); + ^this.new1('audio', source, target, activations, autoassign, interpolation, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; diff --git a/release-packaging/Classes/FluidNormalize.sc b/release-packaging/Classes/FluidNormalize.sc index 21cdea4..e7e40bf 100644 --- a/release-packaging/Classes/FluidNormalize.sc +++ b/release-packaging/Classes/FluidNormalize.sc @@ -1,14 +1,14 @@ FluidNormalize : FluidModelObject { - var <>min, <>max, <>invert; + var <>min, <>max; - *new {|server, min = 0, max = 1, invert = 0| - ^super.new(server,[min,max,invert]) - .min_(min).max_(max).invert_(invert); + *new {|server, min = 0, max = 1| + ^super.new(server,[min,max]) + .min_(min).max_(max); } prGetParams{ - ^[this.id, this.min,this.max,this.invert,-1,-1]; + ^[this.id, this.min,this.max,-1,-1]; } @@ -52,16 +52,37 @@ FluidNormalize : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer, destBuffer)); } + inverseTransformMsg{|sourceDataSet, destDataSet| + ^this.prMakeMsg(\inverseTransform,id,sourceDataSet.id,destDataSet.id); + } + + inverseTransform{|sourceDataSet, destDataSet, action| + actions[\inverseTransform] = [nil,action]; + this.prSendMsg(this.inverseTransformMsg(sourceDataSet, destDataSet)); + } + + inverseTransformPointMsg{|sourceBuffer, destBuffer| + ^this.prMakeMsg(\inverseTransformPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(destBuffer), + ["/b_query",destBuffer.asUGenInput] + ); + } + + inverseTransformPoint{|sourceBuffer, destBuffer, action| + actions[\inverseTransformPoint] = [nil,{action.value(destBuffer)}]; + this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer)); + } + kr{|trig, inputBuffer,outputBuffer,min = 0 ,max = 1,invert = 0| min = min ? this.min; max = max ? this.max; - invert = invert ? this.invert; - this.min_(min).max_(max).invert_(invert); + this.min_(min).max_(max); ^FluidNormalizeQuery.kr(trig, - this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.min, this.max, this.invert); + this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.min, this.max, invert); } diff --git a/release-packaging/Classes/FluidNoveltyFeature.sc b/release-packaging/Classes/FluidNoveltyFeature.sc index ce6a0f4..ddb6313 100644 --- a/release-packaging/Classes/FluidNoveltyFeature.sc +++ b/release-packaging/Classes/FluidNoveltyFeature.sc @@ -1,15 +1,20 @@ FluidNoveltyFeature : FluidRTUGen { - *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100; - ^this.multiNew('control', in.asAudioRateInput(this), algorithm, kernelSize, filterSize, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize) + *kr { arg in = 0, algorithm = 0, kernelSize = 3, filterSize = 1, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1, maxKernelSize, maxFilterSize; + + maxKernelSize = maxKernelSize ? kernelSize; + maxFilterSize = maxFilterSize ? filterSize; + + ^this.multiNew('control', in.asAudioRateInput(this), algorithm, kernelSize, maxKernelSize, filterSize, maxFilterSize, windowSize, hopSize, fftSize, maxFFTSize) } + checkInputs { - if(inputs.at(6).rate != 'scalar') { + if(inputs.at(9).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; - if(inputs.at(7).rate != 'scalar') { + if(inputs.at(3).rate != 'scalar') { ^(": maxKernelSize cannot be modulated."); }; - if(inputs.at(8).rate != 'scalar') { + if(inputs.at(5).rate != 'scalar') { ^(": maxFilterSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidNoveltySlice.sc b/release-packaging/Classes/FluidNoveltySlice.sc index bdf36c6..9dd78df 100644 --- a/release-packaging/Classes/FluidNoveltySlice.sc +++ b/release-packaging/Classes/FluidNoveltySlice.sc @@ -1,15 +1,27 @@ FluidNoveltySlice : FluidRTUGen { - *ar { arg in = 0, algorithm = 0, kernelSize = 3, threshold = 0.8, filterSize = 1, minSliceLength = 2, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384, maxKernelSize = 101, maxFilterSize = 100; - ^this.multiNew('audio', in.asAudioRateInput(this), algorithm, kernelSize, threshold, filterSize, minSliceLength, windowSize, hopSize, fftSize, maxFFTSize, maxKernelSize, maxFilterSize) + + const numDimensions; + var <>numDimensions, <>whiten; - *new {|server, numDimensions = 2| - ^super.new(server,[numDimensions]).numDimensions_(numDimensions); + *new {|server, numDimensions = 2, whiten = 0| + ^super.new(server,[numDimensions, whiten]).numDimensions_(numDimensions).whiten_(whiten); } prGetParams{ - ^[this.id, numDimensions]; + ^[this.id, numDimensions, whiten]; } fitMsg{|dataSet| @@ -55,7 +55,7 @@ FluidPCA : FluidModelObject{ numDimensions = numDimensions ? this.numDimensions; this.numDimensions_(numDimensions); - ^FluidPCAQuery.kr(trig ,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.numDimensions); + ^FluidPCAQuery.kr(trig ,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.numDimensions, this.whiten); } inverseTransformPointMsg{|sourceBuffer, destBuffer| @@ -71,12 +71,22 @@ FluidPCA : FluidModelObject{ this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer,destBuffer)); } + inverseTransformMsg{|sourceDataSet, destDataSet| + ^this.prMakeMsg(\inverseTransform,id,sourceDataSet.id, destDataSet.id); + } + + inverseTransform{|sourceDataSet, destDataSet,action| + actions[\inverseTransform] = [nil,action]; + this.prSendMsg(this.inverseTransformMsg(sourceDataSet, destDataSet)); + } + + } FluidPCAQuery : FluidRTMultiOutUGen { - *kr{ |trig, model, inputBuffer,outputBuffer,numDimensions| + *kr{ |trig, model, inputBuffer,outputBuffer,numDimensions, whiten| ^this.multiNew('control',trig, model.asUGenInput, - numDimensions, + numDimensions, whiten, inputBuffer.asUGenInput, outputBuffer.asUGenInput) } @@ -84,4 +94,4 @@ FluidPCAQuery : FluidRTMultiOutUGen { inputs = theInputs; ^this.initOutputs(1, rate); } -} \ No newline at end of file +} diff --git a/release-packaging/Classes/FluidPitch.sc b/release-packaging/Classes/FluidPitch.sc index 3e6b676..da15c3f 100644 --- a/release-packaging/Classes/FluidPitch.sc +++ b/release-packaging/Classes/FluidPitch.sc @@ -1,16 +1,42 @@ FluidPitch : FluidRTMultiOutUGen { - *kr { arg in = 0, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize); + const (1< 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + + *kr { arg in = 0, select, algorithm = 2, minFreq = 20, maxFreq = 10000, unit = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + + ^this.multiNew('control', in.asAudioRateInput(this), selectbits, algorithm, minFreq, maxFreq, unit, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; + var numChannels; inputs = theInputs; - ^this.initOutputs(2,rate); + numChannels = inputs.at(1).asBinaryDigits.sum; + ^this.initOutputs(numChannels,rate); } checkInputs { - if(inputs.at(5).rate != 'scalar') { + if(inputs.at(9).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidPlotter.sc b/release-packaging/Classes/FluidPlotter.sc index b6f3e5c..d78a474 100644 --- a/release-packaging/Classes/FluidPlotter.sc +++ b/release-packaging/Classes/FluidPlotter.sc @@ -2,36 +2,28 @@ FluidPlotterPoint { var id, color, <>size = 1; *new { - arg id, x, y, color, size = 1; - ^super.new.init(id,x,y,color,size); - } - - init { - arg id_, x_, y_, color_, size_ = 1; - id = id_; - x = x_; - y = y_; - color = color_ ? Color.black; - size = size_; + arg id, x, y, color(Color.black), size = 1; + ^super.newCopyArgs(id,x,y,color,size); } } FluidPlotter : FluidViewer { - var low, <>high, <>invert; + var <>low, <>high; - *new {|server, low = 25, high = 75, invert = 0| - ^super.new(server,[low,high,invert]) - .low_(low).high_(high).invert_(invert); + *new {|server, low = 25, high = 75| + ^super.new(server,[low,high]) + .low_(low).high_(high); } prGetParams{ - ^[this.id,this.low,this.high,this.invert]; + ^[this.id,this.low,this.high]; } @@ -52,13 +52,31 @@ FluidRobustScale : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer, destBuffer)); } - kr{|trig, inputBuffer,outputBuffer,invert| + inverseTransformMsg{|sourceDataSet, destDataSet| + ^this.prMakeMsg(\inverseTransform,id,sourceDataSet.id,destDataSet.id); + } + + inverseTransform{|sourceDataSet, destDataSet, action| + actions[\inverseTransform] = [nil,action]; + this.prSendMsg(this.inverseTransformMsg(sourceDataSet, destDataSet)); + } + + inverseTransformPointMsg{|sourceBuffer, destBuffer| + ^this.prMakeMsg(\inverseTransformPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(destBuffer), + ["/b_query",destBuffer.asUGenInput] + ); + } - invert = invert ? this.invert; + inverseTransformPoint{|sourceBuffer, destBuffer, action| + actions[\inverseRransformPoint] = [nil,{action.value(destBuffer)}]; + this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer)); + } - // this.invert_(invert); + kr{|trig, inputBuffer,outputBuffer,invert = 0| - ^FluidRobustScaleQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), invert,); + ^FluidRobustScaleQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), invert); } diff --git a/release-packaging/Classes/FluidSKMeans.sc b/release-packaging/Classes/FluidSKMeans.sc new file mode 100644 index 0000000..f53d450 --- /dev/null +++ b/release-packaging/Classes/FluidSKMeans.sc @@ -0,0 +1,136 @@ +FluidSKMeans : FluidModelObject { + + var clusters, threshold, maxiter; + + *new {|server, numClusters = 4, encodingThreshold = 0.25, maxIter = 100| + ^super.new(server,[numClusters,maxIter, encodingThreshold]) + .numClusters_(numClusters) + .encodingThreshold_(encodingThreshold) + .maxIter_(maxIter); + } + + numClusters_{|n| clusters = n.asInteger} + numClusters{ ^clusters } + + encodingThreshold_{|t| threshold = t.asFloat} + encodingThreshold{ ^threshold } + + maxIter_{|i| maxiter = i.asInteger} + maxIter{ ^maxiter } + + + prGetParams{^[this.id,this.numClusters, this.encodingThreshold, this.maxIter];} + + fitMsg{ |dataSet| ^this.prMakeMsg(\fit,id,dataSet.id);} + + fit{|dataSet, action| + actions[\fit] = [ + numbers( FluidMessageResponse, _, this.numClusters ,_), + action + ]; + this.prSendMsg(this.fitMsg(dataSet)); + } + + fitPredictMsg{|dataSet, labelSet| + ^this.prMakeMsg(\fitPredict, id, dataSet.id, labelSet.id) + } + + fitPredict{|dataSet, labelSet,action| + actions[\fitPredict] = [ + numbers(FluidMessageResponse, _, this.numClusters, _), + action + ]; + this.prSendMsg(this.fitPredictMsg(dataSet,labelSet)); + } + + predictMsg{|dataSet, labelSet| + ^this.prMakeMsg(\predict, id, dataSet.id, labelSet.id) + } + + predict{ |dataSet, labelSet, action| + actions[\predict] = [ + numbers(FluidMessageResponse, _, this.numClusters, _), + action + ]; + this.prSendMsg(this.predictMsg(dataSet,labelSet)); + } + + predictPointMsg{|buffer| + ^this.prMakeMsg(\predictPoint, id, this.prEncodeBuffer(buffer)) + } + + predictPoint { |buffer, action| + actions[\predictPoint] = [number(FluidMessageResponse,_,_),action]; + this.prSendMsg(this.predictPointMsg(buffer)) + } + + fitEncodeMsg{|srcDataSet, dstDataSet| + ^this.prMakeMsg(\fitEncode, id, srcDataSet.id, dstDataSet.id) + } + + fitEncode{|srcDataSet, dstDataSet,action| + actions[\fitEncode] = [nil,action]; + this.prSendMsg(this.fitEncodeMsg(srcDataSet,dstDataSet)); + } + + encodeMsg{|srcDataSet, dstDataSet| + ^this.prMakeMsg(\encode, id, srcDataSet.id, dstDataSet.id) + } + + encode{ |srcDataSet, dstDataSet, action| + actions[\encode] = [nil,action]; + this.prSendMsg(this.encodeMsg(srcDataSet,dstDataSet)); + } + + encodePointMsg{ |sourceBuffer, targetBuffer| + ^this.prMakeMsg(\encodePoint, id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(targetBuffer), + ["/b_query", targetBuffer.asUGenInput]); + } + + encodePoint { |sourceBuffer, targetBuffer, action| + actions[\encodePoint] = [nil,{action.value(targetBuffer)}]; + this.prSendMsg(this.encodePointMsg(sourceBuffer, targetBuffer)); + } + + getMeansMsg{|dataSet| ^this.prMakeMsg(\getMeans, id, dataSet.asUGenInput) } + + getMeans{ |dataSet, action| + actions[\getMeans] = [nil, action]; + this.prSendMsg(this.getMeansMsg(dataSet)); + } + + setMeansMsg{|dataSet| ^this.prMakeMsg(\setMeans, id, dataSet.asUGenInput) } + + setMeans{ |dataSet, action| + actions[\setMeans] = [nil, action]; + this.prSendMsg(this.setMeansMsg(dataSet)); + } + + clearMsg{ ^this.prMakeMsg(\clear, id) } + + clear{ |action| + actions[\clear] = [nil, action]; + this.prSendMsg(this.clearMsg); + } + + kr{|trig, inputBuffer,outputBuffer| + ^FluidSKMeansQuery.kr(trig, + this, + this.prEncodeBuffer(inputBuffer), + this.prEncodeBuffer(outputBuffer)); + } +} + +FluidSKMeansQuery : FluidRTMultiOutUGen { + + *kr{ |trig, model,inputBuffer, outputBuffer | + ^this.multiNew('control',trig, model.asUGenInput,inputBuffer.asUGenInput, outputBuffer.asUGenInput) + } + + init { arg ... theInputs; + inputs = theInputs; + ^this.initOutputs(1, rate); + } +} diff --git a/release-packaging/Classes/FluidSTFTPass.sc b/release-packaging/Classes/FluidSTFTPass.sc index c79d600..da49806 100644 --- a/release-packaging/Classes/FluidSTFTPass.sc +++ b/release-packaging/Classes/FluidSTFTPass.sc @@ -1,6 +1,6 @@ FluidSTFTPass : FluidRTUGen { - *ar { arg in = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = 16384; - ^this.multiNew('audio', in.asAudioRateInput(this), windowSize, hopSize, fftSize, maxFFTSize) + *ar { arg in = 0, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize; + ^this.multiNew('audio', in.asAudioRateInput(this), windowSize, hopSize = -1, fftSize = -1, maxFFTSize = -1) } checkInputs { if(inputs.at(4).rate != 'scalar') { diff --git a/release-packaging/Classes/FluidServerObject.sc b/release-packaging/Classes/FluidServerObject.sc index 66625fc..2fa5970 100644 --- a/release-packaging/Classes/FluidServerObject.sc +++ b/release-packaging/Classes/FluidServerObject.sc @@ -30,8 +30,7 @@ FluidServerObject *newMsg{|id, params| params = params !? {params.collect(_.asUGenInput)}; - // ("Newms"++params).postln; - ^['/cmd',this.objectClassName ++ '/new',id] ++ params + ^this.prMakeMsg(\new,id,*params); } *new{ |server, id, params, action, callNew = true| @@ -55,10 +54,13 @@ FluidServerObject serverCaches[this.class].remove(server,id); } - prMakeMsg{|msg,id...args| - ^['/cmd',"%/%".format(this.class.objectClassName,msg),id].addAll(args); + *prMakeMsg{|msg,id...args| + var commandName = "%/%".format(this.objectClassName,msg); + ^['/cmd', this.objectClassName,commandName,id].addAll(args); } + prMakeMsg{|msg,id...args| ^this.class.prMakeMsg(msg,id,*args) } + freeMsg { var msg; id ?? {" % already freed".format(this.class.name).warn; ^nil}; diff --git a/release-packaging/Classes/FluidSines.sc b/release-packaging/Classes/FluidSines.sc index a85d2a0..04d98ce 100755 --- a/release-packaging/Classes/FluidSines.sc +++ b/release-packaging/Classes/FluidSines.sc @@ -1,5 +1,5 @@ FluidSines : FluidRTMultiOutUGen { - *ar { arg in = 0, bandwidth = 76, detectionThreshold = -96, birthLowThreshold = -24, birthHighThreshold = -60, minTrackLen = 15, trackingMethod = 0, trackMagRange = 15, trackFreqRange = 50, trackProb = 0.5, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize=16384; + *ar { arg in = 0, bandwidth = 76, detectionThreshold = -96, birthLowThreshold = -24, birthHighThreshold = -60, minTrackLen = 15, trackingMethod = 0, trackMagRange = 15, trackFreqRange = 50, trackProb = 0.5, windowSize= 1024, hopSize= -1, fftSize= -1, maxFFTSize = -1; ^this.multiNew('audio', in.asAudioRateInput(this), bandwidth, detectionThreshold,birthLowThreshold, birthHighThreshold, minTrackLen, trackingMethod, trackMagRange, trackFreqRange, trackProb, windowSize, hopSize, fftSize, maxFFTSize) } init { arg ... theInputs; diff --git a/release-packaging/Classes/FluidSpectralShape.sc b/release-packaging/Classes/FluidSpectralShape.sc index 0914990..8a0e4bf 100644 --- a/release-packaging/Classes/FluidSpectralShape.sc +++ b/release-packaging/Classes/FluidSpectralShape.sc @@ -1,16 +1,42 @@ FluidSpectralShape : FluidRTMultiOutUGen { - *kr { arg in = 0, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = 16384; - ^this.multiNew('control', in.asAudioRateInput(this), minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize); + const (1< 1) { ("Option '" ++ item ++ "' is repeated").warn}; + }; + bits = a.collect{ |sym| + (featuresLookup[sym.asSymbol] !? {|x| x} ?? {this.prWarnUnrecognised(sym); 0}) + }.reduce{|x,y| x | y}; + ^bits + } + + + *kr { arg in = 0, select, minFreq = 0, maxFreq = -1, rolloffPercent = 95, unit = 0, power = 0, windowSize = 1024, hopSize = -1, fftSize = -1, maxFFTSize = -1; + + var selectbits = select !? {this.prProcessSelect(select)} ?? {this.prProcessSelect(this.features)}; + + ^this.multiNew('control', in.asAudioRateInput(this), selectbits, minFreq, maxFreq, rolloffPercent, unit, power, windowSize, hopSize, fftSize, maxFFTSize); } init {arg ...theInputs; + var numChannels; inputs = theInputs; - ^this.initOutputs(7,rate); + numChannels = inputs.at(1).asBinaryDigits.sum; + ^this.initOutputs(numChannels,rate); } checkInputs { - if(inputs.at(9).rate != 'scalar') { + if(inputs.at(10).rate != 'scalar') { ^(": maxFFTSize cannot be modulated."); }; ^this.checkValidInputs; diff --git a/release-packaging/Classes/FluidStandardize.sc b/release-packaging/Classes/FluidStandardize.sc index b4127b8..05f0f4a 100644 --- a/release-packaging/Classes/FluidStandardize.sc +++ b/release-packaging/Classes/FluidStandardize.sc @@ -1,13 +1,11 @@ FluidStandardize : FluidModelObject { - var <>invert; - - *new {|server, invert = 0| - ^super.new(server,[invert]).invert_(invert); + *new {|server| + ^super.new(server,[]); } prGetParams{ - ^[this.id, this.invert]; + ^[this.id]; } fitMsg{|dataSet| @@ -47,12 +45,31 @@ FluidStandardize : FluidModelObject { this.prSendMsg(this.transformPointMsg(sourceBuffer,destBuffer)); } - kr{|trig, inputBuffer,outputBuffer,invert| + inverseTransformMsg{|sourceDataSet, destDataSet| + ^this.prMakeMsg(\inverseTransform,id,sourceDataSet.id,destDataSet.id); + } + + inverseTransform{|sourceDataSet, destDataSet, action| + actions[\inverseTransform] = [nil,action]; + this.prSendMsg(this.inverseTransformMsg(sourceDataSet, destDataSet)); + } + + inverseTransformPointMsg{|sourceBuffer, destBuffer| + ^this.prMakeMsg(\inverseTransformPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(destBuffer), + ["/b_query",destBuffer.asUGenInput] + ); + } + + inverseTransformPoint{|sourceBuffer, destBuffer, action| + actions[\inverseRransformPoint] = [nil,{action.value(destBuffer)}]; + this.prSendMsg(this.inverseTransformPointMsg(sourceBuffer, destBuffer)); + } - invert = invert ? this.invert; - this.invert_(invert); + kr{|trig, inputBuffer,outputBuffer,invert = 0| - ^FluidStandardizeQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), this.invert); + ^FluidStandardizeQuery.kr(trig,this, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer), invert); } } diff --git a/release-packaging/Classes/FluidStats.sc b/release-packaging/Classes/FluidStats.sc index 73b03db..bb286de 100644 --- a/release-packaging/Classes/FluidStats.sc +++ b/release-packaging/Classes/FluidStats.sc @@ -1,23 +1,16 @@ FluidStats : MultiOutUGen { - var resonance -> expodec envelope + noiseAmp = EnvGen.ar(Env.perc(0.001, Rand(0.28,0.3), Rand(0.4,0.6), [-20,-15]), doneAction: 2); + noiseFreq = Rand(3900,4100); + noise = Mix(BPF.ar(ClipNoise.ar, [noiseFreq, noiseFreq+141], [0.12, 0.31], [2.0, 1.2])) * noiseAmp; + + Out.ar(out, noise); + }).add; + + // makes sure all the synthdefs are on the server + s.sync; + + // instantiate the JIT-circular-buffer + analysis_synth = Synth(\JITcircular,[\bufnum, circle_buf, \input, input_bus]); + train_base.fill(0,65,0.1); + + // instantiate the listener to cue the processing from the language side + osc_func = OSCFunc({ arg msg; + var head_pos = msg[3]; + // when an attack happens + if (classifying == 0, { + // if in training mode, makes a single component nmf + FluidBufNMF.process(s, circle_buf, head_pos, 128, bases:train_base, basesMode: 1, windowSize: 128); + }, { + // if in classifying mode, makes a 3 component nmf from the pretrained bases and compares the activations with the set thresholds + FluidBufNMF.process(s, circle_buf, head_pos, 128, components:3, bases:~classify_bases, basesMode: 2, activations:~activations, windowSize: 128, action:{ + // we are retrieving and comparing against the 2nd activation, because FFT processes are zero-padded on each sides, therefore the complete 128 samples are in the middle of the analysis. + ~activations.getn(3,3,{|x| + activation_vals = x; + if (activation_vals[0] >= thresholds[0], {Synth(\fluidbd,[\out,1])}); + if (activation_vals[1] >= thresholds[1], {Synth(\fluidsn,[\out,1])}); + if (activation_vals[2] >= thresholds[2], {Synth(\fluidhh,[\out,1])}); + defer{ + activations_disps[0].string_("A:" ++ activation_vals[0].round(0.01)); + activations_disps[1].string_("B:" ++ activation_vals[1].round(0.01)); + activations_disps[2].string_("C:" ++ activation_vals[2].round(0.01)); + }; + }); + }; + ); + }); + }, '/attack', s.addr); + + // make sure all the synths are instantiated + s.sync; + + // GUI for control + { + var win = Window("Control", Rect(100,100,610,100)).front; + + Button(win, Rect(10,10,80, 80)).states_([["bd",Color.black,Color.white]]).mouseDownAction_({Synth(\fluidbd, [\out, input_bus], analysis_synth, \addBefore)}); + Button(win, Rect(100,10,80, 80)).states_([["sn",Color.black,Color.white]]).mouseDownAction_({Synth(\fluidsn, [\out, input_bus], analysis_synth, \addBefore)}); + Button(win, Rect(190,10,80, 80)).states_([["hh",Color.black,Color.white]]).mouseDownAction_({Synth(\fluidhh, [\out, input_bus], analysis_synth,\addBefore)}); + StaticText(win, Rect(280,7,85,25)).string_("Select").align_(\center); + PopUpMenu(win, Rect(280,32,85,25)).items_(["learn","classify"]).action_({|value| + classifying = value.value; + if(classifying == 0, { + train_base.fill(0,65,0.1) + }); + }); + PopUpMenu(win, Rect(280,65,85,25)).items_(["classA","classB","classC"]).action_({|value| + cur_training_class = value.value; + train_base.fill(0,65,0.1); + }); + Button(win, Rect(375,65,85,25)).states_([["transfer",Color.black,Color.white]]).mouseDownAction_({ + if(classifying == 0, { + // if training + FluidBufCompose.process(s, train_base, numChans:1, destination:~classify_bases, destStartChan:cur_training_class); + }); + }); + StaticText(win, Rect(470,7,75,25)).string_("Acts"); + activations_disps = Array.fill(3, {arg i; + StaticText(win, Rect(470,((i+1) * 20 )+ 7,80,25)); + }); + StaticText(win, Rect(540,7,55,25)).string_("Thresh").align_(\center); + 3.do {arg i; + TextField(win, Rect(540,((i+1) * 20 )+ 7,55,25)).string_("0.5").action_({|x| thresholds[i] = x.value.asFloat;}); + }; + + win.onClose_({circle_buf.free;input_bus.free;osc_func.clear;analysis_synth.free;}); + }.defer; +}.play; +) + +// thanks to Ted Moore for the SC code cleaning and improvements! diff --git a/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp b/release-packaging/HelpSource/Classes/FluidBufNMFSeed.schelp similarity index 94% rename from release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp rename to release-packaging/HelpSource/Classes/FluidBufNMFSeed.schelp index 0388553..38f1348 100644 --- a/release-packaging/HelpSource/Classes/FluidBufNNDSVD.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufNMFSeed.schelp @@ -1,4 +1,4 @@ -TITLE:: FluidBufNNDSVD +TITLE:: FluidBufNMFSeed summary:: Non-Negative Double Singular Value Decomposition on a Buffer categories:: Libraries>FluidCorpusManipulation related:: Classes/FluidBufNMF @@ -79,7 +79,7 @@ b = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav")); //how many bases do I need to decompose the buffer with 90% accuracy ( Routine{ - FluidBufNNDSVD.process(s, b, ~bases, ~activations, coverage: 0.9, method: 1).wait; + FluidBufNMFSeed.process(s, b, ~bases, ~activations, coverage: 0.9, method: 1).wait; "% bases".format(~bases.numChannels).postln; }.play; ) @@ -89,7 +89,7 @@ Routine{ //try the same process with less accuracy ( Routine{ - FluidBufNNDSVD.process(s, b, ~bases, ~activations, coverage: 0.5).wait; + FluidBufNMFSeed.process(s, b, ~bases, ~activations, coverage: 0.5).wait; "% bases".format(~bases.numChannels).postln; }.play ) diff --git a/release-packaging/HelpSource/Classes/FluidBufToKr.schelp b/release-packaging/HelpSource/Classes/FluidBufToKr.schelp index 71f4c7a..569c7e5 100644 --- a/release-packaging/HelpSource/Classes/FluidBufToKr.schelp +++ b/release-packaging/HelpSource/Classes/FluidBufToKr.schelp @@ -53,7 +53,7 @@ code:: ~mlp = FluidMLPClassifier(s); // load a model that has been pre-trained to classify between a tone and noise, simple, i know, but... -~mlp.read(FluidFilesPath("../Resources/bufToKrExample.json")); +~mlp.read(FluidFilesPath("../../Resources/bufToKrExample.json")); // can be used to demonstrate that... ( diff --git a/release-packaging/HelpSource/Classes/FluidPlotter.schelp b/release-packaging/HelpSource/Classes/FluidPlotter.schelp index 6be7297..65b6e15 100644 --- a/release-packaging/HelpSource/Classes/FluidPlotter.schelp +++ b/release-packaging/HelpSource/Classes/FluidPlotter.schelp @@ -14,7 +14,7 @@ METHOD:: new Creates a new instance of FluidPlotter ARGUMENT:: parent -A parent view to embed the FluidPlotter in. If no parent is passed, FluidPlotter will create a window for itself at the given bounds. +A parent view to embed the FluidPlotter in. If no parent is passed, FluidPlotter will create a window for itself at the given bounds. To create a view without STRONG::parent:: and STRONG::bounds:: (e.g. for GUIs with link::Guides/GUI-Layout-Management::), see the STRONG::standalone:: argument below. ARGUMENT:: bounds Where to show the FluidPlotter, either within the parent or on the screen (if no parent is passed). @@ -37,6 +37,9 @@ Minimum of the Y range to display. Default is 0. ARGUMENT:: ymax Maximum of the Y range to display. Default is 1. +ARGUMENT:: standalone +If strong::false::, creates a link::Classes/View:: without parent or bounds, so that it can be used as part of a larger GUI, e.g. with link::Guides/GUI-Layout-Management::. + returns:: An instance of FluidPlotter @@ -308,6 +311,36 @@ w = Window("test",Rect(50,50,800,600)).front; },xmin:20,xmax:20000,ymin:-130,ymax:0); ) +// two FluidPlotter side by side with standalone=false +( +Window.closeAll; +// make two different data dictionaries +d = 2.collect { Dictionary.newFrom([ + "cols",2, + "data",Dictionary.newFrom(Array.fill(200,{ + arg i; + var return; + if((i%2) == 0,{ + return = "example-%".format((i/2).asInteger); + },{ + return = [exprand(20,20000),rrand(-130,0)]; + }); + return; + })) +])}; +w = Window("test",Rect(50,50,1200,600)).front; +// make two plotters, one for each data dictionary +~fluidPlotters = d.collect { |data| + FluidPlotter(dict: data, standalone: false, mouseMoveAction:{ + arg view, x, y, modifiers; + [view, x, y, modifiers].postln; + "".postln; + },xmin:20,xmax:20000,ymin:-130,ymax:0) +}; +// assign plotters to window's layout +w.layout = HLayout(~fluidPlotters[0], ~fluidPlotters[1]); +) + // you can make an empty one and then set the dict later ( Window.closeAll; diff --git a/release-packaging/HelpSource/Classes/FluidWaveform.schelp b/release-packaging/HelpSource/Classes/FluidWaveform.schelp index e708862..71466f5 100644 --- a/release-packaging/HelpSource/Classes/FluidWaveform.schelp +++ b/release-packaging/HelpSource/Classes/FluidWaveform.schelp @@ -21,7 +21,7 @@ ARGUMENT:: featuresBuffer A link::Classes/Buffer:: containing features to plot over the waveform. If this link::Classes/Buffer:: is multiple channels, it will plot each channel as a separate feature. ARGUMENT:: parent -A link::Classes/Window:: to place this FluidWaveform in. If STRONG::nil::, FluidWaveform will make its own window using the STRONG::bounds:: argument. +A link::Classes/Window:: to place this FluidWaveform in. If STRONG::nil::, FluidWaveform will make its own window using the STRONG::bounds:: argument. To create a view without parent and bounds (e.g. for GUIs with link::Guides/GUI-Layout-Management::), see the STRONG::standalone:: argument below. ARGUMENT:: bounds A link::Classes/Rect:: of where to place the FluidWaveform. If parent is STRONG::nil::, these bounds will be used to create a new link::Classes/Window::. If parent is not STRONG::nil::, these bounds will be used to place this FluidWaveform in the parent. @@ -57,6 +57,9 @@ Boolean. All the features in STRONG::featureBuf:: need to be normalized for plot ARGUMENT:: imageColorScaling An integer indicating how to scale the values in strong::imageBuffer:: before applying the strong::imageColorScheme::. 0 indicates linear scaling, 1 indicates logarithmic scaling. The default is 1. These integers can also be accessed via FluidWaveform.lin and FluidWaveform.log. +ARGUMENT:: standalone +If strong::false::, creates a link::Classes/View:: without parent or bounds, so that it can be used as part of a larger GUI, e.g. with link::Guides/GUI-Layout-Management::. + returns:: A new instance of FluidWaveform. METHOD:: lin @@ -109,6 +112,9 @@ See this argument in the class method 'new' above. ARGUMENT:: normalizeFeaturesIndependently See this argument in the class method 'new' above. +ARGUMENT:: lineWidth +See this argument in the class method 'new' above. + METHOD:: addImageLayer Add a grapic layer that shows an image derived from a buffer. @@ -127,11 +133,14 @@ See this argument in the class method 'new' above. METHOD:: front Similar to link::Classes/Window::'s strong::front:: method. Shows the FluidWaveform. This must be called after layers have been added in order to see the layers. +METHOD:: refresh +Similar to link::Classes/Window::'s strong::refresh:: method. Redraws all FluidWaveform layers. Has to be called after link::Classes/FluidWaveform#-addLayer:: in order to see the new layer. + METHOD:: close Close the FluidWaveform window. If parent is not STRONG::nil::, this method will close the parent window. -METHOD:: win +METHOD:: parent returns:: The FluidWaveform window. If parent is not STRONG::nil::, this method will return the parent window. @@ -154,6 +163,14 @@ FluidWaveform(~drums,parent:w,bounds:Rect(100,100,800,300)); w.front; ) +// put two of them in another window's layout +( +w = Window("FluidWaveform Test",Rect(0,0,1000,500)); +f = 2.collect{FluidWaveform(~drums, standalone: false)}; +w.view.layout = VLayout(f[0], f[1]); +w.front; +) + // show spectrogram ~mags = Buffer(s); FluidBufSTFT.processBlocking(s,~drums,magnitude:~mags,action:{"stft done".postln;}); @@ -249,7 +266,7 @@ FluidBufPitch.processBlocking(s,~audio,features:~pitch_analysis,action:{"done".p ~fw.addAudioLayer(~audio,Color(1,1,1,0.5)); ~fw.addIndicesLayer(~indices,~audio,Color.black); ~fw.addFeaturesLayer(~pitch_analysis,[Color.cyan,Color.magenta]); -~fw.front; // // if no buffers of any kind are passed, then you'll need to call `.front` after adding layers +~fw.front; ) ( @@ -262,7 +279,7 @@ FluidBufPitch.processBlocking(s,~audio,features:~pitch_analysis,action:{"done".p ) // add one more -~fw.addFeaturesLayer(~pitch_analysis,[Color.cyan,Color.yellow]).front; // <<<----- notice the `.front` here to update display after adding this layer +~fw.addFeaturesLayer(~pitch_analysis,[Color.cyan,Color.yellow]).refresh; // <<<----- notice the `.refresh` here to update display after adding this layer // check how many layers ~fw.layers.size @@ -301,4 +318,4 @@ s.waitForBoot{ ~fw.front; } ) -:: \ No newline at end of file +:: diff --git a/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp b/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp index ad630e5..92e2e29 100644 --- a/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp +++ b/release-packaging/HelpSource/Guides/FluidCorpusManipulation.schelp @@ -23,7 +23,7 @@ table:: ## strong::on signals:: || strong:: on buffers:: || strong::digest:: ## Link::Classes/FluidAmpGate:: || LINK:: Classes/FluidBufAmpGate:: || Events from amplitude enevelope ## LINK:: Classes/FluidAmpSlice:: || Link::Classes/FluidBufAmpSlice:: || Onsets from amplitude envelope -## link::Classes/FluidOnsetSlice::||link::Classes/FluidBufOnsetSlice::||Spectral onset detecor +## link::Classes/FluidOnsetSlice::||link::Classes/FluidBufOnsetSlice::||Spectral onset detector ## link::Classes/FluidTransientSlice::||link::Classes/FluidBufTransientSlice::||Transient model onset detector ## LINK:: Classes/FluidNoveltySlice::||LINK:: Classes/FluidBufNoveltySlice::|| Novelty based onset detection on a choice of descriptors :: @@ -39,8 +39,11 @@ table:: ##link::Classes/FluidSpectralShape:: || link::Classes/FluidBufSpectralShape:: || Seven Spectral Shape Descriptors ##link::Classes/FluidChroma:: || link::Classes/FluidBufChroma:: || Pitch Classes Descriptor ##link::Classes/FluidNMFMatch:: || || Real-time activation of link::Classes/FluidBufNMF##NMF:: bases -## || link::Classes/FluidBufNNDSVD::|| Quick starting estimates for link::Classes/FluidBufNMF##NMF:: components using Singular Value Decomposition +## || link::Classes/FluidBufNMFSeed::|| Quick starting estimates for link::Classes/FluidBufNMF##NMF:: components using Singular Value Decomposition ## || link::Classes/FluidBufSTFT:: || Perform STFT / ISTFT on link::Classes/Buffer::s +##link::Classes/FluidAmpFeature:: || link::Classes/FluidBufAmpFeature:: || Detrending Amplitude Envelope Descriptor +##link::Classes/FluidNoveltyFeature:: || link::Classes/FluidBufNoveltyFeature:: || Novelty descriptor based on a choice of analysis descriptors +##link::Classes/FluidOnsetFeature:: || link::Classes/FluidBufOnsetFeature:: || Descriptor comparing spectral frames using a choice of comparisons :: section:: Decompose Audio @@ -96,6 +99,7 @@ table:: ##link::Classes/FluidPCA:: || Principal Component Analysis for preprocessing and dimension reduction ##link::Classes/FluidMDS:: || Multidimensional Scaling for dimension reduction ##link::Classes/FluidKMeans:: || K-Means clustering +##link::Classes/FluidSKMeans:: || Spherical K-Means clustering ##link::Classes/FluidUMAP:: || Dimension reduction with UMAP algorithm ##link::Classes/FluidGrid:: || Transform a data set of two dimensional points into a two dimensional grid using the Munkres Algorithm. :: diff --git a/release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp b/release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp deleted file mode 100644 index efd6a59..0000000 --- a/release-packaging/HelpSource/Guides/FluidCorpusManipulationToolkit.schelp +++ /dev/null @@ -1,66 +0,0 @@ -TITLE:: Fluid Decomposition Toolbox -SUMMARY:: An overview of the FluCoMa toolbox for signal decomposition -CATEGORIES:: Libraries>FluidCorpusManipulation - - -The Fluid Decomposition toolbox provides an open-ended, loosely coupled set of objects to break up and analyse sound in terms of slices (segments in time), layers (superpositions in time and frequency) and objects (configurable or discoverable patterns in sound). Almost all objects have audio-rate and buffer-based versions. - -This toolbox was made possible thanks to the FluCoMa project ( LINK::http://www.flucoma.org/:: ) funded by the European Research Council ( LINK::https://erc.europa.eu/:: ) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 725899). - - -SECTION::Slices -Slice by amplitude envelope: -LINK::Classes/FluidAmpSlice:: LINK::Classes/FluidBufAmpSlice:: - -Slice by onsets in the spectral domain: -LINK::Classes/FluidOnsetSlice:: LINK::Classes/FluidBufOnsetSlice:: - -Slice by estimated novelty on a choice of features: -LINK::Classes/FluidNoveltySlice:: LINK::Classes/FluidBufNoveltySlice:: - -Slice by transient modelling: -LINK::Classes/FluidTransientSlice:: LINK::Classes/FluidBufTransientSlice:: - - -SECTION::Layers -Decompose into sines + residual -LINK::Classes/FluidSines:: LINK::Classes/FluidBufSines:: - -Decompose into transients + residual -LINK::Classes/FluidTransients:: LINK::Classes/FluidBufTransients:: - -Decompose into 'harmonic' and 'percussive' layers -LINK::Classes/FluidHPSS:: LINK::Classes/FluidBufHPSS:: - - -SECTION::Objects -Use Nonnegative Matrix Factorisation to explore and decompose sounds -LINK::Classes/FluidBufNMF:: LINK::Classes/FluidNMFFilter:: LINK::Classes/FluidNMFMatch:: - - -SECTION::Descriptors -Report amplitude and peak, or r128 loudness and true peak -LINK::Classes/FluidLoudness:: LINK::Classes/FluidBufLoudness:: - -A suite of pitch estimators -LINK::Classes/FluidPitch:: LINK::Classes/FluidBufPitch:: - -Energy across Mel bands -LINK::Classes/FluidMelBands:: LINK::Classes/FluidBufMelBands:: - -Mel Frequency Ceptstral Coefficients -LINK::Classes/FluidMFCC:: LINK::Classes/FluidBufMFCC:: - -Summary measures of spectral shape -LINK::Classes/FluidSpectralShape:: LINK::Classes/FluidBufSpectralShape:: - -Statistics of buffers -LINK::Classes/FluidBufStats:: - - -SECTION::Utility -Copy, slice, stack, mix concatenate. All the things you've wanted to do with buffers... -LINK::Classes/FluidBufCompose:: - -A tutorial object to experiment with multithreading in FluidBuf* objects -LINK::Classes/FluidBufThreadDemo:: diff --git a/scripts/MakeDevTree.cmake b/scripts/MakeDevTree.cmake new file mode 100644 index 0000000..e883f7c --- /dev/null +++ b/scripts/MakeDevTree.cmake @@ -0,0 +1,28 @@ +# 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.18) + +file(GLOB helpfiles "${ROOT}/help/*") +file(GLOB abstractions "${ROOT}/abstractions/*") +file(GLOB externals "${ROOT}/pd_objects/*") + +set(devfolder "${ROOT}/dev") +file(REMOVE_RECURSE ${devfolder}) +file(MAKE_DIRECTORY ${devfolder}) + +foreach(item IN LISTS helpfiles abstractions externals) + get_filename_component(item_name "${item}" NAME) + file(CREATE_LINK "${item}" "${devfolder}/${item_name}" SYMBOLIC) +endforeach() + +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${BINARIES}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) +file(CREATE_LINK "${CORE_SRC}/Resources/" "${devfolder}/Resources" SYMBOLIC) diff --git a/scripts/MakePluginSources.cmake b/scripts/MakePluginSources.cmake new file mode 100644 index 0000000..485cfad --- /dev/null +++ b/scripts/MakePluginSources.cmake @@ -0,0 +1,129 @@ +# 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(FluidClientStub) + +function(make_external_name client header var) + set(${var} Fluid${client} PARENT_SCOPE) +endfunction() + +function(add_sc_extension PLUGIN FILENAME) + + add_library(${PLUGIN} MODULE ${FILENAME}) + + if(MSVC) + target_compile_options(${PLUGIN} PRIVATE /external:W0 /W3 /bigobj) + else() + target_compile_options(${PLUGIN} PRIVATE + -Wall -Wextra -Wpedantic -Wreturn-type -Wconversion + ) + + #GCC doesn't have Wno-c++11-narrowing + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(${PLUGIN} PRIVATE -Wno-c++11-narrowing) + endif() + endif() + + if(APPLE) + set_target_properties(${PLUGIN} PROPERTIES + XCODE_GENERATE_SCHEME ON + ) + #If we target 10.7 (actually < 10.9), we have to manually include this: + target_compile_options(${PLUGIN} PRIVATE -stdlib=libc++) + endif() + + target_link_libraries( + ${PLUGIN} + PRIVATE + FLUID_DECOMPOSITION + FLUID_SC_WRAPPER + HISSTools_FFT + ) + + target_include_directories( + ${PLUGIN} + PRIVATE + "${LOCAL_INCLUDES}" + "${FLUID_VERSION_PATH}" + ) + + file(GLOB_RECURSE FLUID_SC_HEADERS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/include/wrapper/*.hpp") + + target_sources( + ${PLUGIN} PUBLIC ${FLUID_SC_HEADERS} + ) + + target_include_directories( + ${PLUGIN} + SYSTEM PRIVATE + "${SC_PATH}/include/plugin_interface" + "${SC_PATH}/include/common" + "${SC_PATH}/common" + "${SC_PATH}/external_libraries/boost" #we need boost::align for deallocating buffer memory :-( + ) + + get_property(HEADERS TARGET FLUID_DECOMPOSITION PROPERTY INTERFACE_SOURCES) + source_group(TREE "${flucoma-core_SOURCE_DIR}/include" FILES ${HEADERS}) + source_group(TREE "${CMAKE_SOURCE_DIR}/include/wrapper" PREFIX wrapper FILES ${FLUID_SC_HEADERS}) + + if(MINGW) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign") + endif() + + if(DEFINED FLUID_ARCH) + target_compile_options(${PLUGIN} PRIVATE ${FLUID_ARCH}) + endif() + + if(MSVC) + target_compile_options(${PLUGIN} PRIVATE -D_USE_MATH_DEFINES) + else() + target_compile_options(${PLUGIN} PRIVATE -fvisibility=hidden) + endif() + + #optional extra build settings (e.g for /bigobj with MSVC) + include( + "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/settings/${PLUGIN}.cmake" + OPTIONAL + ) +endfunction() + +function(generate_sc_source) + # # Define the supported set of keywords + set(noValues "") + set(singleValues FILENAME EXTERNALS_OUT FILE_OUT) + set(multiValues CLIENTS HEADERS CLASSES) + # # Process the arguments passed in + include(CMakeParseArguments) + cmake_parse_arguments(ARG + "${noValues}" + "${singleValues}" + "${multiValues}" + ${ARGN}) + + set(CCE_WRAPPER "#include ") + set(ENTRY_POINT "PluginLoad(FlucomaPlugin)") + set(WRAPPER_TEMPLATE [=[makeSCWrapper<${class}>("${external}", inTable);]=]) + + set(EXTRA_SOURCE_FILE "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/settings/${ARG_FILENAME}.cpp.in") + + if(EXISTS ${EXTRA_SOURCE_FILE}) + generate_source(${ARGN} EXTRA_SOURCE ${EXTRA_SOURCE_FILE} EXTERNALS_OUT external FILE_OUT outfile) + else() + generate_source(${ARGN} EXTERNALS_OUT external FILE_OUT outfile) + endif() + + if(ARG_FILENAME) + set(external_filename ${ARG_FILENAME}) + else() + list(GET external 0 external_filename) + endif() + + message(STATUS "Generating: ${external_filename}") + add_sc_extension(${external_filename} ${outfile}) +endfunction() diff --git a/scripts/settings/FluidManipulation.cpp.in b/scripts/settings/FluidManipulation.cpp.in new file mode 100644 index 0000000..f835956 --- /dev/null +++ b/scripts/settings/FluidManipulation.cpp.in @@ -0,0 +1,12 @@ + makeSCWrapper("FluidKDTreeQuery",inTable); + makeSCWrapper("FluidKMeansQuery",inTable); + makeSCWrapper("FluidSKMeansQuery",inTable); + makeSCWrapper("FluidKNNClassifierQuery",inTable); + makeSCWrapper("FluidKNNRegressorQuery",inTable); + makeSCWrapper("FluidNormalizeQuery",inTable); + makeSCWrapper("FluidRobustScaleQuery",inTable); + makeSCWrapper("FluidStandardizeQuery",inTable); + makeSCWrapper("FluidPCAQuery",inTable); + makeSCWrapper("FluidUMAPQuery",inTable); + makeSCWrapper("FluidMLPRegressorQuery",inTable); + makeSCWrapper("FluidMLPClassifierQuery",inTable); diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake deleted file mode 100644 index cce9658..0000000 --- a/scripts/target_post.cmake +++ /dev/null @@ -1,95 +0,0 @@ -# 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). - -target_compile_features(${PLUGIN} PRIVATE cxx_std_14) - -if(MSVC) - target_compile_options(${PLUGIN} PRIVATE /W3) -else() - target_compile_options(${PLUGIN} PRIVATE - -Wall -Wextra -Wpedantic -Wreturn-type -Wconversion - ) - - #GCC doesn't have Wno-c++11-narrowing - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - target_compile_options(${PLUGIN} PRIVATE -Wno-c++11-narrowing) - endif() -endif() - -set_target_properties(${PLUGIN} PROPERTIES - CXX_STANDARD 14 - CXX_STANDARD_REQUIRED YES - CXX_EXTENSIONS NO -) - -if(APPLE) - set_target_properties(${PLUGIN} PROPERTIES - XCODE_GENERATE_SCHEME ON - ) - #If we target 10.7 (actually < 10.9), we have to manually include this: - target_compile_options(${PLUGIN} PRIVATE -stdlib=libc++) -endif() - -target_link_libraries( - ${PLUGIN} - PRIVATE - FLUID_DECOMPOSITION - FLUID_SC_WRAPPER - HISSTools_FFT -) - -target_include_directories( - ${PLUGIN} - PRIVATE - "${LOCAL_INCLUDES}" - "${FLUID_VERSION_PATH}" -) - -file(GLOB_RECURSE FLUID_SC_HEADERS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/include/wrapper/*.hpp") - -target_sources( - ${PLUGIN} PUBLIC ${FLUID_SC_HEADERS} -) - -target_include_directories( - ${PLUGIN} - SYSTEM PRIVATE - "${SC_PATH}/include/plugin_interface" - "${SC_PATH}/include/common" - "${SC_PATH}/common" - "${SC_PATH}/external_libraries/boost" #we need boost::align for deallocating buffer memory :-( -) - -get_property(HEADERS TARGET FLUID_DECOMPOSITION PROPERTY INTERFACE_SOURCES) -source_group(TREE "${flucoma-core_SOURCE_DIR}/include" FILES ${HEADERS}) -source_group(TREE "${CMAKE_SOURCE_DIR}/include/wrapper" PREFIX wrapper FILES ${FLUID_SC_HEADERS}) - - -# if (SUPERNOVA) -# target_include_directories( -# ${PLUGIN} -# SYSTEM PRIVATE -# "${SC_PATH}/external_libraries/nova-tt" -# "${SC_PATH}/external_libraries/boost_lockfree" -# "${SC_PATH}/external_libraries/boost-lockfree" -# ) -# endif() - -if(MINGW) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstackrealign") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstackrealign") -endif() - -if(DEFINED FLUID_ARCH) - target_compile_options(${PLUGIN} PRIVATE ${FLUID_ARCH}) -endif() - -if(MSVC) - target_compile_options(${PLUGIN} PRIVATE -D_USE_MATH_DEFINES) -else() - target_compile_options(${PLUGIN} PRIVATE -fvisibility=hidden) -endif() diff --git a/src/FluidAmpFeature/CMakeLists.txt b/src/FluidAmpFeature/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidAmpFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidAmpFeature/FluidAmpFeature.cpp b/src/FluidAmpFeature/FluidAmpFeature.cpp deleted file mode 100644 index 1abb2c8..0000000 --- a/src/FluidAmpFeature/FluidAmpFeature.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidAmpFeature", ft); -} diff --git a/src/FluidAmpGate/CMakeLists.txt b/src/FluidAmpGate/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidAmpGate/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidAmpGate/FluidAmpGate.cpp b/src/FluidAmpGate/FluidAmpGate.cpp deleted file mode 100644 index d8a0c9b..0000000 --- a/src/FluidAmpGate/FluidAmpGate.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidAmpGate", ft); -} diff --git a/src/FluidAmpSlice/CMakeLists.txt b/src/FluidAmpSlice/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidAmpSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidAmpSlice/FluidAmpSlice.cpp b/src/FluidAmpSlice/FluidAmpSlice.cpp deleted file mode 100644 index c5ceaa0..0000000 --- a/src/FluidAmpSlice/FluidAmpSlice.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidAmpSlice", ft); -} diff --git a/src/FluidAudioTransport/CMakeLists.txt b/src/FluidAudioTransport/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidAudioTransport/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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 deleted file mode 100644 index 1815e8b..0000000 --- a/src/FluidAudioTransport/FluidAudioTransport.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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/FluidBufAmpFeature/CMakeLists.txt b/src/FluidBufAmpFeature/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufAmpFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufAmpFeature/FluidBufAmpFeature.cpp b/src/FluidBufAmpFeature/FluidBufAmpFeature.cpp deleted file mode 100644 index 2ce6e12..0000000 --- a/src/FluidBufAmpFeature/FluidBufAmpFeature.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidBufAmpFeature", ft); -} diff --git a/src/FluidBufAmpGate/CMakeLists.txt b/src/FluidBufAmpGate/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufAmpGate/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufAmpGate/FluidBufAmpGate.cpp b/src/FluidBufAmpGate/FluidBufAmpGate.cpp deleted file mode 100644 index 9e25548..0000000 --- a/src/FluidBufAmpGate/FluidBufAmpGate.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufAmpGate", ft); -} diff --git a/src/FluidBufAmpSlice/CMakeLists.txt b/src/FluidBufAmpSlice/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufAmpSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufAmpSlice/FluidBufAmpSlice.cpp b/src/FluidBufAmpSlice/FluidBufAmpSlice.cpp deleted file mode 100644 index 78a5100..0000000 --- a/src/FluidBufAmpSlice/FluidBufAmpSlice.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufAmpSlice", ft); -} diff --git a/src/FluidBufAudioTransport/CMakeLists.txt b/src/FluidBufAudioTransport/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufAudioTransport/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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 deleted file mode 100644 index 2d1476e..0000000 --- a/src/FluidBufAudioTransport/FluidBufAudioTransport.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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/FluidBufChroma/CMakeLists.txt b/src/FluidBufChroma/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufChroma/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufChroma/FluidBufChroma.cpp b/src/FluidBufChroma/FluidBufChroma.cpp deleted file mode 100644 index 448e5dd..0000000 --- a/src/FluidBufChroma/FluidBufChroma.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidBufChroma", ft); -} diff --git a/src/FluidBufCompose/CMakeLists.txt b/src/FluidBufCompose/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidBufCompose/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufCompose/FluidBufCompose.cpp b/src/FluidBufCompose/FluidBufCompose.cpp deleted file mode 100644 index 8ba836d..0000000 --- a/src/FluidBufCompose/FluidBufCompose.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufCompose", ft); -} diff --git a/src/FluidBufCompose/tests.scd b/src/FluidBufCompose/tests.scd deleted file mode 100644 index 0185a0e..0000000 --- a/src/FluidBufCompose/tests.scd +++ /dev/null @@ -1,67 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-SA-UprightPianoPedalWide.wav".resolveRelative); -d = Buffer.new(s); -) - -( -// with basic params (basic summing of each full buffer in all dimensions) -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, srcBufNumB: c.bufnum, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -d.query; -d.play; -d.plot - -//constructing a mono buffer, with a quiet punch from the synth, with a choked piano resonance from the left channel -( -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, nFramesA: 9000, srcGainA: 0.5, srcBufNumB: c.bufnum, startAtB:30000, nFramesB:44100, nChansB:1, srcGainB:0.9, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -//constructing a stereo buffer, with the end of the mono synth in both channels, with a piano resonance in swapped stereo -( -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, startAtA: 441000, nChansA: 2, srcGainA: 0.6, srcBufNumB: c.bufnum, nFramesB: 80000, startChanB: 1, nChansB: 2, srcGainB: 0.5, dstStartAtB: 22050, dstStartChanB: 0, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -//constructing a one second buffer: the first second of each buffer, the mono synth on the right, the piano on the left -( -Routine{ - t = Main.elapsedTime; - FluidBufCompose.process(s, srcBufNumA: b.bufnum, nFramesA: 44100, nChansA: 1, dstStartChanA: 1, srcBufNumB: c.bufnum, nFramesB:44100, nChansB:1, dstBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -// trying to grow a buffer on itself -e = Buffer.alloc(s,1,1); -( -Routine { - FluidBufCompose.process(s,srcBufNumA: b.bufnum, srcBufNumB: e.bufnum, dstBufNum: e.bufnum); - s.sync; - FluidBufCompose.process(s,srcBufNumA: c.bufnum, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum); - s.sync; -}.play; -) - -e.plot -e.play \ No newline at end of file diff --git a/src/FluidBufFlatten/CMakeLists.txt b/src/FluidBufFlatten/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufFlatten/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufFlatten/FluidBufFlatten.cpp b/src/FluidBufFlatten/FluidBufFlatten.cpp deleted file mode 100644 index 0a6746c..0000000 --- a/src/FluidBufFlatten/FluidBufFlatten.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufFlatten", ft); -} diff --git a/src/FluidBufHPSS/CMakeLists.txt b/src/FluidBufHPSS/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidBufHPSS/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufHPSS/FluidBufHPSS.cpp b/src/FluidBufHPSS/FluidBufHPSS.cpp deleted file mode 100644 index 36e609a..0000000 --- a/src/FluidBufHPSS/FluidBufHPSS.cpp +++ /dev/null @@ -1,23 +0,0 @@ - -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufHPSS", ft); -} diff --git a/src/FluidBufHPSS/tests.scd b/src/FluidBufHPSS/tests.scd deleted file mode 100644 index 249e5c6..0000000 --- a/src/FluidBufHPSS/tests.scd +++ /dev/null @@ -1,51 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -d = Buffer.new(s); -e = Buffer.new(s); -) - -( -// with basic params -Routine{ - t = Main.elapsedTime; - FluidBufHPSS.process(s, b.bufnum, harmBufNum: c.bufnum, percBufNum: d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -c.query; -c.play; -d.query; -d.play; -e.query; -e.play; - -//nullsumming tests -{(PlayBuf.ar(1,c.bufnum))+(PlayBuf.ar(1,d.bufnum))+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufHPSS.process(s,b.bufnum, 44100, 44100, 0, 0, c.bufnum, d.bufnum, e.bufnum, 51, 31, 2); // need to change these for something sensible - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - - -// owen's sexy example (The world's most expensive stereoizer) - -( -{ - var hpss = FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),modeFlag:2,hta1:SinOsc.kr(1.5,mul:20,add:20),hta2:SinOsc.kr(3,mul:25,add:25), pta1:SinOsc.kr(1.6,0,mul:30,add:30),pta2:SinOsc.kr(1.7,0,mul:17,add:24)); - [hpss[2] + 0.5 * hpss[0], hpss[1] + 0.5 * hpss[0]]; -}.play; -) \ No newline at end of file diff --git a/src/FluidBufLoudness/CMakeLists.txt b/src/FluidBufLoudness/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufLoudness/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufLoudness/FluidBufLoudness.cpp b/src/FluidBufLoudness/FluidBufLoudness.cpp deleted file mode 100644 index 44abbd4..0000000 --- a/src/FluidBufLoudness/FluidBufLoudness.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufLoudness", ft); -} diff --git a/src/FluidBufMFCC/CMakeLists.txt b/src/FluidBufMFCC/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufMFCC/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufMFCC/FluidBufMFCC.cpp b/src/FluidBufMFCC/FluidBufMFCC.cpp deleted file mode 100644 index f985016..0000000 --- a/src/FluidBufMFCC/FluidBufMFCC.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidBufMFCC", ft); -} diff --git a/src/FluidBufMelBands/CMakeLists.txt b/src/FluidBufMelBands/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufMelBands/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufMelBands/FluidBufMelBands.cpp b/src/FluidBufMelBands/FluidBufMelBands.cpp deleted file mode 100644 index dcb39fc..0000000 --- a/src/FluidBufMelBands/FluidBufMelBands.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidBufMelBands", ft); -} diff --git a/src/FluidBufNMF/CMakeLists.txt b/src/FluidBufNMF/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidBufNMF/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufNMF/FluidBufNMF.cpp b/src/FluidBufNMF/FluidBufNMF.cpp deleted file mode 100644 index e74cd2a..0000000 --- a/src/FluidBufNMF/FluidBufNMF.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNMF", ft); -} diff --git a/src/FluidBufNMF/tests.scd b/src/FluidBufNMF/tests.scd deleted file mode 100644 index 4a3d811..0000000 --- a/src/FluidBufNMF/tests.scd +++ /dev/null @@ -1,214 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -x = Buffer.new(s); -y = Buffer.new(s); -~fft_size = 1024; -~frame_size = 512; -~hop_size = 256; -~which_rank = 0; -) - -( -// without sources -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,b.bufnum,0,-1,0,-1,nil,x.bufnum,0,y.bufnum,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -// with sources only -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,b.bufnum, 0,-1,0,-1,c.bufnum,nil,0,nil,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play -) - -// with everything -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,b.bufnum, 0,-1,0,-1,c.bufnum,x.bufnum,0,y.bufnum,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play -) - - -//look at the dictionaries and activations -c.plot;x.plot; y.plot; -//null test of the sum of sources -{(PlayBuf.ar(5,c.bufnum,doneAction:2).sum)+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - -// play around -{Splay.ar(PlayBuf.ar(5,c.bufnum,doneAction:2))}.play - -//play a single source -{PlayBuf.ar(5,c.bufnum,doneAction:2)[~which_rank].dup}.play - -//play noise through a filter -( -{ - var chain; - chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar()); - - chain = chain.pvcollect(~fft_size, {|mag, phase, index| - [mag * BufRd.kr(5,x.bufnum,DC.kr(index),0,1)[~which_rank]]; - }); - - IFFT(chain); -}.play -) - -//play noise through an activation -{WhiteNoise.ar(BufRd.kr(5,y.bufnum,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_rank])*0.5}.play - -//play noise through both activation and filter -( -{ - var chain; - chain = FFT(LocalBuf(~fft_size), WhiteNoise.ar(BufRd.kr(5,y.bufnum,Phasor.ar(1,1/~hop_size,0,(b.numFrames / ~hop_size + 1)),0,1)[~which_rank]*12),0.5,1); - - chain = chain.pvcollect(~fft_size, {|mag, phase, index| - [mag * BufRd.kr(5,x.bufnum,DC.kr(index),0,1)[~which_rank]]; - }); - - [0,IFFT(chain)]; -}.play -) - -// test with stereo input (dual mono for best segregation) -Buffer.freeAll(s) - -( -Routine{ - b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); - c = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-AcousticStrums-M.wav".resolveRelative); - d = Buffer.new(s); - e = Buffer.new(s); - x = Buffer.new(s); - y = Buffer.new(s); - ~fft_size = 1024; - ~frame_size = 512; - ~hop_size = 256; - s.sync; - FluidBufCompose.process(s,b.bufnum,srcBufNumB:c.bufnum, srcGainB:0.6, dstStartChanB:1, dstBufNum:d.bufnum); - s.sync; - d.query; -}.play; -) - -d.play - -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,d.bufnum,0,-1,0,-1,e.bufnum,x.bufnum,0,y.bufnum,0,5,100,0,~frame_size,~hop_size,~fft_size); - s.sync; - (Main.elapsedTime - t).postln; -}.play; -) - -e.query -x.query -y.query - -//test a single rank -{PlayBuf.ar(10,e.bufnum,doneAction:2)[9].dup}.play - -// play them all across in a sort of upmixed stereo... -{Splay.ar(PlayBuf.ar(10,e.bufnum,doneAction:2))}.play - -//test process on a segment -( -Routine{ - t = Main.elapsedTime; - FluidBufNMF.process(s,d.bufnum,44100,44100,0,1,c.bufnum,rank:2); - s.sync; - (Main.elapsedTime - t).postln; - t = Main.elapsedTime; - FluidBufNMF.process(s,d.bufnum,8810,44100,1,1,b.bufnum,rank:2); - s.sync; - (Main.elapsedTime - t).postln; -}.play -) -c.query -c.play -b.query -b.play - - -// nmf on empty buffer -Buffer.freeAll; -( -Routine({ - b = Buffer.alloc(s,44100); - c = Buffer.new(s); - s.sync; - FluidBufNMF.process(s,b.bufnum,dstBufNum:c.bufnum); - s.sync; - c.getn(0,100,{|x| x.postln}); -}).play; -) - -// fixed dictionaries experiment -Buffer.freeAll; - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-AcousticStrums-M.wav".resolveRelative); -c = Buffer.new(s); -x = Buffer.new(s); -e = Buffer.alloc(s,1,1); -y = Buffer.alloc(s,1,1); -) - -( -Routine { - FluidBufNMF.process(s,b.bufnum,0,88200,0,1, c.bufnum, x.bufnum, rank:10); - s.sync; - c.query; -}.play; -) - -// test nullsum array -(0..9).do({|chan|FluidBufCompose.process(s,srcBufNumA: c.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: y.bufnum, dstBufNum: y.bufnum)}); -{(PlayBuf.ar(10,c.bufnum).sum)+(-1*PlayBuf.ar(1,y.bufnum))}.play - -// find the picking -{PlayBuf.ar(10,c.bufnum)[2]}.play - -// copy all the other ranks on itself (the 2 above is omited from the array and is in the 2nd compose -( -Routine{ - [ 0, 1, 3, 4, 5, 6, 7, 8, 9 ].do({|chan|FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum)}); - s.sync; - e.query; - s.sync; - FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: 2, nChansA: 1, srcBufNumB: e.bufnum, dstStartChanB: 1, dstBufNum: e.bufnum); - s.sync; - e.query; -}.play; -) - -//process -( -Routine{ - FluidBufNMF.process(s, b.bufnum, dstBufNum: c.bufnum, dictBufNum: e.bufnum, dictFlag: 2, actBufNum:y.bufnum, rank:2); - s.sync; - c.query; -}.play; -) - -c.play -e.plot -y.query -y.plot diff --git a/src/FluidBufNNDSVD/CMakeLists.txt b/src/FluidBufNNDSVD/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufNNDSVD/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufNNDSVD/FluidBufNNDSVD.cpp b/src/FluidBufNNDSVD/FluidBufNNDSVD.cpp deleted file mode 100644 index 2f4e47f..0000000 --- a/src/FluidBufNNDSVD/FluidBufNNDSVD.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidBufNNDSVD", ft); -} diff --git a/src/FluidBufNoveltyFeature/CMakeLists.txt b/src/FluidBufNoveltyFeature/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufNoveltyFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp b/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp deleted file mode 100644 index 95314d3..0000000 --- a/src/FluidBufNoveltyFeature/FluidBufNoveltyFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNoveltyF", ft); -} diff --git a/src/FluidBufNoveltySlice/CMakeLists.txt b/src/FluidBufNoveltySlice/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufNoveltySlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp b/src/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp deleted file mode 100644 index 039db41..0000000 --- a/src/FluidBufNoveltySlice/FluidBufNoveltySlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNoveltySlice", ft); -} diff --git a/src/FluidBufOnsetFeature/CMakeLists.txt b/src/FluidBufOnsetFeature/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufOnsetFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp b/src/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp deleted file mode 100644 index 6d338c3..0000000 --- a/src/FluidBufOnsetFeature/FluidBufOnsetFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufOnsetFeature", ft); -} diff --git a/src/FluidBufOnsetSlice/CMakeLists.txt b/src/FluidBufOnsetSlice/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufOnsetSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp b/src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp deleted file mode 100644 index 7ff5eef..0000000 --- a/src/FluidBufOnsetSlice/FluidBufOnsetSlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufOnsetSlice", ft); -} diff --git a/src/FluidBufPitch/CMakeLists.txt b/src/FluidBufPitch/CMakeLists.txt deleted file mode 100644 index 711f3d3..0000000 --- a/src/FluidBufPitch/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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/FluidBufPitch/FluidBufPitch.cpp b/src/FluidBufPitch/FluidBufPitch.cpp deleted file mode 100644 index 41bd762..0000000 --- a/src/FluidBufPitch/FluidBufPitch.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidBufPitch", ft); -} diff --git a/src/FluidBufSTFT/CMakeLists.txt b/src/FluidBufSTFT/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufSTFT/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufSTFT/FluidBufSTFT.cpp b/src/FluidBufSTFT/FluidBufSTFT.cpp deleted file mode 100644 index ecd1001..0000000 --- a/src/FluidBufSTFT/FluidBufSTFT.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSTFT", ft); -} diff --git a/src/FluidBufScale/CMakeLists.txt b/src/FluidBufScale/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufScale/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufScale/FluidBufScale.cpp b/src/FluidBufScale/FluidBufScale.cpp deleted file mode 100644 index 12ffeba..0000000 --- a/src/FluidBufScale/FluidBufScale.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufScale", ft); -} diff --git a/src/FluidBufSelect/CMakeLists.txt b/src/FluidBufSelect/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufSelect/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufSelect/FluidBufSelect.cpp b/src/FluidBufSelect/FluidBufSelect.cpp deleted file mode 100644 index 43fc58a..0000000 --- a/src/FluidBufSelect/FluidBufSelect.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSelect", ft); -} diff --git a/src/FluidBufSelectEvery/CMakeLists.txt b/src/FluidBufSelectEvery/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufSelectEvery/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufSelectEvery/FluidBufSelectEvery.cpp b/src/FluidBufSelectEvery/FluidBufSelectEvery.cpp deleted file mode 100644 index 87c1d9b..0000000 --- a/src/FluidBufSelectEvery/FluidBufSelectEvery.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSelectEvery", ft); -} diff --git a/src/FluidBufSines/CMakeLists.txt b/src/FluidBufSines/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidBufSines/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufSines/FluidBufSines.cpp b/src/FluidBufSines/FluidBufSines.cpp deleted file mode 100644 index f230694..0000000 --- a/src/FluidBufSines/FluidBufSines.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSines", ft); -} diff --git a/src/FluidBufSines/tests.scd b/src/FluidBufSines/tests.scd deleted file mode 100644 index 51e47c4..0000000 --- a/src/FluidBufSines/tests.scd +++ /dev/null @@ -1,38 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -d = Buffer.new(s); -) - -( -// with basic params -Routine{ - t = Main.elapsedTime; - FluidBufSines.process(s, b.bufnum, sineBufNum: c.bufnum, resBufNum:d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -c.query; -c.play; -d.query; -d.play; - -//nullsumming tests -{(PlayBuf.ar(1,c.bufnum))+(PlayBuf.ar(1,d.bufnum))+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufSines.process(s,b.bufnum, 44100, 88200, 0, 0, c.bufnum, d.bufnum, 30,0.3,3,0.1,0.9,2048,512,4096); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); diff --git a/src/FluidBufSpectralShape/CMakeLists.txt b/src/FluidBufSpectralShape/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidBufSpectralShape/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufSpectralShape/FluidBufSpectralShape.cpp b/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp deleted file mode 100644 index 09685d8..0000000 --- a/src/FluidBufSpectralShape/FluidBufSpectralShape.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufSpecShp", ft); -} diff --git a/src/FluidBufStats/CMakeLists.txt b/src/FluidBufStats/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufStats/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufStats/FluidBufStats.cpp b/src/FluidBufStats/FluidBufStats.cpp deleted file mode 100644 index b5f902c..0000000 --- a/src/FluidBufStats/FluidBufStats.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufStats", ft); -} diff --git a/src/FluidBufThreadDemo/CMakeLists.txt b/src/FluidBufThreadDemo/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufThreadDemo/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufThreadDemo/FluidBufThreadDemo.cpp b/src/FluidBufThreadDemo/FluidBufThreadDemo.cpp deleted file mode 100644 index a702bc5..0000000 --- a/src/FluidBufThreadDemo/FluidBufThreadDemo.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufThreadDemo", ft); -} diff --git a/src/FluidBufThresh/CMakeLists.txt b/src/FluidBufThresh/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidBufThresh/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufThresh/FluidBufThresh.cpp b/src/FluidBufThresh/FluidBufThresh.cpp deleted file mode 100644 index bd6c0a2..0000000 --- a/src/FluidBufThresh/FluidBufThresh.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufThresh", ft); -} diff --git a/src/FluidBufTransientSlice/CMakeLists.txt b/src/FluidBufTransientSlice/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidBufTransientSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidBufTransientSlice/FluidBufTransientSlice.cpp b/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp deleted file mode 100644 index 7354e08..0000000 --- a/src/FluidBufTransientSlice/FluidBufTransientSlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) { - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufTrSlice", ft); -} diff --git a/src/FluidBufTransientSlice/tests.scd b/src/FluidBufTransientSlice/tests.scd deleted file mode 100644 index a934ca0..0000000 --- a/src/FluidBufTransientSlice/tests.scd +++ /dev/null @@ -1,71 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -) - -( -// with basic params -Routine{ - t = Main.elapsedTime; - FluidBufTransientSlice.process(s,b.bufnum, transBufNum:c.bufnum, order:80, debounce:4410); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -//check the number of slices -c.query; - -//loops over a splice -( -{ - BufRd.ar( - 1, - b.bufnum, - Phasor.ar( - 0, - 1, - BufRd.kr( - 1, - c.bufnum, - MouseX.kr( - 0, - BufFrames.kr(c.bufnum) - 1), - 0, - 1), - BufRd.kr( - 1, - c.bufnum, - MouseX.kr( - 1, - BufFrames.kr(c.bufnum)), - 0, - 1), - BufRd.kr( - 1, - c.bufnum, - MouseX.kr( - 0, - BufFrames.kr(c.bufnum) - 1), - 0, - 1)), - 0, - 1) -}.play; -) - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufTransients.process(s,b.bufnum, 44100, 44100, 0, 0, c.bufnum, d.bufnum, 100, 512,256,1,2,1,12,20); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - diff --git a/src/FluidBufTransients/CMakeLists.txt b/src/FluidBufTransients/CMakeLists.txt deleted file mode 100755 index 711f3d3..0000000 --- a/src/FluidBufTransients/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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/FluidBufTransients/FluidBufTransients.cpp b/src/FluidBufTransients/FluidBufTransients.cpp deleted file mode 100644 index 6cd9f6d..0000000 --- a/src/FluidBufTransients/FluidBufTransients.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufTransients", ft); -} diff --git a/src/FluidBufTransients/tests.scd b/src/FluidBufTransients/tests.scd deleted file mode 100644 index afefd3f..0000000 --- a/src/FluidBufTransients/tests.scd +++ /dev/null @@ -1,39 +0,0 @@ -s.reboot -//////////////////////////// -// test for efficiency - -( -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -c = Buffer.new(s); -d = Buffer.new(s); -) - -( -// without basic params -Routine{ - t = Main.elapsedTime; - FluidBufTransients.process(s,b.bufnum, transBufNum:c.bufnum, resBufNum:d.bufnum); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - -c.query; -c.play; -d.query; -d.play; - -//nullsumming tests -{(PlayBuf.ar(1,c.bufnum))+(PlayBuf.ar(1,d.bufnum))+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play - - -// with everything changed to make it much faster -( -Routine{ - t = Main.elapsedTime; - FluidBufTransients.process(s,b.bufnum, 0, 88200, 0, 0, c.bufnum, d.bufnum, 100, 512,256,1,2,1,12,20); - s.sync; - (Main.elapsedTime - t).postln; -}.play -); - diff --git a/src/FluidChroma/CMakeLists.txt b/src/FluidChroma/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidChroma/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidChroma/FluidChroma.cpp b/src/FluidChroma/FluidChroma.cpp deleted file mode 100644 index a42135a..0000000 --- a/src/FluidChroma/FluidChroma.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidChroma", ft); -} diff --git a/src/FluidGain/CMakeLists.txt b/src/FluidGain/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidGain/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidGain/FluidGain.cpp b/src/FluidGain/FluidGain.cpp deleted file mode 100644 index 0dcb164..0000000 --- a/src/FluidGain/FluidGain.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(FluidGainUgen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidGain", ft); -} diff --git a/src/FluidHPSS/CMakeLists.txt b/src/FluidHPSS/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidHPSS/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidHPSS/FluidHPSS.cpp b/src/FluidHPSS/FluidHPSS.cpp deleted file mode 100644 index d6c8288..0000000 --- a/src/FluidHPSS/FluidHPSS.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidHPSS", ft); -} diff --git a/src/FluidHPSS/test.scd b/src/FluidHPSS/test.scd deleted file mode 100644 index ca26e26..0000000 --- a/src/FluidHPSS/test.scd +++ /dev/null @@ -1,33 +0,0 @@ -s.reboot; - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -b.play - -// basic param -{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play - -// params in mode 1 -{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,1,0.05,40,0.1,-40)}.play - -// params in mode 2 -{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,2,0.05,40,0.1,-40, 0.1, -10, 0.2, 10)[2].dup}.play - - - -// null test (the process add a latency of ((harmFiltSize + (winSize / hopSize) - 1) * hopSize) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,31, winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((31 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21, winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((21 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,29, winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((29 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,29, winSize:1024,hopSize:256,fftSize:2048).sum - DelayN.ar(sig, 1, ((29 + 3) * 256 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,11,29, winSize:2048,hopSize:512,fftSize:4096).sum - DelayN.ar(sig, 1, ((29 + 3) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21, winSize:2048,hopSize:256,fftSize:4096).sum - DelayN.ar(sig, 1, ((21 + 7) * 256 / s.sampleRate))]}.play - - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21,1,1,winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((21 + 1) * 512 / s.sampleRate))]}.play - -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidHPSS.ar(sig,17,21,1,2,winSize:1024,hopSize:512,fftSize:2048).sum - DelayN.ar(sig, 1, ((21 + 1) * 512 / s.sampleRate))]}.play diff --git a/src/FluidLoudness/CMakeLists.txt b/src/FluidLoudness/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidLoudness/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidLoudness/FluidLoudness.cpp b/src/FluidLoudness/FluidLoudness.cpp deleted file mode 100644 index ccf0300..0000000 --- a/src/FluidLoudness/FluidLoudness.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidLoudness", ft); -} diff --git a/src/FluidMFCC/CMakeLists.txt b/src/FluidMFCC/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidMFCC/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidMFCC/FluidMFCC.cpp b/src/FluidMFCC/FluidMFCC.cpp deleted file mode 100644 index 79cc90f..0000000 --- a/src/FluidMFCC/FluidMFCC.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidMFCC", ft); -} diff --git a/src/FluidManipulation/CMakeLists.txt b/src/FluidManipulation/CMakeLists.txt deleted file mode 100644 index 66790e5..0000000 --- a/src/FluidManipulation/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -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 -) - -if(WIN32) - target_compile_options(${PLUGIN} PUBLIC /bigobj) -endif() - -include(${CMAKE_CURRENT_LIST_DIR}/../../scripts/target_post.cmake) diff --git a/src/FluidManipulation/FluidManipulation.cpp b/src/FluidManipulation/FluidManipulation.cpp deleted file mode 100644 index 241a2aa..0000000 --- a/src/FluidManipulation/FluidManipulation.cpp +++ /dev/null @@ -1,71 +0,0 @@ - -// A tool from the FluCoMa project, funded by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 725899) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static InterfaceTable *ft; - -PluginLoad(FluidSTFTUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidDataSet",ft); - makeSCWrapper("FluidDataSetQuery",ft); - makeSCWrapper("FluidLabelSet",ft); - - makeSCWrapper("FluidKDTree",ft); - makeSCWrapper("FluidKDTreeQuery",ft); - - makeSCWrapper("FluidKMeans",ft); - makeSCWrapper("FluidKMeansQuery",ft); - - makeSCWrapper("FluidKNNClassifier",ft); - makeSCWrapper("FluidKNNClassifierQuery",ft); - - makeSCWrapper("FluidKNNRegressor",ft); - makeSCWrapper("FluidKNNRegressorQuery",ft); - - makeSCWrapper("FluidNormalize",ft); - makeSCWrapper("FluidNormalizeQuery",ft); - - makeSCWrapper("FluidRobustScale",ft); - makeSCWrapper("FluidRobustScaleQuery",ft); - - makeSCWrapper("FluidStandardize",ft); - makeSCWrapper("FluidStandardizeQuery",ft); - - makeSCWrapper("FluidPCA",ft); - makeSCWrapper("FluidPCAQuery",ft); - - makeSCWrapper("FluidMDS",ft); - - makeSCWrapper("FluidUMAP",ft); - makeSCWrapper("FluidUMAPQuery",ft); - - makeSCWrapper("FluidDataSetWr", ft); - - makeSCWrapper("FluidMLPRegressor",ft); - makeSCWrapper("FluidMLPRegressorQuery",ft); - - makeSCWrapper("FluidMLPClassifier",ft); - makeSCWrapper("FluidMLPClassifierQuery",ft); - - makeSCWrapper("FluidGrid",ft); -} diff --git a/src/FluidMelBands/CMakeLists.txt b/src/FluidMelBands/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidMelBands/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidMelBands/FluidMelBands.cpp b/src/FluidMelBands/FluidMelBands.cpp deleted file mode 100644 index 01aeff1..0000000 --- a/src/FluidMelBands/FluidMelBands.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidMelBands", ft); -} diff --git a/src/FluidNMFCross/CMakeLists.txt b/src/FluidNMFCross/CMakeLists.txt deleted file mode 100644 index 3693881..0000000 --- a/src/FluidNMFCross/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -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) diff --git a/src/FluidNMFCross/FluidNMFCross.cpp b/src/FluidNMFCross/FluidNMFCross.cpp deleted file mode 100644 index 5749fa5..0000000 --- a/src/FluidNMFCross/FluidNMFCross.cpp +++ /dev/null @@ -1,12 +0,0 @@ - -#include -#include - -static InterfaceTable *ft; - -PluginLoad(OfflineFluidDecompositionUGens) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidBufNMFCross", ft); -} diff --git a/src/FluidNMFFilter/CMakeLists.txt b/src/FluidNMFFilter/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidNMFFilter/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidNMFFilter/FluidNMFFilter.cpp b/src/FluidNMFFilter/FluidNMFFilter.cpp deleted file mode 100644 index 9324f20..0000000 --- a/src/FluidNMFFilter/FluidNMFFilter.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidNMFFilter", ft); -} diff --git a/src/FluidNMFMatch/CMakeLists.txt b/src/FluidNMFMatch/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidNMFMatch/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidNMFMatch/FluidNMFMatch.cpp b/src/FluidNMFMatch/FluidNMFMatch.cpp deleted file mode 100644 index e84b0e8..0000000 --- a/src/FluidNMFMatch/FluidNMFMatch.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidNMFMatch", ft); -} diff --git a/src/FluidNMFMatch/test.scd b/src/FluidNMFMatch/test.scd deleted file mode 100644 index a4bfc7e..0000000 --- a/src/FluidNMFMatch/test.scd +++ /dev/null @@ -1,40 +0,0 @@ -s.reboot; - - //from Fixed NMF example: -( -b = Buffer.read(s,FluidFilesPath("Tremblay-AaS-AcousticStrums-M.wav")); -c = Buffer.new(s); -x = Buffer.new(s); -e = Buffer.alloc(s,1,1); -y = Buffer.alloc(s,1,1); -) - - // train only 2 seconds -( -Routine { - FluidBufNMF.process(s,b.bufnum,0,88200,0,1, c.bufnum, x.bufnum, rank:10); - s.sync; - c.query; -}.play; -) - -// find the rank that has the picking sound by changing which channel to listen to -( - ~element = 9; - {PlayBuf.ar(10,c.bufnum)[~element]}.play -) - -// copy all the other ranks on itself and the picking dictionnary as the sole component of the 1st channel -( -Routine{ - (0..9).remove(~element).do({|chan|FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum)}); - s.sync; - e.query; - s.sync; - FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: ~element, nChansA: 1, srcBufNumB: e.bufnum, dstStartChanB: 1, dstBufNum: e.bufnum); - s.sync; - e.query; -}.play; -) - -{DelayN.ar(PlayBuf.ar(1,b.bufnum),0.1,1024/44100, FluidNMFMatch.kr(PlayBuf.ar(1,b.bufnum),e.bufnum,2))}.play diff --git a/src/FluidNMFMorph/CMakeLists.txt b/src/FluidNMFMorph/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidNMFMorph/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidNMFMorph/FluidNMFMorph.cpp b/src/FluidNMFMorph/FluidNMFMorph.cpp deleted file mode 100644 index fa38d8f..0000000 --- a/src/FluidNMFMorph/FluidNMFMorph.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidNMFMorph", ft); -} diff --git a/src/FluidNoveltyFeature/CMakeLists.txt b/src/FluidNoveltyFeature/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidNoveltyFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidNoveltyFeature/FluidNoveltyFeature.cpp b/src/FluidNoveltyFeature/FluidNoveltyFeature.cpp deleted file mode 100644 index 3051b5c..0000000 --- a/src/FluidNoveltyFeature/FluidNoveltyFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidNoveltyFeature", ft); -} diff --git a/src/FluidNoveltySlice/CMakeLists.txt b/src/FluidNoveltySlice/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidNoveltySlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidNoveltySlice/FluidNoveltySlice.cpp b/src/FluidNoveltySlice/FluidNoveltySlice.cpp deleted file mode 100644 index 4044310..0000000 --- a/src/FluidNoveltySlice/FluidNoveltySlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidNoveltySlice", ft); -} diff --git a/src/FluidOnsetFeature/CMakeLists.txt b/src/FluidOnsetFeature/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidOnsetFeature/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidOnsetFeature/FluidOnsetFeature.cpp b/src/FluidOnsetFeature/FluidOnsetFeature.cpp deleted file mode 100644 index e839151..0000000 --- a/src/FluidOnsetFeature/FluidOnsetFeature.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidOnsetFeature", ft); -} diff --git a/src/FluidOnsetSlice/CMakeLists.txt b/src/FluidOnsetSlice/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidOnsetSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidOnsetSlice/FluidOnsetSlice.cpp b/src/FluidOnsetSlice/FluidOnsetSlice.cpp deleted file mode 100644 index aec600f..0000000 --- a/src/FluidOnsetSlice/FluidOnsetSlice.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidOnsetSlice", ft); -} diff --git a/src/FluidPitch/CMakeLists.txt b/src/FluidPitch/CMakeLists.txt deleted file mode 100644 index 711f3d3..0000000 --- a/src/FluidPitch/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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/FluidPitch/FluidPitch.cpp b/src/FluidPitch/FluidPitch.cpp deleted file mode 100644 index b1d8a87..0000000 --- a/src/FluidPitch/FluidPitch.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidPitch", ft); -} diff --git a/src/FluidSTFTPass/CMakeLists.txt b/src/FluidSTFTPass/CMakeLists.txt deleted file mode 100755 index 711f3d3..0000000 --- a/src/FluidSTFTPass/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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/FluidSTFTPass/FluidSTFTPass.cpp b/src/FluidSTFTPass/FluidSTFTPass.cpp deleted file mode 100644 index 9fff5e4..0000000 --- a/src/FluidSTFTPass/FluidSTFTPass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidSTFTPass", ft); -} diff --git a/src/FluidSines/CMakeLists.txt b/src/FluidSines/CMakeLists.txt deleted file mode 100755 index 711f3d3..0000000 --- a/src/FluidSines/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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/FluidSines/FluidSines.cpp b/src/FluidSines/FluidSines.cpp deleted file mode 100644 index 93ac2a7..0000000 --- a/src/FluidSines/FluidSines.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidSines", ft); -} diff --git a/src/FluidSines/test.scd b/src/FluidSines/test.scd deleted file mode 100644 index dfaffef..0000000 --- a/src/FluidSines/test.scd +++ /dev/null @@ -1,13 +0,0 @@ -s.reboot; - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); -b.play - -// basic param -{FluidSines.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play - -// sexier params -{FluidSines.ar(PlayBuf.ar(1,b.bufnum,loop:1),30,MouseX.kr(),5)}.play - -// null test (the process add a latency of (( hopSize * minTrackLen) + windowSize) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidSines.ar(sig).sum - DelayN.ar(sig, 1, ((( 512 * 15) + 2048)/ s.sampleRate))]}.play diff --git a/src/FluidSpectralShape/CMakeLists.txt b/src/FluidSpectralShape/CMakeLists.txt deleted file mode 100644 index 9646a4e..0000000 --- a/src/FluidSpectralShape/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidSpectralShape/FluidSpectralShape.cpp b/src/FluidSpectralShape/FluidSpectralShape.cpp deleted file mode 100644 index 7c6b19b..0000000 --- a/src/FluidSpectralShape/FluidSpectralShape.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -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("FluidSpectralShape", ft); -} diff --git a/src/FluidStats/CMakeLists.txt b/src/FluidStats/CMakeLists.txt deleted file mode 100644 index 711f3d3..0000000 --- a/src/FluidStats/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -# 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/FluidStats/FluidStats.cpp b/src/FluidStats/FluidStats.cpp deleted file mode 100644 index 6442231..0000000 --- a/src/FluidStats/FluidStats.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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(FluidStatsUGen) -{ - ft = inTable; - using namespace fluid::client; - makeSCWrapper("FluidStats", ft); -} diff --git a/src/FluidTransientSlice/CMakeLists.txt b/src/FluidTransientSlice/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidTransientSlice/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidTransientSlice/FluidTransientSlice.cpp b/src/FluidTransientSlice/FluidTransientSlice.cpp deleted file mode 100644 index 987097d..0000000 --- a/src/FluidTransientSlice/FluidTransientSlice.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidTransientSlice", ft); -} diff --git a/src/FluidTransientSlice/test.scd b/src/FluidTransientSlice/test.scd deleted file mode 100644 index b82344e..0000000 --- a/src/FluidTransientSlice/test.scd +++ /dev/null @@ -1,21 +0,0 @@ -s.reboot; - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); - -// basic param (the process add a latency of (blockSize + padding - order) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidTransientSlice.ar(sig)*0.5, DelayN.ar(sig, 1, ((256 + 128 - 20)/ s.sampleRate))]}.play - -// sexier params -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidTransientSlice.ar(sig,order:80,debounce:2205)*0.5, DelayN.ar(sig, 1, ((256 + 128 - 80)/ s.sampleRate))]}.play - -// more musical trans-trigged autopan -( -{ - var sig, trig, syncd, pan; - sig = PlayBuf.ar(1,b.bufnum,loop:1); - trig = FluidTransientSlice.ar(sig,order:10,debounce:2205); - syncd = DelayN.ar(sig, 1, ((256 + 128 - 10)/ s.sampleRate)); - pan = TRand.ar(-1,1,trig); - Pan2.ar(syncd,pan); -}.play -) \ No newline at end of file diff --git a/src/FluidTransients/CMakeLists.txt b/src/FluidTransients/CMakeLists.txt deleted file mode 100755 index 9646a4e..0000000 --- a/src/FluidTransients/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# 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/FluidTransients/FluidTransients.cpp b/src/FluidTransients/FluidTransients.cpp deleted file mode 100644 index be7816f..0000000 --- a/src/FluidTransients/FluidTransients.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -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("FluidTransients", ft); -} diff --git a/src/FluidTransients/test.scd b/src/FluidTransients/test.scd deleted file mode 100644 index 363a719..0000000 --- a/src/FluidTransients/test.scd +++ /dev/null @@ -1,14 +0,0 @@ -s.reboot; -s.quit - -b = Buffer.read(s,"../../release-packaging/AudioFiles/Tremblay-AaS-SynthTwoVoices-M.wav".resolveRelative); - -// basic param -{FluidTransients.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play - -// sexier params -{FluidTransients.ar(PlayBuf.ar(1,b.bufnum,loop:1),80,threshFwd:MouseX.kr(0,5),threshBack:MouseY.kr(0,2))}.play - -// null test (the process add a latency of (blockSize + padding - order) samples -{var sig = PlayBuf.ar(1,b.bufnum,loop:1); [FluidTransients.ar(sig).sum - DelayN.ar(sig, 1, ((256 + 128 - 20)/ s.sampleRate))]}.play -