From e01e947905240200378ffd0e9d54dc2b1bbcdea0 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 10:49:49 +0000 Subject: [PATCH 01/14] Tag release to correct commit --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 211ecf2..f0f04d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,4 +101,5 @@ jobs: files: FluCoMa* prerelease: true tag_name: ${{ needs.linux.outputs.version }} + target_commitish: ${{ github.sha }} draft: false From 305620b197c6dbeecbb0431df8bda9bac545f65e Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 11:45:00 +0000 Subject: [PATCH 02/14] release: delete pre-existing to refresh tag --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0f04d4..92ff350 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,6 +93,15 @@ jobs: name: winbuild #### UPLOAD RELEASE #### + + - name: delete pre-existing release + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const { owner, repo } = context.repo + await github.rest.git.deleteRef({ owner, repo, ref: needs.linux.outputs.version }) + - name: package and upload uses: softprops/action-gh-release@v1 with: From 771034d67ee352be718e1c3dda0d3886a2e762b5 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 12:15:29 +0000 Subject: [PATCH 03/14] release: passing data to gh-script --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92ff350..a6c7a01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,11 +96,13 @@ jobs: - name: delete pre-existing release uses: actions/github-script@v5 + env: + DATA: ${{ needs.linux.outputs.version }} with: github-token: ${{secrets.GITHUB_TOKEN}} script: | const { owner, repo } = context.repo - await github.rest.git.deleteRef({ owner, repo, ref: needs.linux.outputs.version }) + await github.rest.git.deleteRef({ owner, repo, ref: process.env.DATA }) - name: package and upload uses: softprops/action-gh-release@v1 From 405bb6ac8aafd639b32ee5407494af5b252b5167 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 12:46:11 +0000 Subject: [PATCH 04/14] release: try again to zap pre-existing --- .github/workflows/release.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6c7a01..3ccc335 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,14 +95,12 @@ jobs: #### UPLOAD RELEASE #### - name: delete pre-existing release - uses: actions/github-script@v5 - env: - DATA: ${{ needs.linux.outputs.version }} + uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const { owner, repo } = context.repo - await github.rest.git.deleteRef({ owner, repo, ref: process.env.DATA }) + delete_release: true # default: false + tag_name: ${{ needs.linux.outputs.version }} # tag name to delete + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: package and upload uses: softprops/action-gh-release@v1 From fdcbaf3cb79a80af2f95a0268b6e55c4fe9b8209 Mon Sep 17 00:00:00 2001 From: tremblap Date: Mon, 27 Feb 2023 20:54:02 +0000 Subject: [PATCH 05/14] adding vs hidden files to git ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f77c605..54ee037 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ winbuild **/.DS_Store release-packaging/ docs +.vscode From aa0edbc9d33dc29f438380c20ad7bd9f40076942 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 28 Mar 2023 14:06:32 +0100 Subject: [PATCH 06/14] amended script tag management version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ccc335..6ce4e06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,7 +95,7 @@ jobs: #### UPLOAD RELEASE #### - name: delete pre-existing release - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + uses: dev-drprasad/delete-tag-and-release@v0.2.1 with: delete_release: true # default: false tag_name: ${{ needs.linux.outputs.version }} # tag name to delete From 558eb048a9ef327a650734274736fcc92373c580 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 30 Mar 2023 15:56:51 +0100 Subject: [PATCH 07/14] remove date copyright --- CMakeLists.txt | 2 +- LICENSE.md | 2 +- include/FluidCLIWrapper.hpp | 2 +- scripts/MakeCLIStub.cmake | 2 +- scripts/target_post.cmake | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac534df..4a110a2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. +# Copyright University of Huddersfield. # Licensed under the BSD-3 License. # See license.md file in the project root for full license information. # This project has received funding from the European Research Council (ERC) diff --git a/LICENSE.md b/LICENSE.md index e0c0ffc..3b3d13c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2017-2020 University of Huddersfield +Copyright University of Huddersfield All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/FluidCLIWrapper.hpp b/include/FluidCLIWrapper.hpp index 564acb3..91dc245 100644 --- a/include/FluidCLIWrapper.hpp +++ b/include/FluidCLIWrapper.hpp @@ -1,6 +1,6 @@ /* Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -Copyright 2017-2019 University of Huddersfield. +Copyright University of Huddersfield. Licensed under the BSD-3 License. See license.md file in the project root for full license information. This project has received funding from the European Research Council (ERC) diff --git a/scripts/MakeCLIStub.cmake b/scripts/MakeCLIStub.cmake index 9210b67..39a906d 100644 --- a/scripts/MakeCLIStub.cmake +++ b/scripts/MakeCLIStub.cmake @@ -1,5 +1,5 @@ # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. +# Copyright University of Huddersfield. # Licensed under the BSD-3 License. # See license.md file in the project root for full license information. # This project has received funding from the European Research Council (ERC) diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake index 647b75a..215e1f6 100644 --- a/scripts/target_post.cmake +++ b/scripts/target_post.cmake @@ -1,5 +1,5 @@ # Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) -# Copyright 2017-2019 University of Huddersfield. +# Copyright University of Huddersfield. # Licensed under the BSD-3 License. # See license.md file in the project root for full license information. # This project has received funding from the European Research Council (ERC) From 674d5b4df13a3b71274549b6277287f89f700762 Mon Sep 17 00:00:00 2001 From: tremblap Date: Thu, 30 Mar 2023 16:42:11 +0100 Subject: [PATCH 08/14] Update nightly.yaml --- .github/workflows/nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index ff7f132..5f4eec4 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -90,7 +90,7 @@ jobs: with: name: winbuild - - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + - uses: dev-drprasad/delete-tag-and-release@v0.2.1 with: delete_release: true # default: false tag_name: nightly # tag name to delete From 6c63b5b38f9f2f27267acb0cc2c39c044a4f7802 Mon Sep 17 00:00:00 2001 From: lewardo Date: Mon, 14 Aug 2023 13:41:58 +0100 Subject: [PATCH 09/14] gitattributes sane defaults --- .gitattributes | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..01a04e6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +* text=auto + +*.yml text +*.gitignore text +*.maxpat text +*.hpp text +*.cmake text +*.md text +*.txt text +*.yaml text + +*.png binary From c07bda7ca491e3810975e3d10d7ef51235192f63 Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Mon, 14 Aug 2023 18:36:15 +0200 Subject: [PATCH 10/14] Update nightly.yaml --- .github/workflows/nightly.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 5f4eec4..2117205 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -97,15 +97,16 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: package and upload - uses: softprops/action-gh-release@v1 + - name: create release + uses: ncipollo/release-action@v1 with: - name: FluCoMa CLI Nightly Release + name: FluCoMa Max Nightly Release + artifacts: "*.zip" body: "This is a nightly build of the FluCoMa CLI tools. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" - files: FluCoMa* + tag: nightly prerelease: true - tag_name: nightly draft: false + allowUpdates: false From f99a2add3229fcc30dc5d3417147655ee846b2df Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Mon, 14 Aug 2023 18:56:05 +0200 Subject: [PATCH 11/14] Update nightly.yaml --- .github/workflows/nightly.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 2117205..c5dee9d 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -100,13 +100,13 @@ jobs: - name: create release uses: ncipollo/release-action@v1 with: - name: FluCoMa Max Nightly Release + name: FluCoMa CLI Nightly Release artifacts: "*.zip" body: "This is a nightly build of the FluCoMa CLI tools. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" tag: nightly prerelease: true draft: false - allowUpdates: false + allowUpdates: true From 809404dd0fa540436a95ca8a7ca749bb864d403b Mon Sep 17 00:00:00 2001 From: James Bradbury Date: Mon, 14 Aug 2023 19:33:48 +0200 Subject: [PATCH 12/14] Update nightly.yaml Capture all FluCoMa release assets with wildcard --- .github/workflows/nightly.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index c5dee9d..3ffb76a 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -101,7 +101,7 @@ jobs: uses: ncipollo/release-action@v1 with: name: FluCoMa CLI Nightly Release - artifacts: "*.zip" + artifacts: "FluCoMa*" body: "This is a nightly build of the FluCoMa CLI tools. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}" tag: nightly prerelease: true From 2eac143b7dc32f5c00878173bb7d1332a48b3fdc Mon Sep 17 00:00:00 2001 From: tremblap Date: Mon, 4 Sep 2023 19:30:21 +0200 Subject: [PATCH 13/14] add clang-format rules --- .clang-format | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..90dfd01 --- /dev/null +++ b/.clang-format @@ -0,0 +1,121 @@ +--- +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: true +AlignEscapedNewlines: Right +AlignOperands: true +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: true +BinPackArguments: true +BinPackParameters: true +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: false + AfterFunction: true + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: true + AfterExternBlock: false + BeforeCatch: false + BeforeElse: true + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 80 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: false +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IncludeBlocks: Merge +# Try and group includes by 'locality' +# We use "" with rel paths for headers in same repo +# Headers in quotes wiht no relative path at top +# Group ../ and ../../ with different priorities, so they get sorted separately +# <> headers *with a folder break* likely not to be STL -> STL / systems headers last +IncludeCategories: + - Regex: '<.+/' + Priority: 4 + - Regex: '"../../' + Priority: 3 + - Regex: '../' # + Priority: 2 + - Regex: '".+hpp"' + Priority: 1 +IncludeIsMainRegex: '(Test)?$' +IndentCaseLabels: false +IndentPPDirectives: None +IndentWidth: 2 +IndentWrappedFunctionNames: false +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 2 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 2 +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Left +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: true +SpaceAfterTemplateKeyword: true +SpaceBeforeAssignmentOperators: true +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Cpp11 +TabWidth: 8 +UseTab: Never +... From 16de9600713e077530c27de88258267d0c2e740a Mon Sep 17 00:00:00 2001 From: Alex Harker Date: Fri, 1 Mar 2024 17:16:38 +0000 Subject: [PATCH 14/14] Updates for hisstools library header-only (#49) --- include/FluidCLIWrapper.hpp | 34 +++++++++++++++++----------------- scripts/MakeCLIStub.cmake | 1 - scripts/target_post.cmake | 1 - 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/include/FluidCLIWrapper.hpp b/include/FluidCLIWrapper.hpp index 91dc245..5a19865 100644 --- a/include/FluidCLIWrapper.hpp +++ b/include/FluidCLIWrapper.hpp @@ -10,8 +10,8 @@ under the European Union’s Horizon 2020 research and innovation programme #pragma once -#include -#include +#include +#include #include #include #include @@ -41,15 +41,15 @@ class CLIBufferAdaptor : public BufferAdaptor { // TODO: only read if needed!... - HISSTools::IAudioFile file(mPath); + htl::in_audio_file file(mPath); - mReadError = file.getErrorFlags(); + mReadError = file.error_flags(); - if (file.isOpen()) + if (file.is_open()) { - resize(file.getFrames(), file.getChannels(), file.getSamplingRate()); + resize(file.frames(), file.channels(), file.sampling_rate()); file.seek(); - file.readInterleaved(mData.data(),file.getFrames()); + file.read_interleaved(mData.data(),file.frames()); } } @@ -82,25 +82,25 @@ class CLIBufferAdaptor : public BufferAdaptor { // TODO: file extensions/paths - constexpr auto fileType = HISSTools::BaseAudioFile::kAudioFileWAVE; - constexpr auto depthType = HISSTools::BaseAudioFile::kAudioFileFloat32; + constexpr auto fileType = htl::audio_file_format::file_type::wave; + constexpr auto depthType = htl::audio_file_format::pcm_format::float32; uint16_t chans = static_cast( std::min(asSigned(std::numeric_limits::max()), numChans())); - HISSTools::OAudioFile file(mPath, fileType, depthType, chans, + htl::out_audio_file file(mPath, fileType, depthType, chans, mSamplingRate); - if (file.isOpen()) + if (file.is_open()) { std::cout << "Writing " << mPath << '\n'; file.seek(); - file.writeInterleaved(mData.data(), static_cast(numFrames())); + file.write_interleaved(mData.data(), static_cast(numFrames())); - if(file.getIsError()) + if(file.is_error()) { result = false; - for(auto&& e:file.getErrors()) std::cerr << HISSTools::BaseAudioFile::getErrorString(e) << '\n'; + for(auto&& e:file.get_errors()) std::cerr << file.error_string(e) << '\n'; } } else @@ -385,10 +385,10 @@ class CLIWrapper if(ifile->readError()) { std::cout << ifile->readError() << '\n'; - using Audio = HISSTools::BaseAudioFile; + using AudioFile = htl::base_audio_file; result = false; - std::vector errors = Audio::extractErrorsFromFlags(ifile->readError()); - for(auto&& e:errors) std::cerr << Audio::getErrorString(e) << '\n'; + std::vector errors = AudioFile::extract_errors_from_flags(ifile->readError()); + for(auto&& e:errors) std::cerr << AudioFile::error_string(e) << '\n'; } } } diff --git a/scripts/MakeCLIStub.cmake b/scripts/MakeCLIStub.cmake index 39a906d..70baa1a 100644 --- a/scripts/MakeCLIStub.cmake +++ b/scripts/MakeCLIStub.cmake @@ -34,7 +34,6 @@ function (add_cli_binary name source) PRIVATE FLUID_DECOMPOSITION FLUID_CLI_WRAPPER - HISSTools_AudioFile ) target_include_directories( diff --git a/scripts/target_post.cmake b/scripts/target_post.cmake index 215e1f6..1c9d3ef 100644 --- a/scripts/target_post.cmake +++ b/scripts/target_post.cmake @@ -21,7 +21,6 @@ target_link_libraries(${PROG} PRIVATE FLUID_DECOMPOSITION FLUID_CLI_WRAPPER - HISSTools_AudioFile ) target_include_directories(