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 #173

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
...
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
* text=auto

*.cmake text
*.cpp text
*.csv text
*.gitignore text
*.hpp text
*.in text
*.json text
*.md text
*.sc text
*.scd text
*.schelp text
*.txt text
*.yaml text
*.yml text

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

- 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 SuperCollider Nightly Release
artifacts: "FluCoMa*"
body: "This is a nightly build of the FluCoMa SuperCollider package. As such, be warned there may be bugs or other unexpected behaviour. The build hash is ${{ github.sha }}"
files: FluCoMa*
tag: nightly
prerelease: true
tag_name: nightly
draft: false
allowUpdates: true
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017-2019 University of Huddersfield.
# Copyright University of Huddersfield.
# Licensed under the BSD-3 License.
# See license.md file in the project root for full license information.
# This project has received funding from the European Research Council (ERC)
Expand Down Expand Up @@ -132,11 +132,6 @@ if(APPLE OR WIN32)
set(CMAKE_SHARED_MODULE_SUFFIX ".scx")
endif()

#needed for complaint-free static linking with GCC
if(CMAKE_COMPILER_IS_GNUCXX)
target_compile_options( HISSTools_FFT PUBLIC -fPIC )
endif()

#sandbox regrettable dependency on SC internals for SendReply()

if(SYSTEM_BOOST)
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
94 changes: 45 additions & 49 deletions include/FluidSCWrapper.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 @@ -24,10 +24,10 @@ template <typename C>
class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
{
using FloatControlsIter = impl::FloatControlsIter;
//I would like to template these to something more scaleable, but baby steps
friend class impl::RealTime<C,FluidSCWrapper>;
friend class impl::NonRealTime<C,FluidSCWrapper>;

// I would like to template these to something more scaleable, but baby steps
friend class impl::RealTime<C, FluidSCWrapper>;
friend class impl::NonRealTime<C, FluidSCWrapper>;

static void doVersion(Unit*, sc_msg_iter*)
{
Expand All @@ -38,12 +38,14 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
bool mInit{false};

public:

template <size_t N, typename T>
using ArgumentSetter = typename ClientParams<FluidSCWrapper>::template Setter<sc_msg_iter, N, T>;
using ArgumentSetter =
typename ClientParams<FluidSCWrapper>::template Setter<sc_msg_iter, N, T>;

template <size_t N, typename T>
using ControlSetter = typename ClientParams<FluidSCWrapper>::template Setter<FloatControlsIter, N, T>;
using ControlSetter =
typename ClientParams<FluidSCWrapper>::template Setter<FloatControlsIter,
N, T>;

using Client = C;
using ParamSetType = typename C::ParamSetType;
Expand All @@ -66,73 +68,67 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase<C>
getInterfaceTable(ft);
impl::FluidSCWrapperBase<Client>::setup(ft, name);
ft->fDefineUnitCmd(name, "version", doVersion);

std::string commandName("/");
commandName += getName();
commandName += "/version";
ft->fDefinePlugInCmd(commandName.c_str(),
[](World*, void*, sc_msg_iter*, void*){ doVersion(nullptr,nullptr); },
nullptr);

ft->fDefinePlugInCmd(
commandName.c_str(),
[](World*, void*, sc_msg_iter*, void*) { doVersion(nullptr, nullptr); },
nullptr);
}

static auto& setParams(Unit* x, ParamSetType& p, FloatControlsIter& inputs,
Allocator& alloc, bool constrain = false,
bool initialized = true)
{
bool verbose = x->mWorld->mVerbosity > 0;

using Reportage = decltype(static_cast<FluidSCWrapper*>(x)->mReportage);

Reportage* reportage = initialized ? &(static_cast<FluidSCWrapper*>(x)->mReportage) : new Reportage();

Reportage* reportage = initialized
? &(static_cast<FluidSCWrapper*>(x)->mReportage)
: new Reportage();

p.template setParameterValuesRT<ControlSetter>(
verbose ? reportage : nullptr, x, inputs, p, alloc);
if (constrain) p.constrainParameterValuesRT(verbose ? reportage : nullptr);
if(verbose)
if (verbose)
{
for(auto& r:*reportage)
for (auto& r : *reportage)
{
if(!r.ok()) printResult(x->mParent->mNode.mWorld, r);
if (!r.ok()) printResult(x->mParent->mNode.mWorld, r);
}
}
if(!initialized) delete reportage;
if (!initialized) delete reportage;
return p;
}

// static void printResult(SharedState<C>& x, Result& r)
// {
// if (!x.get() || !x->mNodeAlive) return;
// FluidSCWrapper::printResult(x->mNode->mWorld, r);
// }

static void printResult(World* w,Result& r)
static void printResult(World* w, Result& r)
{

switch (r.status())
{
case Result::Status::kWarning:
{
if (!w || w->mVerbosity > 0)
std::cout << "WARNING: " << getName() << " - " << r.message().c_str() << '\n';
break;
}
case Result::Status::kError:
{
std::cout << "ERROR: " << getName() << " - " << r.message().c_str() << '\n';
break;
}
case Result::Status::kCancelled:
{
std::cout << getName() << ": Task cancelled\n" << '\n';
break;
}
default:
{
}
}
case Result::Status::kWarning: {
if (!w || w->mVerbosity > 0)
std::cout << "WARNING: " << getName() << " - " << r.message().c_str()
<< '\n';
break;
}
case Result::Status::kError: {
std::cout << "ERROR: " << getName() << " - " << r.message().c_str()
<< '\n';
break;
}
case Result::Status::kCancelled: {
std::cout << getName() << ": Task cancelled\n" << '\n';
break;
}
default: {
}
}
}

private:
std::array<Result, Client::getParameterDescriptors().size()> mReportage;
};
Expand Down
2 changes: 1 addition & 1 deletion include/SCBufferAdaptor.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 Down
Loading
Loading