Skip to content

Commit

Permalink
Merge branch 'sfztools:develop' into rbs/windows-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
robsussman authored Dec 5, 2024
2 parents aa6dac7 + a708acb commit ed550bb
Show file tree
Hide file tree
Showing 76 changed files with 6,450 additions and 6,564 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ env:
jobs:
clang_tidy:
name: Clang Tidy
if: github.event_name == 'pull_request'
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -37,6 +39,7 @@ jobs:
test_with_asan:
name: ASAN
runs-on: ubuntu-22.04 # abseil (libabsl) is not available in 20.04 repository
timeout-minutes: 10
env:
install_name: sfizz-${{ github.ref_name }}-linux
strategy:
Expand Down Expand Up @@ -88,6 +91,7 @@ jobs:
build_for_linux:
name: Linux Ubuntu 22.04
runs-on: ubuntu-22.04 # abseil (libabsl) is not available in 20.04 repository
timeout-minutes: 10
env:
install_name: sfizz-${{ github.ref_name }}-linux
steps:
Expand All @@ -101,7 +105,7 @@ jobs:
ninja-build \
libjack-jackd2-dev
- name: Install abseil
if: ${{ github.ref_type == 'branch' }}
if: github.ref_type == 'branch'
run: |
sudo apt-get install \
libabsl-dev \
Expand Down Expand Up @@ -156,13 +160,13 @@ jobs:
)
cmake "${options[@]}"
- name: Create tarball
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
run: |
DESTDIR="$(pwd)/${{ env.install_name }}" \
cmake --build build --config ${{ env.build_type }} --target install
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
- name: Upload
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
uses: actions/upload-artifact@v3
with:
name: Linux tarball
Expand All @@ -171,6 +175,7 @@ jobs:
build_for_macos:
name: macOS 11
runs-on: macos-11
timeout-minutes: 15
env:
install_name: "sfizz-${{ github.ref_name }}-macos"
steps:
Expand All @@ -179,7 +184,7 @@ jobs:
with:
submodules: recursive
- name: Install dependencies
if: ${{ github.ref_type == 'branch' }}
if: github.ref_type == 'branch'
run: brew install abseil
- name: Configure CMake
run: |
Expand Down Expand Up @@ -228,13 +233,13 @@ jobs:
)
cmake "${options[@]}"
- name: Create tarball
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
run: |
DESTDIR="$(pwd)/${{ env.install_name }}" \
cmake --build build --config ${{ env.build_type }} --target install
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
- name: Upload
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
uses: actions/upload-artifact@v3
with:
name: macOS tarball
Expand All @@ -243,6 +248,7 @@ jobs:
build_for_windows:
name: Windows 2019
runs-on: windows-2019
timeout-minutes: 15
strategy:
matrix:
include:
Expand Down Expand Up @@ -293,19 +299,20 @@ jobs:
--parallel 2 `
--verbose `
- name: Create zip package
if: ${{ github.ref_type == 'tag' }}
run: 7z a "${{ env.install_name }}.zip" ".\build\src\${{ env.build_type }}\sfizz.*"
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
run: 7z a "${{ env.install_name }}.zip" ".\build\library\*"
- name: Upload
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.pkg_platform }} zip package
path: "${{ github.workspace }}/${{ env.install_name }}.zip"

archive_source_code:
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag' || github.ref_name == 'release-test'
name: Source code archive
runs-on: ubuntu-20.04
timeout-minutes: 2
env:
install_name: sfizz-${{ github.ref_name }}
steps:
Expand All @@ -331,6 +338,7 @@ jobs:
build_with_libsndfile:
name: Linux libsndfile
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -378,6 +386,7 @@ jobs:
build_with_makefile:
name: Linux makefile
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -406,12 +415,12 @@ jobs:
make -C "${{ github.workspace }}" -f simple.mk
deploy:
if: ${{ github.ref_type == 'tag' }}
if: github.ref_type == 'tag'
runs-on: ubuntu-20.04
needs:
- build_for_linux
- build_for_macos
# - build_for_mod
# build_for_mod
- build_for_windows
- archive_source_code
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "external/st_audiofile/thirdparty/wavpack"]
path = external/st_audiofile/thirdparty/wavpack
url = https://github.com/dbry/WavPack.git
[submodule "external/invoke.hpp"]
path = external/invoke.hpp
url = https://github.com/BlackMATov/invoke.hpp.git
48 changes: 46 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,49 @@ This project tries to adhere to [Semantic Versioning][2].

