Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release] 1.0.7 #50

Merged
merged 16 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -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
...
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* text=auto

*.yml text
*.gitignore text
*.maxpat text
*.hpp text
*.cmake text
*.md text
*.txt text
*.yaml text

*.png binary
11 changes: 6 additions & 5 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,23 @@ jobs:
with:
name: winbuild

- uses: dev-drprasad/[email protected].0
- uses: dev-drprasad/[email protected].1
with:
delete_release: true # default: false
tag_name: nightly # tag name to delete
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
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 }}"
files: FluCoMa*
tag: nightly
prerelease: true
tag_name: nightly
draft: false
allowUpdates: true



1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ winbuild
**/.DS_Store
release-packaging/
docs
.vscode
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
36 changes: 18 additions & 18 deletions include/FluidCLIWrapper.hpp
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -10,8 +10,8 @@ under the European Union’s Horizon 2020 research and innovation programme

#pragma once

#include <AudioFile/IAudioFile.h>
#include <AudioFile/OAudioFile.h>
#include <audio_file/in_file.hpp>
#include <audio_file/out_file.hpp>
#include <clients/common/FluidBaseClient.hpp>
#include <clients/common/OfflineClient.hpp>
#include <clients/common/ParameterSet.hpp>
Expand Down Expand Up @@ -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());
}
}

Expand Down Expand Up @@ -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<uint16_t>(
std::min(asSigned(std::numeric_limits<uint16_t>::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<uint32_t>(numFrames()));
file.write_interleaved(mData.data(), static_cast<uint32_t>(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
Expand Down Expand Up @@ -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<Audio::Error> errors = Audio::extractErrorsFromFlags(ifile->readError());
for(auto&& e:errors) std::cerr << Audio::getErrorString(e) << '\n';
std::vector<AudioFile::error_type> errors = AudioFile::extract_errors_from_flags(ifile->readError());
for(auto&& e:errors) std::cerr << AudioFile::error_string(e) << '\n';
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions scripts/MakeCLIStub.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -34,7 +34,6 @@ function (add_cli_binary name source)
PRIVATE
FLUID_DECOMPOSITION
FLUID_CLI_WRAPPER
HISSTools_AudioFile
)

target_include_directories(
Expand Down
3 changes: 1 addition & 2 deletions scripts/target_post.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -21,7 +21,6 @@ target_link_libraries(${PROG}
PRIVATE
FLUID_DECOMPOSITION
FLUID_CLI_WRAPPER
HISSTools_AudioFile
)

target_include_directories(
Expand Down
Loading