HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. tobante
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 32
    • Groups 0

    tobante

    @tobante

    19
    Reputation
    39
    Profile views
    32
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    tobante Unfollow Follow

    Best posts made by tobante

    • CMake Support (Developer Builds Only)

      Hey,

      here is a roadmap to add CMake support for HISE. I don't plan to change the user or developer workflow for others. All changes can exist parallel to the normal "Projucer" workflow. Main reason for the support is to run static analysis tools on the project. CMake can create compile_commands.json files which can be read by other tools.

      I've already done most of the work. The two commits are listed below. See Roadmap. What do you guys think?

      Why

      Here is a short overview why CMake makes sense:

      • Faster builds
        • Ninja (Sometime 2/3x, when compared to running MSVC or Xcode from the commandline)
        • ccache (Super fast rebuilds, if not many files changed)
        • ClangCL/clang on Windows
      • IDE Support
        • VSCode
        • CLion
        • Visual Studio (Open Folder)
      • Export compile-commands.json
        • Used with static analyzers (clang-tidy and friends)
      • Multiple build configurations without changing a file
        • Coverage, Sanitizer, Benchmarks, ...
      • Package managment (conan/vcpkg/find_package/add_subdirectory)
        • faust, kissfft, mir, rlottie, zstd, ...
        • This is not realistic anytime soon
      • Build each hi_* JUCE module in isolation
        • This will help find/cleanup cycles within the modules

      Roadmap

      • 10c42ec Update JUCE CMake files, they are not on 6.1.3 currently.
        • cp JUCE-6.1.3/CMakeLists.txt HISE/JUCE
        • cp -r JUCE-6.1.3/extras/Build HISE/JUCE/extras/Build
      • 0ffc6b8 / c58672a Add CMakeLists.txt that can build projects/standalone
        • Add empty AppConfig.h (not needed with CMake builds)
      • That's it

      Wishlist

      Change include style for JUCE module includes. This change can already be done, without changing any Projucer build settings, because the parent directory of each JUCE modules is added to the compiler include paths. So the HISE/JUCE/modules directory in this case.

      It would enable to switch the JUCE root directory, if for example one is working on upgrading JUCE, the two directories could co-exist. Not possible currently.

      // Convert from
      #include "../JUCE/modules/juce_core/juce_core.h"
      // to
      #include "juce_core/juce_core.h"
      
      // Same here, from
      #include "../hi_lac/hi_lac.h"
      // to
      #include "hi_lac/hi_lac.h"
      
      

      clang-tidy

      Sample output from a clang-tidy run with performance-for-range-copy check enabled. Found 40 issues.

      • performance-for-range-copy (40)
      /home/user/HISE/hi_backend/snex_workbench/WorkbenchProcessor.h:321:13: error: loop variable
      is copied but only used as const reference; consider making it a const reference
      [performance-for-range-copy,-warnings-as-errors]
                      for (auto f : filesToTest)
                                ^
                           const  &
      

      Try it

      git clone -b basic-cmake-support https://github.com/tobiashienzsch/HISE.git HISE-CMake
      cd HISE-CMake
      
      # If you have ninja installed
      cmake -S . -B build -G "Ninja Multi-Config"
      cmake --build build --config Release
      
      # If not, cmake will select VisualStudio/Xcode
      cmake -S . -B build
      cmake --build build --config Release
      
      posted in C++ Development
      tobanteT
      tobante
    • RE: CMake Support (Developer Builds Only)

      @Christoph-Hart

      I think soonish would be a good time to merge my changes. For all the next steps I have planned, individual feature/bug-fix branches make more sense, as they are not directly related to CMake support. The current state is sufficient as a base to compile and run HISE on all platforms. There are 12 small commits including CLAP support (via CMake only).

      The only two commits that could affect the Projucer workflow are the following:

      • Fix warnings from clang-16
      • [hi_tools] Cleanup includes and add missing module dependencies

      All others, only added new files, or updated JUCE CMake files, which where unused before. Nevertheless it would be nice if people who have experience with HISE compiles could checkout my branch and test the normal Projucer workflow. Just to make sure that nothing is broken.

      # Clone or download from GitHub
      git clone -b basic-cmake-support https://github.com/tobiashienzsch/HISE HISE-CMake
      

      Small question:

      We need a directory to store common CMake code (warning flags, ...). Usally projects have a top-level project/cmake directory. JUCE has it under JUCE/extras/Build/CMake. My suggestion: HISE/tools/cmake.

      posted in C++ Development
      tobanteT
      tobante
    • RE: CMake Support (Developer Builds Only)

      Next update:

      Windows

      • Commits:
        • 8cfe7df (ASIO)
        • f390d06 (Warning flags)
        • 01651d7 (Warning flags)

      MSVC

      • Compiles and runs with Visual Studio 17 2022
        • Both plugin & standalone
        • JUCE_ASIO is enabled and the include path points to tools/SDK/...
        • Ninja as a generator works (Faster builds)

      ClangCL

      Does not have the same SSE level enabled by default, but when enabled it compiles, but does not link.

      clang

      Clang (GNU style) unfortunately does not work yet. Am a bit confused by the error message. The compiler warns that the AppConfig.h is found using the Microsoft include style. It finds the file in projects/standalone/JuceLibraryCode, although this folder is not in the include paths. Actually the empty dummy file should be found in projects/standalone/Source/Config. Maybe this has something to do with the incude style ../../module/module.h vs. module/module.h. I do not know yet.

      Linux ARM64

      • Commits: None necessary

      After some playing around I was also able to build all HISE executables (standalone, VST3 & CLAP) on Linux ARM64. I had to disable LTO for this because I didn't have enough RAM otherwise. After that everything worked without problems. I tested it with gcc 10.2 and clang-17 on a RaspberryPi 4 (4GB). I don't have a screen connected to the Pi at the moment, so the only test was to send the CLAP version through clap-info.

      CLAP

      • Commit: 536a690

      I've added the clap-juce-extensions via FetchContent in CMake. Works as expected. I don't have a CLAP ready DAW, so the only thing I could test was to run it through clap-info. I tested on the following systems:

      • macOS 13 (M2)
      • Fedora 38 (AMD Threadripper)
      • Raspberry OS / Debian 11 (ARM64)
      posted in C++ Development
      tobanteT
      tobante
    • RE: Slowwwwer LFOs (scriptnode based I assume)

      @ulrik Once enabled, you should have these 5 extra:

      436e1645-224f-41e2-861e-9924a3a37a1d-image.png

      posted in General Questions
      tobanteT
      tobante
    • RE: PLAY et STOP " Midi Player 1 "

      @tsempire You can try deepl.com for translations. It's a lot better then google. If it has your language

      posted in General Questions
      tobanteT
      tobante
    • RE: String state?

      @ulrik The output from exportAsBase64

      posted in Scripting
      tobanteT
      tobante
    • RE: CMake Support (Developer Builds Only)

      I just noticed that not all snex tests where running, so:

      • Add HISE_SNEX_TEST_FILES environment variable

      Now test coverage looks a lot better. I also exclude all external code from the report (mir, rlottie, ...)

      Modules
      Screenshot from 2023-11-03 09-35-27.png

      SNEX
      Screenshot from 2023-11-03 09-35-36.png

      gcovr

      gcovr \
          --html-nested \
          -e ".*juce_.*\..*"  \
          -e ".*$build_dir.*"  \
          -e ".*hi_dsp_library\/dywapitchtrack.*"  \
          -e ".*hi_dsp_library\/fft_convolver.*"  \
          -e ".*hi_rlottie\/include.*"  \
          -e ".*hi_rlottie\/src.*"  \
          -e ".*hi_snex\/src.*"  \
          -e ".*hi_streaming\/timestretch\/signalsmith_stretch.*"  \
          -e ".*hi_tools\/gin_images.*"  \
          -e ".*hi_zstd\/zstd.*"  \
          --exclude-unreachable-branches  \
          --exclude-throw-branches  \
          --merge-mode-functions merge-use-line-min  \
          -r . \
          -s $build_dir \
          -o $build_dir/html/index.html \
      
      posted in C++ Development
      tobanteT
      tobante
    • RE: CMake Support (Developer Builds Only)

      @d-healey Support for LV2 came in JUCE 7.0.0, so not at the moment. Would need to upgrade JUCE, but thats a bigger beast.

      posted in C++ Development
      tobanteT
      tobante
    • RE: CMake Support (Developer Builds Only)

      @tobante Yup, looks like 7.0.6 JUCE ChangeLog

      posted in C++ Development
      tobanteT
      tobante
    • Custom dll loading issues.

      I'm trying to compile a custom node via the "Create C++ third-party node template". The base template works as expected and is loadable. As soon as I add a member to the C++ class (unique_ptr in this case)
      the dll fails to load. The error message is rather limited, it says the file is missing, but is definitively there. what debug methods should I use to tackle the problem? Could this be a Linux issue? I can switch to Windows, but that PC is a lot slower.

      Empty template

      1de35414-d0c9-4ed8-929a-5e9288ea3cf4-image.png

      With member

      524b3584-c4e8-4f56-bfcf-5a2863be1a4e-image.png

      posted in C++ Development
      tobanteT
      tobante

    Latest posts made by tobante

    • RE: SNEX UI Parameters

      @Christoph-Hart I was so confused, because I gave @Straticah the code from your GitHub repo. :)

      posted in ScriptNode
      tobanteT
      tobante
    • RE: SNEX UI Parameters

      @Christoph-Hart I agree that your example is invalid, but that's not what @Straticah has in his example. The error probably is that he uses d for the parameter he called data. Not sure why the compiler flags line 58. Maybe it's always beginning of function.

      posted in ScriptNode
      tobanteT
      tobante
    • RE: SNEX UI Parameters

      @Christoph-Hart I'm still confused.

      • Function: L59 -L75 (contains 2 nested scopes)
      • Scope A: L60 -L65 (contains 1st p)
      • Scope B: L68 -L74 (contains 2nd p)

      Indentation is a little misleading, but it is valid.

      posted in ScriptNode
      tobanteT
      tobante
    • RE: SNEX UI Parameters

      @Christoph-Hart

      But this is legal:

      {
          // scope a
          int p = 42;
          // ...
      }
      {
          // scope b
          int p = 43;
          // ...
      }
      posted in ScriptNode
      tobanteT
      tobante
    • RE: SNEX UI Parameters

      @Christoph-Hart Which variable is redeclared? I don't see it? He has scopes around each parameter.

      posted in ScriptNode
      tobanteT
      tobante
    • RE: JUCE 7

      @HISEuser

      Since the JUCE library within HISE is a hard fork, it is unfortunately not so easy to update to v7. However, you can still use various features in v6: CLAP can be tested via my experimental CMake branch. Unfortunately only for the HISE plugin itself for now. No CLAP exports.

      I actually started a few days ago to make a plan how to update to v7 and especially how to stay up to date better/faster in the future. It'll be a few days before I post it, it's a pretty big undertaking if you want to do it "right". Especially if multiple people will work on it.

      Stay tuned for my ideas/roadmap and I agree, an update would be nice.

      posted in General Questions
      tobanteT
      tobante
    • RE: Arduino ?

      @yall

      Unfortunately, connecting HISE with Arduinos is not really technically feasible.

      Arduino

      • Arduino is a collective term for microcontrollers that can be programmed with the Arduino ecosystem
      • Arduino is a collection of C++ libraries, especially made for microcontrollers
      • Arduinos have no operating system, no GPU and usually no heap and/or exceptions
      • Typical Arduino MCUs have a maximum of 250Mhz CPU clock and kilobytes of RAM. Not megabytes

      HISE

      • HISE is a desktop application for modern high performance 64bit CPUs.
      • The minimum CPU performance for HISE is about the same as a Raspberry Pi 3 or 4 (depending on what you have in mind).
      • A Raspberry Pi has 4 cores with approx. 2Ghz each and 4 to 8 gigabytes of RAM
      • All libraries that are used internally in HISE (JUCE, rLottie, zstd, mir, ...) are also not compatible with MCUs.
      • Plugins (VST, AU, CLAP) are also not feasible without an operating system
      • HiseScript/Javascript is too big for all microcontrollers

      Theoretically feasible

      • To compile SNEX programs for ARM microcontrollers, but for this you would also have to write drivers for the audio hardware. Not really within the scope of what makes sense for HISE. Other projects (PureData, MSP, Electro-Smith Daisy) are probably better for that.
      posted in General Questions
      tobanteT
      tobante
    • Invalid character encoding in SNEX source files

      This GitHub Issue is the last active warning currently when compiling with either gcc & clang on Linux (I'm still excluding a couple of flags). It's probably easy to solve this one, I just don't know what character should go there. :)

      posted in C++ Development
      tobanteT
      tobante
    • RE: CMake Support (Developer Builds Only)

      Another minor update:

      • Add CMake target for CppBuilder
      • [hi_tools/hi_rlottie] Cleanup module dependencies
      • Add CMake target for tools/doc_builder
      • Add CMake hise::binary_data alias target
      • Fix warnings from clang-16

      This should cover all "active" tool projects. I'm not sure what the status is with tools/markdown_editor and tools/rLottie Demo. Both have last changed in 2021.

      posted in C++ Development
      tobanteT
      tobante
    • RE: Anyone had this error before?

      @johnmike You can check the content of the auto generated Projucer project. It should be under yout_project/Binaries/AutogeneratedProject.jucer. It's an xml file, search for aaxFolder. You should get two results, one for the <VS2017> exporter, the other for <XCODE_MAC>. They should point to the SDK. Also, check that the master/tools/SDK/AAX actual exists and contains files.

      posted in General Questions
      tobanteT
      tobante