## [Unreleased]

### Added

- [invoke.hpp](https://github.com/BlackMATov/invoke.hpp/) dependency/Git submodule.
- CI: build timeouts.
- C++20 Support (#1235 by @KKQ-KKQ)

### Changed

- Refactor the messaging system
Trading off complexity when parsing/replying to the messages for complexity
in some templated and overloaded code blocks.
- Truncate MIDI values when denormalizing (by @essej).
- Improved note-on performance (#1232 by @KKQ-KKQ)
- Updated abseil-cpp to 20240116.0.
- Usual little CI improvements.

### Fixed

- Tweak SynthMessaging (#1241)
- Fix a ModMatrix bug (#1242)
- Fixed a bug that causes invalid effect output (#1243 by @KKQ-KKQ)

## [1.2.3] - 2024-01-15

### Added

- Support for curvecc opcodes on v1 EGs (@PythonBlue)
- Support for `lotimer/hitimer` (@essej)

### Changed

- Allow polyphonic aftertouch (cc 130) to respect the note number, which improves e.g. the choking logic (@essej)

### Fixed

- Adjusted the gain compensation on pan stages (@cvde)
- Ensure that voices are cleaned up before being force-reused (@iv-m)
- Fixed a bug in the wavpack wrapper for multichannel files (@KKQ-KKQ)
- Fixed a bug in the way the tuning root was computed (@KKQ-KKQ)
- Fixed a bug where samples would be loaded in RAM twice when using `hint_ram_based=1`
- Fixed a bug where quasi-simultaneous notes would not properly choke each other
- Don't send a note off even if a note was choked by a CC event.

## [1.2.2] - 2023-08-25

### Added
Expand Down Expand Up @@ -34,7 +77,7 @@ This project tries to adhere to [Semantic Versioning][2].
- Fixed build on Windows
- Fixed modulation matrix when CC modulations are per voice (#1173 #1179 by @PythonBlue)
- Fixed and reenabled tests
- modifications to support univeral x86_64/ARM builds on macOS (#1183 by @essej)
- Modifications to support universal x86_64/ARM builds on macOS (#1183 by @essej)

### Removed

Expand Down Expand Up @@ -792,7 +835,8 @@ becoming a library to be used in other projects, plus a LV2 plugin.
[1]: https://keepachangelog.com/en/1.0.0/
[2]: https://semver.org/spec/v2.0.0.html

[Unreleased]: https://github.com/sfztools/sfizz/compare/1.2.2...HEAD
[Unreleased]: https://github.com/sfztools/sfizz/compare/1.2.3...HEAD
[1.2.3]: https://github.com/sfztools/sfizz/compare/1.2.2...1.2.3
[1.2.2]: https://github.com/sfztools/sfizz/compare/1.2.1...1.2.2
[1.2.1]: https://github.com/sfztools/sfizz/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/sfztools/sfizz/compare/1.1.1...1.2.0
Expand Down
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ endif()

project(libsfizz
LANGUAGES CXX C
VERSION 1.2.2
VERSION 1.2.3
)
set(PROJECT_DESCRIPTION "A library to load SFZ description files and use them to render music.")
set(PROJECT_REPOSITORY https://github.com/sfztools/sfizz)

# External configuration CMake scripts
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(BuildType)

# Build Options
Expand Down Expand Up @@ -42,10 +43,24 @@ option_ex(SFIZZ_RELEASE_ASSERTS "Forced assertions in release builds" OFF)
option_ex(SFIZZ_PROFILE_BUILD "Profile the build time" OFF)
option_ex(SFIZZ_SNDFILE_STATIC "Link the sndfile library statically" OFF)
option_ex(SFIZZ_ASAN "Use address sanitizer on all sfizz targets" OFF)
option_ex(SFIZZ_GIT_SUBMODULE_CHECK "Check Git submodules presence" ON)

# Continuous Controller count (0 to 511)
set(MIDI_CC_COUNT 512 CACHE STRING "Maximum number of managed Control Change messages")

# Ensure presence of Git submodules (when not using the source tarball)
if(SFIZZ_GIT_SUBMODULE_CHECK AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
AND NOT CMAKE_VERSION VERSION_LESS "3.19.0")
include(GitSubmoduleCheck)
git_submodule_check(external/abseil-cpp)
git_submodule_check(external/filesystem)
git_submodule_check(external/simde)
git_submodule_check(external/st_audiofile/thirdparty/dr_libs)
git_submodule_check(external/st_audiofile/thirdparty/libaiff)
git_submodule_check(external/st_audiofile/thirdparty/wavpack)
git_submodule_check(external/invoke.hpp)
endif()

include(SfizzConfig)
include(SfizzDeps)
include(SfizzFaust)
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

[![build actions]](https://github.com/sfztools/sfizz/actions)
[![build obs]](https://build.opensuse.org/package/show/home:sfztools:sfizz:develop/sfizz)

[![Discord Badge Image]](https://discord.gg/3ArE9Mw)

[![SFZv1 Status Image]](https://sfz.tools/sfizz/development/status/opcodes/?v=1)
[![SFZv2 Status Image]](https://sfz.tools/sfizz/development/status/opcodes/?v=2)
[![ARIA Status Image]](https://sfz.tools/sfizz/development/status/opcodes/?v=aria)
[![Cakewalk Status Image]](https://sfz.tools/sfizz/development/status/opcodes/?v=cakewalk)

SFZ parser and synth c++ library and JACK standalone client,
please check [our website] for more details, or [our wiki] for further information.
Expand Down Expand Up @@ -120,10 +119,9 @@ The sfizz library also uses in some subprojects:
[build actions]: https://github.com/sfztools/sfizz/actions/workflows/build.yml/badge.svg?branch=develop
[build obs]: https://build.opensuse.org/projects/home:sfztools:sfizz:develop/packages/sfizz/badge.svg
[OBS]: https://software.opensuse.org//download.html?project=home%3Asfztools%3Asfizz&package=sfizz
[SFZv1 Status Image]: https://sfz.tools/assets/img/sfizz/badge_sfz1.svg
[SFZv2 Status Image]: https://sfz.tools/assets/img/sfizz/badge_sfz2.svg
[SFZv1 Status Image]: https://sfz.tools/assets/img/sfizz/badge_sfzv1.svg
[SFZv2 Status Image]: https://sfz.tools/assets/img/sfizz/badge_sfzv2.svg
[ARIA Status Image]: https://sfz.tools/assets/img/sfizz/badge_aria.svg
[Cakewalk Status Image]: https://sfz.tools/assets/img/sfizz/badge_cakewalk.svg

[AppVeyor Build Status]: https://img.shields.io/appveyor/ci/sfztools/sfizz.svg?label=Windows&style=popout&logo=appveyor
[Travis Build Status]: https://img.shields.io/travis/com/sfztools/sfizz.svg?label=Linux&style=popout&logo=travis
3 changes: 2 additions & 1 deletion clients/sfizz_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "sfizz/MathHelpers.h"
#include "sfizz/SfzHelpers.h"
#include "sfizz/SIMDHelpers.h"
#include "sfizz/utility/U8Strings.h"
#include "MidiHelpers.h"
#include <st_audiofile_libs.h>
#include <cxxopts.hpp>
Expand Down Expand Up @@ -165,7 +166,7 @@ int main(int argc, char** argv)
ERROR_IF(!synth.loadSfzFile(sfzPath), "There was an error loading the SFZ file.");
LOG_INFO(synth.getNumRegions() << " regions in the SFZ.");

fmidi_smf_u midiFile { fmidi_smf_file_read(midiPath.u8string().c_str()) };
fmidi_smf_u midiFile { fmidi_smf_file_read(u8EncodedString(midiPath).c_str()) };
ERROR_IF(!midiFile, "Can't read " << midiPath);

const auto* midiInfo = fmidi_smf_get_info(midiFile.get());
Expand Down
3 changes: 2 additions & 1 deletion cmake/GitBuildID.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Arguments:
# SOURCE_DIR The root directory of the project, expected to be a Git repo
# OUTPUT_FILE The file which gets written
# PREFIX An optional prefix for the constant name

get_filename_component(OUTPUT_NAME "${OUTPUT_FILE}" NAME)
get_filename_component(OUTPUT_DIR "${OUTPUT_FILE}" DIRECTORY)
Expand All @@ -24,6 +25,6 @@ else()
message("(Git Build ID) Error: could not find Git")
endif()

file(WRITE "${OUTPUT_FILE}.temp" "const char* GitBuildId = \"${GIT_COMMIT_ID}\";\n")
file(WRITE "${OUTPUT_FILE}.temp" "const char* ${PREFIX}GitBuildId = \"${GIT_COMMIT_ID}\";\n")
execute_process(COMMAND "${CMAKE_COMMAND}" "-E" "copy_if_different" "${OUTPUT_FILE}.temp" "${OUTPUT_FILE}")
file(REMOVE "${OUTPUT_FILE}.temp")
13 changes: 13 additions & 0 deletions cmake/GitSubmoduleCheck.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
find_package(Git REQUIRED)

# https://gist.github.com/scivision/bb1d47a9529e153617414e91ff5390af

function(git_submodule_check dir)
if(NOT EXISTS "${dir}/CMakeLists.txt")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- ${dir}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND_ERROR_IS_FATAL ANY)
endif()
# Add a Git submodule directory to CMake, assuming the Git submodule directory is a CMake project.
# add_subdirectory(${dir} EXCLUDE_FROM_ALL)
endfunction()
4 changes: 2 additions & 2 deletions cmake/SfizzConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endif()

# Set macOS compatibility level
if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13")
endif()

# If using C++17, check if aligned-new has runtime support on the platform;
Expand Down Expand Up @@ -87,7 +87,7 @@ endif()
if(NOT PROJECT_SYSTEM_PROCESSOR)
if(MSVC)
set(PROJECT_SYSTEM_PROCESSOR "${MSVC_CXX_ARCHITECTURE_ID}" CACHE STRING "" FORCE)
elseif(CMAKE_OSX_ARCHITECTURES)
elseif(APPLE AND CMAKE_OSX_ARCHITECTURES)
set(PROJECT_SYSTEM_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}" CACHE STRING "" FORCE)
else()
set(PROJECT_SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}" CACHE STRING "" FORCE)
Expand Down
5 changes: 5 additions & 0 deletions cmake/SfizzDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ else()
sfizz_add_vendor_abseil()
endif()

# C++14 std::invoke
# add_subdirectory("external/invoke.hpp")
add_library(invoke_hpp INTERFACE)
target_include_directories(invoke_hpp INTERFACE "external/invoke.hpp/headers")

# The jsl utility library for C++
add_library(sfizz_jsl INTERFACE)
add_library(sfizz::jsl ALIAS sfizz_jsl)
Expand Down
10 changes: 9 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ SFIZZ_CXX_FLAGS += -I$(SFIZZ_DIR)/external/atomic_queue/include

SFIZZ_CXX_FLAGS += -I$(SFIZZ_DIR)/external/filesystem/include

# invoke.hpp dependency

SFIZZ_CXX_FLAGS += -I$(SFIZZ_DIR)/external/invoke.hpp/headers

### Abseil dependency

SFIZZ_C_FLAGS += -I$(SFIZZ_DIR)/external/abseil-cpp
Expand Down Expand Up @@ -293,7 +297,11 @@ SFIZZ_SOURCES += \
external/abseil-cpp/absl/synchronization/blocking_counter.cc \
external/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc \
external/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc \
external/abseil-cpp/absl/synchronization/internal/waiter.cc \
external/abseil-cpp/absl/synchronization/internal/waiter_base.cc \
external/abseil-cpp/absl/synchronization/internal/win32_waiter.cc \
external/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc \
external/abseil-cpp/absl/synchronization/internal/sem_waiter.cc \
external/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc \
external/abseil-cpp/absl/synchronization/notification.cc \
external/abseil-cpp/absl/synchronization/mutex.cc
# absl::graphcycles_internal
Expand Down
2 changes: 1 addition & 1 deletion external/abseil-cpp
Submodule abseil-cpp updated 579 files
Loading

0 comments on commit ed550bb

Please sign in to comment.