Skip to content

Commit

Permalink
[Release] 1.0.0-beta7 (#178)
Browse files Browse the repository at this point in the history
* Add pointwise inversion to PCA

* batchsize was not capped down, leading to hilarious crashes (#63)

* updating credits with the new team

* Include SHAs for flucoma-core and current project in version string

* Conform version string with SHAs to semantic versioning spec

* add chroma feature to NoveltySlice

* Toggle BLAS settings for compiling on APPLE (#67)

* disable blas for compiling on macos

* remove line according to O's suggestion

* error in the client of (buf)noveltyslice since introducing chroma as feature

* Enhance/versioning (#75)

* Remove old header template

* Add in TU template and declaration header

* update CMake to new version scheme

* Get SHA from top level source folder

* ensure git is found

* fix issue #23 - zeroing the output vector in the mTracker loop (#82)

* fix issue #23 - zeroing the output vector in the mTracker loop

* now really corrected thanks to @weefuzzy

* Initial unit tests for `include/data` (#83)

* initial FluidTensor tests

* add assert death test to cmake

* more assert death

* fix compile tests

* Working assertion tests, it seems

* Add first FluidTensorView tests

* tidy up cmake a bit

* factor out EqualRange matcher to own header

* Add FluidTensorSupport tests

* rollback to Catch2 

for compatability with approvaltests.cpp

* add tests for FluidDataSet

bubba's first approval test ✨

* test print for bigger range as well

* tidy cmake

* make building tests optional

* remove spurious files from tracking

* add workflow for CI

* make workflow manually triggerable

* correct workflow file extention

* pleading and bargaining with github

* getting event name right

* FluidTensorSlice: fix terrible and aged typename mistake

* workflow: try and cache whole build folder

* wotkflow: unbreak yaml

* workflow: disable fail-fast

* Amend upper frequency limit of mel bands in NoveltySlice to 20kHz

* [Enhance] FluCoMa-wide DataSets as a resource (#88)

* treat wav files as binary

* move audio files to resources folder

* add datasets

* add pre-trained neural networks

* add flucoma corpus

* move datasets to data

* BufAudioTransport now has A-B based arguments

* fix mistakenly fixed type signature in FluidSink

* Tests for framing and overlap add bits

* remove build folder caching as a bad job 

(failing forever once cache goes bad)

* Test/sc ports/slicers (#91)

* Working port of SC NoveltySlice tests

* formatting and constifying

* use generated path for test signal loading

* update testsignals header and cmake

* Add TestOnsetSegmention, update TestNoveltySeg for new resource loading

* Add Onsets and update novelty in CMake

* Add EnvelopeSeg tests and some missing headers

* Add EnvelopeGate tests

* Add TransientSlice tests

* update location of audio files

* add missing function to signals.cpp.in

* Fix test signal for AmpSlice test

* try and speed up test run

* FluidSource test blackholed on MSVC

It doesn't like GENERATE_REF nested in GENERATE. Nosir.

* ignore all build folders for a quieter life

* bump Eigen version (#93)

* bump Eigen version

* note new Eigen version in readme

* add mammoth dataset

* OnsetSlice and NoveltySlice clients: fix block size dependency (#96)

Makes tracking of `frameOffset` stateful across calls to `process` so that odd hop sizes are handled correctly

* Use `operator<<=` for copy to / from FluidTensorView

* update all instances of FluidTensorView copying

* Signals.cpp.in fix lingering copy assignment

* Add conventional, shallow copy / move assignment to FluidTensorView

* `SliceIterator::end()` fix (#97)

* fix problem with 0-size slices and end() sentinels

* adds basic test for slice ietrator fix

* annotate datasets

* add mfcc for fluid_corpus

* update mfcc dataset

* bump version to beta5 (#101)

* Add pointwise inversion to PCA

* Enhance `ParameterSet` (#103)

* Meta: Add HO function to apply function only to select indicies of a tuple

* ParameterSet: Easier application of functions by type with lambdas + discovering the count of params by type

* BufStats: Weights should be an input buffer

* [Fix] Make error language more consistent (#118)

* replace incorrect use of label where identifier is intended

* dont shorten identifier to id

* rename DuplicateLabel to DuplicateIdentifier

* Enhance/slicer detection curves (#114)

* EnvelopeSegmentation: refactor into feature curve + detector

* NoveltySegementation: refactor into feature curve + detector

* OnsetSegmentation: refactor into feature curve + detector

* Add OnsetFeatureClient

* Add NoveltyFeatureClient

* Add AmpFeatureClient

* correct novelty and onset curves for nrt

* fix longstanding assumption in NRT wrapper that client latency == window size

* Update NoveltyFeatureClient to new analysisSettings method

* remove old FIXME comment

* fix cout call killing test on windows

* Missing update change to OnsetFeatureClient::analysisSettings()

* algorithms: NoveltyCurve -> NoveltyFeature

* Novelty: Update algorihtm class name, and change 'feature' param to algorithm

* Also update names in NovletySegmentation

* BufOnsetFeature correct output buffer name

* Novelty / OnsetFeature - cache descriptor values for when sigvs < hop

* more information on failing test thx

* Enhance/fewer warnings (#85)

* excess semicolons

* unused variables

* type narrowing / signed-unsigned

* integer conversions: new Eigen::Array alias for index rather than int

* json: stop embedding nlohmann library and instead fetch at configure time (#105)

* ParameterDescriptors: make more composable by adding insert function (#107)

* FluidJSON: Avoid some implicit conversion on import that could confuse compiler

* Deal with some warnings

* EnvelopeSegmentation: pass correct params to Envelope

* FluidTensorView deep copy gets distinct operator (#100)

* Add pointwise inversion to PCA

* Use `operator<<=` for copy to / from FluidTensorView

* update all instances of FluidTensorView copying

* Signals.cpp.in fix lingering copy assignment

* Add conventional, shallow copy / move assignment to FluidTensorView

* `SliceIterator::end()` fix (#97)

* fix problem with 0-size slices and end() sentinels

* adds basic test for slice ietrator fix

* annotate datasets

* add mfcc for fluid_corpus

* update mfcc dataset

* bump version to beta5 (#101)

* [Release] 1.0.0-beta5 (#102)

* batchsize was not capped down, leading to hilarious crashes (#63)

* updating credits with the new team

* Include SHAs for flucoma-core and current project in version string

* Conform version string with SHAs to semantic versioning spec

* add chroma feature to NoveltySlice

* Toggle BLAS settings for compiling on APPLE (#67)

* disable blas for compiling on macos

* remove line according to O's suggestion

* error in the client of (buf)noveltyslice since introducing chroma as feature

* Enhance/versioning (#75)

* Remove old header template

* Add in TU template and declaration header

* update CMake to new version scheme

* Get SHA from top level source folder

* ensure git is found

* fix issue #23 - zeroing the output vector in the mTracker loop (#82)

* fix issue #23 - zeroing the output vector in the mTracker loop

* now really corrected thanks to @weefuzzy

* Initial unit tests for `include/data` (#83)

* initial FluidTensor tests

* add assert death test to cmake

* more assert death

* fix compile tests

* Working assertion tests, it seems

* Add first FluidTensorView tests

* tidy up cmake a bit

* factor out EqualRange matcher to own header

* Add FluidTensorSupport tests

* rollback to Catch2 

for compatability with approvaltests.cpp

* add tests for FluidDataSet

bubba's first approval test ✨

* test print for bigger range as well

* tidy cmake

* make building tests optional

* remove spurious files from tracking

* add workflow for CI

* make workflow manually triggerable

* correct workflow file extention

* pleading and bargaining with github

* getting event name right

* FluidTensorSlice: fix terrible and aged typename mistake

* workflow: try and cache whole build folder

* wotkflow: unbreak yaml

* workflow: disable fail-fast

* Amend upper frequency limit of mel bands in NoveltySlice to 20kHz

* [Enhance] FluCoMa-wide DataSets as a resource (#88)

* treat wav files as binary

* move audio files to resources folder

* add datasets

* add pre-trained neural networks

* add flucoma corpus

* move datasets to data

* BufAudioTransport now has A-B based arguments

* fix mistakenly fixed type signature in FluidSink

* Tests for framing and overlap add bits

* remove build folder caching as a bad job 

(failing forever once cache goes bad)

* Test/sc ports/slicers (#91)

* Working port of SC NoveltySlice tests

* formatting and constifying

* use generated path for test signal loading

* update testsignals header and cmake

* Add TestOnsetSegmention, update TestNoveltySeg for new resource loading

* Add Onsets and update novelty in CMake

* Add EnvelopeSeg tests and some missing headers

* Add EnvelopeGate tests

* Add TransientSlice tests

* update location of audio files

* add missing function to signals.cpp.in

* Fix test signal for AmpSlice test

* try and speed up test run

* FluidSource test blackholed on MSVC

It doesn't like GENERATE_REF nested in GENERATE. Nosir.

* ignore all build folders for a quieter life

* bump Eigen version (#93)

* bump Eigen version

* note new Eigen version in readme

* add mammoth dataset

* OnsetSlice and NoveltySlice clients: fix block size dependency (#96)

Makes tracking of `frameOffset` stateful across calls to `process` so that odd hop sizes are handled correctly

* `SliceIterator::end()` fix (#97)

* fix problem with 0-size slices and end() sentinels

* adds basic test for slice ietrator fix

* annotate datasets

* add mfcc for fluid_corpus

* update mfcc dataset

* bump version to beta5 (#101)

Co-authored-by: tremblap <[email protected]>
Co-authored-by: weefuzzy <[email protected]>
Co-authored-by: g-roma <[email protected]>
Co-authored-by: Ted Moore <[email protected]>

* Add pointwise inversion to PCA

* Enhance `ParameterSet` (#103)

* Meta: Add HO function to apply function only to select indicies of a tuple

* ParameterSet: Easier application of functions by type with lambdas + discovering the count of params by type

* BufStats: Weights should be an input buffer

* [Fix] Make error language more consistent (#118)

* replace incorrect use of label where identifier is intended

* dont shorten identifier to id

* rename DuplicateLabel to DuplicateIdentifier

* Enhance/slicer detection curves (#114)

* EnvelopeSegmentation: refactor into feature curve + detector

* NoveltySegementation: refactor into feature curve + detector

* OnsetSegmentation: refactor into feature curve + detector

* Add OnsetFeatureClient

* Add NoveltyFeatureClient

* Add AmpFeatureClient

* correct novelty and onset curves for nrt

* fix longstanding assumption in NRT wrapper that client latency == window size

* Update NoveltyFeatureClient to new analysisSettings method

* remove old FIXME comment

* fix cout call killing test on windows

* Missing update change to OnsetFeatureClient::analysisSettings()

* algorithms: NoveltyCurve -> NoveltyFeature

* Novelty: Update algorihtm class name, and change 'feature' param to algorithm

* Also update names in NovletySegmentation

* BufOnsetFeature correct output buffer name

* Novelty / OnsetFeature - cache descriptor values for when sigvs < hop

* more information on failing test thx

* [Release] 1.0.0-beta6 (#126)

* Add pointwise inversion to PCA

* batchsize was not capped down, leading to hilarious crashes (#63)

* updating credits with the new team

* Include SHAs for flucoma-core and current project in version string

* Conform version string with SHAs to semantic versioning spec

* add chroma feature to NoveltySlice

* Toggle BLAS settings for compiling on APPLE (#67)

* disable blas for compiling on macos

* remove line according to O's suggestion

* error in the client of (buf)noveltyslice since introducing chroma as feature

* Enhance/versioning (#75)

* Remove old header template

* Add in TU template and declaration header

* update CMake to new version scheme

* Get SHA from top level source folder

* ensure git is found

* fix issue #23 - zeroing the output vector in the mTracker loop (#82)

* fix issue #23 - zeroing the output vector in the mTracker loop

* now really corrected thanks to @weefuzzy

* Initial unit tests for `include/data` (#83)

* initial FluidTensor tests

* add assert death test to cmake

* more assert death

* fix compile tests

* Working assertion tests, it seems

* Add first FluidTensorView tests

* tidy up cmake a bit

* factor out EqualRange matcher to own header

* Add FluidTensorSupport tests

* rollback to Catch2 

for compatability with approvaltests.cpp

* add tests for FluidDataSet

bubba's first approval test ✨

* test print for bigger range as well

* tidy cmake

* make building tests optional

* remove spurious files from tracking

* add workflow for CI

* make workflow manually triggerable

* correct workflow file extention

* pleading and bargaining with github

* getting event name right

* FluidTensorSlice: fix terrible and aged typename mistake

* workflow: try and cache whole build folder

* wotkflow: unbreak yaml

* workflow: disable fail-fast

* Amend upper frequency limit of mel bands in NoveltySlice to 20kHz

* [Enhance] FluCoMa-wide DataSets as a resource (#88)

* treat wav files as binary

* move audio files to resources folder

* add datasets

* add pre-trained neural networks

* add flucoma corpus

* move datasets to data

* BufAudioTransport now has A-B based arguments

* fix mistakenly fixed type signature in FluidSink

* Tests for framing and overlap add bits

* remove build folder caching as a bad job 

(failing forever once cache goes bad)

* Test/sc ports/slicers (#91)

* Working port of SC NoveltySlice tests

* formatting and constifying

* use generated path for test signal loading

* update testsignals header and cmake

* Add TestOnsetSegmention, update TestNoveltySeg for new resource loading

* Add Onsets and update novelty in CMake

* Add EnvelopeSeg tests and some missing headers

* Add EnvelopeGate tests

* Add TransientSlice tests

* update location of audio files

* add missing function to signals.cpp.in

* Fix test signal for AmpSlice test

* try and speed up test run

* FluidSource test blackholed on MSVC

It doesn't like GENERATE_REF nested in GENERATE. Nosir.

* ignore all build folders for a quieter life

* bump Eigen version (#93)

* bump Eigen version

* note new Eigen version in readme

* add mammoth dataset

* OnsetSlice and NoveltySlice clients: fix block size dependency (#96)

Makes tracking of `frameOffset` stateful across calls to `process` so that odd hop sizes are handled correctly

* `SliceIterator::end()` fix (#97)

* fix problem with 0-size slices and end() sentinels

* adds basic test for slice ietrator fix

* annotate datasets

* add mfcc for fluid_corpus

* update mfcc dataset

* bump version to beta5 (#101)

* Add pointwise inversion to PCA

* Enhance `ParameterSet` (#103)

* Meta: Add HO function to apply function only to select indicies of a tuple

* ParameterSet: Easier application of functions by type with lambdas + discovering the count of params by type

* BufStats: Weights should be an input buffer

* [Fix] Make error language more consistent (#118)

* replace incorrect use of label where identifier is intended

* dont shorten identifier to id

* rename DuplicateLabel to DuplicateIdentifier

* Enhance/slicer detection curves (#114)

* EnvelopeSegmentation: refactor into feature curve + detector

* NoveltySegementation: refactor into feature curve + detector

* OnsetSegmentation: refactor into feature curve + detector

* Add OnsetFeatureClient

* Add NoveltyFeatureClient

* Add AmpFeatureClient

* correct novelty and onset curves for nrt

* fix longstanding assumption in NRT wrapper that client latency == window size

* Update NoveltyFeatureClient to new analysisSettings method

* remove old FIXME comment

* fix cout call killing test on windows

* Missing update change to OnsetFeatureClient::analysisSettings()

* algorithms: NoveltyCurve -> NoveltyFeature

* Novelty: Update algorihtm class name, and change 'feature' param to algorithm

* Also update names in NovletySegmentation

* BufOnsetFeature correct output buffer name

* Novelty / OnsetFeature - cache descriptor values for when sigvs < hop

* more information on failing test thx

Co-authored-by: Owen Green <[email protected]>
Co-authored-by: tremblap <[email protected]>
Co-authored-by: g-roma <[email protected]>
Co-authored-by: James Bradbury <[email protected]>
Co-authored-by: Ted Moore <[email protected]>

* Update FlucomaVersion.cmake

* Enhance/fewer warnings (#85)

* excess semicolons

* unused variables

* type narrowing / signed-unsigned

* integer conversions: new Eigen::Array alias for index rather than int

* json: stop embedding nlohmann library and instead fetch at configure time (#105)

* ParameterDescriptors: make more composable by adding insert function (#107)

* FluidJSON: Avoid some implicit conversion on import that could confuse compiler

* Deal with some warnings

* EnvelopeSegmentation: pass correct params to Envelope

* update with new FluidTensorView copying ops

* Use Windows 2019 in CI

* Parallel tests seem unreliable on windows

Co-authored-by: James Bradbury <[email protected]>
Co-authored-by: tremblap <[email protected]>
Co-authored-by: g-roma <[email protected]>
Co-authored-by: Ted Moore <[email protected]>
Co-authored-by: James Bradbury <[email protected]>

* Enhance/const correct(er) dataobjects (#115)

* Const correct arguments for data object messages; actually const object refs for RT usage

* MLP const update

* SharedClient const updates

* workflow: Disable parallel test runner and turn up verbosity

* remove std::cout access from segfaulting test (just in case)

* NoveltySlice: ensure frame offset is reset when win / hop changes

* correcting the long definition for novelty clients

* NoveltySegmentation: Correct order of arguments in constructor

* Assign2D: Make UNASSIGNED constexpr to solve strange linker error

* Assign2D: still needs out-of-class declaration for UNASSIGNED to link reliably

* corrected and augmented the credits/info of Data

* flucoma_corpus_files: typo in the file names

* Sound bank change (#135)

* removed redundant files and added constanzo

* new dataset to load in help files

* saved norm

* BufFlatten: Workaround PD-release builds problem with temporary buffer views

* add pca whitening (#98)

* add pca whitening

* actually add pca whitening

* PCA: add de-whitening to inverseTransformPoint

* PCAClient: update call to inverseTransformPoint

Co-authored-by: weefuzzy <[email protected]>

* Enhance/optional message args (#106)

* Add dependency for Sy Brand's `optional` backport

* include optional in MessageSet

add alias (in case we need to switch between `std::` and `tl::`)

* try out optional arg in `KDTreeClient::kNearest`

* compile-time enforce that optional args must follow mandatory ones

* stop tl:optional doing its tests

* PoC: Enhance/choices param (#108)

* Add ChoiceT parameter type

* Add `select` control to `BufStatsClient` to road test `ChoicesParam`

* Choices params: Don't use a set because it breaks ordering

* SpectralShape: Add select param

* add dataset version of inverse PCA (#125)

* add dataset version of inverse PCA

* PCA: Add whitening to batch inverse transform

* Enhance/max params (#132)

* CMake: Centralise C++ version and set to 17

* Introduce long param type with a user-defined maximum + 'primary' params
 – e.g. max coeffs for MFCC)
 - decoupling Max/PD arguments from 'fixed' params
–

* MFCC: Proof of concept for new way of expressing runtime max for certain params

* CMake: Missing C++ version adjustments

* CMake: Another rogue C++ version flag

* Try to get catch to build on OS 12 whilst targetting 10.8

* NMFClient: Add resynth mode to de-magic interface (#133)

Also allow resynth from fixed bases + activations

* All Scalers: Replace `invert` parameter with `inverseTransform` messages

* Stop being too clever in LongRuntimeMaxParam 

(thought I'd already done this...)

* Convert remaining `max<X>` parameters and `maxFFTsize` to new order of things

* SpectralShape: Ensure output channel count responds to select param

* MLPClassifier: Missing const in type alias

* MLP clients: change 'hidden' to 'hiddenlayers'. fixes #143

to work around name clash with special attribute in Max

* [Enhance] ChoicesParam for LoudnessClient and PitchClient (#141)

* update loudness client to have a ChoicesParam

* rename truepeak selection to peak

* replace mMaxOutPutSize with fixed value of 2

* Add / fix select for Loudness and Pitch clients

Harmonize SpectralShape code
Adjust FluidBufLoudness hack in NRT wrapper

* adds a patch to redo the included demo dataset (in pd)

* MaxParams: toughen up

* dealing with scaler range near 0 (#144)

* makes a function that compares the range to 10*lambda - in line with SciKit Learn

* aesthetic include order to be like the other 2 scalers

* NRTWrapper: Fix for multichannel behaviour with @select

* OnsetSliceClient: Reset frame offset when FFT params change, fixes #145

* CMake: Make version data globally available via properties

* CMake: add the big ol list of core clients plus support code

* Add new features to central CMake, plus small improvements and version bump

* CMake: Turn down the volume for FetchContent

* CMake: Get rid of old diagnostic messages

* CMake: quote module path

* CMake: Set module path correctly when there is parent project

* CMake: Debug module path logic

* CMake: Superstitous attempt to fix 403 errors when cloning eigen on CI

* zap typo Maxiumm

* fised typo Magnitdue

* MaxParam: correct initialization order

* RunningStats: change `size` to `history`

* CMake: We need to be able to declare IO properties of clients up front

* MLP* camel case hiddenLayers

* NMFCrossClient: Prevent buffer overrun crashes by ensuring polyphony <= rank

* Chroma: Fix Eigen variable aliasing causing UB

* NMFMorph: avoid crash

if OptimalTransport fails to segment spectrum

* CMake: Enable PIC to make Linux CI happier.

I hope

* BufNNDSVD -> BufNMFSeed (#173)

* change the client name - kept the algo name as it does what it says

* algo name confounded with client name in the code

* change parameter name in client to interpolation (#174)

* Feature/skmeans (#99)

* add pca whitening

* actually add pca whitening

* add spherical kmeans

* actually add spherical kmeans

* SKMeans fixes, change KMeans getDistances to transform

* adding RT query class

* <fit>transform<point> -> <fit>encode<point>

Co-authored-by: tremblap <[email protected]>

* ChoicesT: Correct for faulty use of `static`

fixes #175

* `(S)KMeansClient`: Track `numClusters` and clear if it changes before fitting

fixes #176

* KMeansClient: Work around over agressive optimisation

* bump flucoma version
  • Loading branch information
James Bradbury authored Jun 14, 2022
1 parent 5b77e67 commit 6bc8660
Show file tree
Hide file tree
Showing 140 changed files with 36,422 additions and 97,638 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/flucoma-core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, windows-latest, macOS-latest]
os: [ubuntu-18.04, windows-2019, macOS-latest]
fail-fast: false

steps:
Expand All @@ -36,5 +36,5 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build

run: ctest -C ${{env.BUILD_TYPE}} -j3 --output-on-failure

run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

79 changes: 57 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
# under the European Union’s Horizon 2020 research and innovation programme
# (grant agreement No 725899).

cmake_minimum_required (VERSION 3.11)
cmake_minimum_required (VERSION 3.18)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

get_directory_property(hasParent PARENT_DIRECTORY)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/script")

#set module path at top level so wrapper projects can easily include fluid_version script
if(hasParent)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/script PARENT_SCOPE)
get_directory_property(hasParent PARENT_DIRECTORY)
if(hasParent)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/script"
PARENT_SCOPE)
endif()

if(APPLE)
Expand All @@ -23,8 +30,9 @@ endif()

project (flucoma-core LANGUAGES CXX)

include("${CMAKE_CURRENT_SOURCE_DIR}/script/flucoma-buildtype.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/FlucomaVersion.cmake")
include(flucoma-buildtype)
include(FlucomaVersion.cmake)
include(FlucomaClients.cmake)

include(FetchContent)
set(HISS_PATH "" CACHE PATH "The path to a HISSTools_Library folder. Will pull from github if not set")
Expand All @@ -40,8 +48,6 @@ ENDIF (APPLE)
# Grab the Fluid Decpomposition header files so they can be added to IDE builds
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/**/*.hpp")

set(FETCHCONTENT_QUIET FALSE)

# Either download or point to dependencies
FetchContent_Declare(
HISSTools
Expand All @@ -53,7 +59,7 @@ FetchContent_Declare(
FetchContent_Declare(
Eigen
GIT_SHALLOW TRUE
GIT_REPOSITORY https://gitlab.com/libeigen/eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_PROGRESS TRUE
GIT_BRANCH "3.4"
GIT_TAG "3.4.0"
Expand All @@ -67,6 +73,24 @@ FetchContent_Declare(
GIT_TAG "v0.9.0"
)

FetchContent_Declare(
tl_optional
GIT_SHALLOW TRUE
GIT_REPOSITORY https://github.com/TartanLlama/optional.git
GIT_PROGRESS TRUE
)

FetchContent_Declare(
json
GIT_SHALLOW TRUE
# GIT_REPOSITORY https://github.com/nlohmann/json.git
# advice on nlohmann repo is to use this mirror unless we really want ~150 meg of test data as well as headers:
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent
GIT_PROGRESS TRUE
GIT_TAG v3.10.5
)
set(JSON_SystemInclude ON CACHE BOOL "")

if(HISS_PATH) #if hiss path is set, this will stop it downloading
get_filename_component(FETCHCONTENT_SOURCE_DIR_HISSTOOLS ${HISS_PATH} ABSOLUTE)
endif()
Expand All @@ -79,6 +103,9 @@ if(SPECTRA_PATH) #if spectra path is set, this will stop it downloading
get_filename_component(FETCHCONTENT_SOURCE_DIR_SPECTRA ${SPECTRA_PATH} ABSOLUTE)
endif()

if(JSON_PATH)
get_filename_component(FETCHCONTENT_SOURCE_DIR_JSON ${JSON_PATH} ABSOLUTE)
endif()

FetchContent_GetProperties(HISSTools)
if(NOT hisstools_POPULATED)
Expand All @@ -95,6 +122,21 @@ if(NOT spectra_POPULATED)
FetchContent_Populate(Spectra)
endif()

set(OPTIONAL_BUILD_PACKAGE OFF CACHE BOOL "" FORCE)
set(OPTIONAL_BUILD_TESTS OFF CACHE BOOL "" FORCE)
FetchContent_GetProperties(tl_optional)
if(NOT tl_optional_POPULATED)
FetchContent_Populate(tl_optional)
endif()

add_subdirectory(${tl_optional_SOURCE_DIR} ${tl_optional_BINARY_DIR} EXCLUDE_FROM_ALL)

FetchContent_GetProperties(json)
if(NOT json_POPULATED)
FetchContent_Populate(json)
endif()

add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)

# HISSTools FFT target
add_library(
Expand All @@ -108,9 +150,6 @@ target_link_libraries(
target_include_directories(HISSTools_FFT PUBLIC "${hisstools_SOURCE_DIR}")

set_target_properties(HISSTools_FFT PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
POSITION_INDEPENDENT_CODE ON
)

Expand All @@ -133,17 +172,11 @@ add_library(
"${hisstools_SOURCE_DIR}/AudioFile/OAudioFile.cpp"
)

set_target_properties(HISSTools_AudioFile PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)

#Fluid Decomposition header-only target
add_library(FLUID_DECOMPOSITION INTERFACE)

target_include_directories(
FLUID_DECOMPOSITION INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty"
FLUID_DECOMPOSITION INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include"
)
target_include_directories(
FLUID_DECOMPOSITION SYSTEM INTERFACE #we don't want warnings from Eigen or HissTools
Expand All @@ -152,7 +185,11 @@ target_include_directories(
"${hisstools_SOURCE_DIR}"
)
target_link_libraries(
FLUID_DECOMPOSITION INTERFACE HISSTools_FFT flucoma_VERSION_LIB
FLUID_DECOMPOSITION INTERFACE
HISSTools_FFT
flucoma_VERSION_LIB
tl::optional
nlohmann_json::nlohmann_json
)
target_sources(
FLUID_DECOMPOSITION INTERFACE ${HEADERS}
Expand All @@ -177,8 +214,6 @@ if(APPLE)
target_compile_options(HISSTools_AudioFile PUBLIC -stdlib=libc++)
target_compile_options(FLUID_DECOMPOSITION INTERFACE -stdlib=libc++)
target_link_libraries(FLUID_DECOMPOSITION INTERFACE -stdlib=libc++)


endif()

#Apply any vector instruction flags
Expand Down
158 changes: 158 additions & 0 deletions FlucomaClients.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# 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)

function(add_client)
# Define the supported set of keywords
set(noValues NOINSTALL)
set(singleValues CLASS)
set(multiValues GROUP TAGS)
# Process the arguments passed in
include(CMakeParseArguments)
cmake_parse_arguments(ARG
"${noValues}"
"${singleValues}"
"${multiValues}"
${ARGN})

list(LENGTH ARG_UNPARSED_ARGUMENTS NUM_PLAIN_ARGS)

if(NUM_PLAIN_ARGS LESS 2)
message(FATAL_ERROR "add_client called without arguments for object name and header file")
endif()

if(NOT ARG_CLASS)
message(FATAL_ERROR "add_client: missing CLASS keyword argument")
endif()

list(GET ARG_UNPARSED_ARGUMENTS 0 name)
list(GET ARG_UNPARSED_ARGUMENTS 1 header)

if(ARG_NOINSTALL)
set(install true)
else()
set(install false)
endif()

if(ARG_GROUP)
set(group ${ARG_GROUP})
else ()
set(group NONE)
endif()

if(ARG_TAGS)
foreach(tag ${ARG_TAGS})
set_property(GLOBAL PROPERTY FLUID_CORE_CLIENTS_${name}_${tag} ON)
endforeach()
endif()

set_property(GLOBAL APPEND PROPERTY FLUID_CORE_CLIENTS ${name})
set_property(GLOBAL APPEND PROPERTY FLUID_CORE_CLIENTS_${group} ${name})
set_property(GLOBAL PROPERTY FLUID_CORE_CLIENTS_${name}_HEADER ${header})
set_property(GLOBAL PROPERTY FLUID_CORE_CLIENTS_${name}_CLASS ${ARG_CLASS})
set_property(GLOBAL PROPERTY FLUID_CORE_CLIENTS_${name}_INSTALL ${install})
endfunction()

function (add_kr_in_client)
add_client(${ARGN} TAGS KR_IN)
endfunction()

function(get_client_group group var)
get_property(clients GLOBAL PROPERTY FLUID_CORE_CLIENTS_${group})
set(${var} ${clients} PARENT_SCOPE)
endfunction()

function(get_core_clients var)
get_property(clients GLOBAL PROPERTY FLUID_CORE_CLIENTS)
set(${var} ${clients} PARENT_SCOPE)
endfunction()

function(get_core_client_header name var)
get_property(client_info GLOBAL PROPERTY FLUID_CORE_CLIENTS_${name}_HEADER)
set(${var} ${client_info} PARENT_SCOPE)
endfunction()

function(get_core_client_class name var)
get_property(client_info GLOBAL PROPERTY FLUID_CORE_CLIENTS_${name}_CLASS)
set(${var} ${client_info} PARENT_SCOPE)
endfunction()
#
add_client(AmpFeature clients/rt/AmpFeatureClient.hpp CLASS RTAmpFeatureClient )
add_client(AmpGate clients/rt/AmpGateClient.hpp CLASS RTAmpGateClient )
add_client(AmpSlice clients/rt/AmpSliceClient.hpp CLASS RTAmpSliceClient )
add_client(AudioTransport clients/rt/AudioTransportClient.hpp CLASS RTAudioTransportClient )
add_client(BufAmpFeature clients/rt/AmpFeatureClient.hpp CLASS NRTThreadedAmpFeatureClient )
add_client(BufAmpGate clients/rt/AmpGateClient.hpp CLASS NRTThreadedAmpGateClient )
add_client(BufAmpSlice clients/rt/AmpSliceClient.hpp CLASS NRTThreadedAmpSliceClient )
add_client(BufAudioTransport clients/rt/AudioTransportClient.hpp CLASS NRTThreadedAudioTransportClient )
add_client(BufChroma clients/rt/ChromaClient.hpp CLASS NRTThreadedChromaClient )
add_client(BufCompose clients/nrt/BufComposeClient.hpp CLASS NRTThreadedBufComposeClient )
add_client(BufFlatten clients/nrt/BufFlattenClient.hpp CLASS NRTThreadedBufFlattenClient )
add_client(BufHPSS clients/rt/HPSSClient.hpp CLASS NRTThreadedHPSSClient )
add_client(BufLoudness clients/rt/LoudnessClient.hpp CLASS NRTThreadedLoudnessClient )
add_client(BufMFCC clients/rt/MFCCClient.hpp CLASS NRTThreadedMFCCClient )
add_client(BufMelBands clients/rt/MelBandsClient.hpp CLASS NRTThreadedMelBandsClient )
add_client(BufNMF clients/nrt/NMFClient.hpp CLASS NRTThreadedNMFClient )
add_client(BufNMFCross clients/nrt/NMFCrossClient.hpp CLASS NRTNMFCrossClient )
add_client(BufNMFSeed clients/nrt/NMFSeedClient.hpp CLASS NRTThreadedNMFSeedClient )
add_client(BufNoveltyFeature clients/rt/NoveltyFeatureClient.hpp CLASS NRTThreadedNoveltyFeatureClient )
add_client(BufNoveltySlice clients/rt/NoveltySliceClient.hpp CLASS NRTThreadingNoveltySliceClient )
add_client(BufOnsetFeature clients/rt/OnsetFeatureClient.hpp CLASS NRTThreadedOnsetFeatureClient )
add_client(BufOnsetSlice clients/rt/OnsetSliceClient.hpp CLASS NRTThreadingOnsetSliceClient )
add_client(BufPitch clients/rt/PitchClient.hpp CLASS NRTThreadedPitchClient )
add_client(BufSTFT clients/nrt/BufSTFTClient.hpp CLASS NRTThreadedBufferSTFTClient )
add_client(BufScale clients/nrt/BufScaleClient.hpp CLASS NRTThreadedBufferScaleClient )
add_client(BufSelect clients/nrt/BufSelectClient.hpp CLASS NRTThreadingSelectClient )
add_client(BufSelectEvery clients/nrt/BufSelectEveryClient.hpp CLASS NRTThreadingSelectEveryClient )
add_client(BufSines clients/rt/SinesClient.hpp CLASS NRTThreadedSinesClient )
add_client(BufSpectralShape clients/rt/SpectralShapeClient.hpp CLASS NRTThreadedSpectralShapeClient )
add_client(BufStats clients/nrt/BufStatsClient.hpp CLASS NRTThreadedBufferStatsClient )
add_client(BufThreadDemo clients/nrt/FluidThreadTestClient.hpp CLASS NRTThreadedThreadTestClient )
add_client(BufThresh clients/nrt/BufThreshClient.hpp CLASS NRTThreadedBufferThreshClient )
add_client(BufTransientSlice clients/rt/TransientSliceClient.hpp CLASS NRTThreadedTransientSliceClient )
add_client(BufTransients clients/rt/TransientClient.hpp CLASS NRTThreadedTransientsClient )
add_client(Chroma clients/rt/ChromaClient.hpp CLASS RTChromaClient )
add_client(Gain clients/rt/GainClient.hpp CLASS RTGainClient NOINSTALL)
add_client(HPSS clients/rt/HPSSClient.hpp CLASS RTHPSSClient )
add_client(Loudness clients/rt/LoudnessClient.hpp CLASS RTLoudnessClient )
add_client(MFCC clients/rt/MFCCClient.hpp CLASS RTMFCCClient )
add_client(MelBands clients/rt/MelBandsClient.hpp CLASS RTMelBandsClient )
add_client(NMFFilter clients/rt/NMFFilterClient.hpp CLASS RTNMFFilterClient )
add_client(NMFMatch clients/rt/NMFMatchClient.hpp CLASS RTNMFMatchClient )
add_client(NMFMorph clients/rt/NMFMorphClient.hpp CLASS RTNMFMorphClient )
add_client(NoveltyFeature clients/rt/NoveltyFeatureClient.hpp CLASS RTNoveltyFeatureClient )
add_client(NoveltySlice clients/rt/NoveltySliceClient.hpp CLASS RTNoveltySliceClient )
add_client(OnsetFeature clients/rt/OnsetFeatureClient.hpp CLASS RTOnsetFeatureClient )
add_client(OnsetSlice clients/rt/OnsetSliceClient.hpp CLASS RTOnsetSliceClient )
add_client(Pitch clients/rt/PitchClient.hpp CLASS RTPitchClient )
add_client(STFTPass clients/rt/BaseSTFTClient.hpp CLASS RTSTFTPassClient NOINSTALL)
add_client(Sines clients/rt/SinesClient.hpp CLASS RTSinesClient )
add_client(SpectralShape clients/rt/SpectralShapeClient.hpp CLASS RTSpectralShapeClient )
add_kr_in_client(Stats clients/rt/RunningStatsClient.hpp CLASS RunningStatsClient )
add_client(TransientSlice clients/rt/TransientSliceClient.hpp CLASS RTTransientSliceClient )
add_client(Transients clients/rt/TransientClient.hpp CLASS RTTransientClient )

#lib manipulation client group
add_client(DataSet clients/nrt/DataSetClient.hpp CLASS NRTThreadedDataSetClient GROUP MANIPULATION)
add_client(DataSetQuery clients/nrt/DataSetQueryClient.hpp CLASS NRTThreadedDataSetQueryClient GROUP MANIPULATION)
add_client(LabelSet clients/nrt/LabelSetClient.hpp CLASS NRTThreadedLabelSetClient GROUP MANIPULATION)
add_client(KDTree clients/nrt/KDTreeClient.hpp CLASS NRTThreadedKDTreeClient GROUP MANIPULATION)
add_client(KMeans clients/nrt/KMeansClient.hpp CLASS NRTThreadedKMeansClient GROUP MANIPULATION)
add_client(SKMeans clients/nrt/SKMeansClient.hpp CLASS NRTThreadedSKMeansClient GROUP MANIPULATION)
add_client(KNNClassifier clients/nrt/KNNClassifierClient.hpp CLASS NRTThreadedKNNClassifierClient GROUP MANIPULATION)
add_client(KNNRegressor clients/nrt/KNNRegressorClient.hpp CLASS NRTThreadedKNNRegressorClient GROUP MANIPULATION)
add_client(Normalize clients/nrt/NormalizeClient.hpp CLASS NRTThreadedNormalizeClient GROUP MANIPULATION)
add_client(RobustScale clients/nrt/RobustScaleClient.hpp CLASS NRTThreadedRobustScaleClient GROUP MANIPULATION)
add_client(Standardize clients/nrt/StandardizeClient.hpp CLASS NRTThreadedStandardizeClient GROUP MANIPULATION)
add_client(PCA clients/nrt/PCAClient.hpp CLASS NRTThreadedPCAClient GROUP MANIPULATION)
add_client(MDS clients/nrt/MDSClient.hpp CLASS NRTThreadedMDSClient GROUP MANIPULATION)
add_client(UMAP clients/nrt/UMAPClient.hpp CLASS NRTThreadedUMAPClient GROUP MANIPULATION)
add_client(MLPRegressor clients/nrt/MLPRegressorClient.hpp CLASS NRTThreadedMLPRegressorClient GROUP MANIPULATION)
add_client(MLPClassifier clients/nrt/MLPClassifierClient.hpp CLASS NRTThreadedMLPClassifierClient GROUP MANIPULATION)
add_client(Grid clients/nrt/GridClient.hpp CLASS NRTThreadedGridClient GROUP MANIPULATION)
21 changes: 17 additions & 4 deletions FlucomaVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
# under the European Union’s Horizon 2020 research and innovation programme
# (grant agreement No 725899).

include_guard()

cmake_minimum_required (VERSION 3.11)

find_package(Git REQUIRED)

set(flucoma_VERSION_MAJOR 1)
set(flucoma_VERSION_MINOR 0)
set(flucoma_VERSION_PATCH 0)
set(flucoma_VERSION_SUFFIX TB2.beta6)
set(flucoma_VERSION_SUFFIX TB2.beta7)

function(make_flucoma_version_string output_variable)
set(${output_variable}
"${flucoma_VERSION_MAJOR}.${flucoma_VERSION_MINOR}.${flucoma_VERSION_PATCH}-${flucoma_VERSION_SUFFIX}"
PARENT_SCOPE)
set(result "${flucoma_VERSION_MAJOR}.${flucoma_VERSION_MINOR}.${flucoma_VERSION_PATCH}-${flucoma_VERSION_SUFFIX}")
set(${output_variable} ${result} PARENT_SCOPE)
endfunction()

function(make_flucoma_version_string_with_sha output_variable)
Expand Down Expand Up @@ -65,3 +66,15 @@ add_library(flucoma_VERSION_LIB STATIC
target_include_directories(flucoma_VERSION_LIB PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/include"
)

set_target_properties(flucoma_VERSION_LIB PROPERTIES
POSITION_INDEPENDENT_CODE ON
)

set_property(GLOBAL PROPERTY FLUCOMA_VERSION ${flucoma_VERSION_STRING})
set_property(GLOBAL PROPERTY FLUCOMA_VERSION_TERSE ${flucoma_VERSION_MAJOR}.${flucoma_VERSION_MINOR}.${flucoma_VERSION_PATCH})
set_property(GLOBAL PROPERTY FLUCOMA_VERSION_SHA ${flucoma_VERSION_STRING_SHA})
set_property(GLOBAL PROPERTY FLUCOMA_VERSION_MAJOR ${flucoma_VERSION_MAJOR})
set_property(GLOBAL PROPERTY FLUCOMA_VERSION_MINOR ${flucoma_VERSION_MINOR})
set_property(GLOBAL PROPERTY FLUCOMA_VERSION_PATCH ${flucoma_VERSION_PATCH})
set_property(GLOBAL PROPERTY FLUCOMA_VERSION_SUFFIX ${flucoma_VERSION_SUFFIX})
Loading

0 comments on commit 6bc8660

Please sign in to comment.