Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

GNU/Linux Support? #22

Open
jaarac opened this issue Aug 9, 2022 · 12 comments
Open

GNU/Linux Support? #22

jaarac opened this issue Aug 9, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@jaarac
Copy link

jaarac commented Aug 9, 2022

Do you plan to support GNU/Linux like SO?

@jaarac jaarac added the enhancement New feature or request label Aug 9, 2022
@un1tz3r0
Copy link

i second this, some linux vsts we could use with eg bitwig would be really great

@PhysSong
Copy link

I've managed to build DDSP-VST on Arch Linux with the following changes. I'm not sure if all of them are really required, though.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b24687..385c0d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,11 +44,16 @@ add_subdirectory(externals/JUCE "${CMAKE_CURRENT_BINARY_DIR}/juce-bin" EXCLUDE_F
 add_subdirectory(externals/tensorflow/tensorflow/lite "${CMAKE_CURRENT_BINARY_DIR}/tensorflow-lite-bin" EXCLUDE_FROM_ALL)
 # TFLite CXX std needs to be explicitly set to C++20 in Visual Studio.
 target_compile_features(tensorflow-lite PUBLIC ${DDSP_CXX_STD})
-target_compile_options(tensorflow-lite PUBLIC -stdlib=libc++)
+if(APPLE)
+    target_compile_options(tensorflow-lite PUBLIC -stdlib=libc++)
+endif()
 
 # ------------------------- DDSP Binary Assets ------------------------ #
 
 juce_add_binary_data(Assets SOURCES ${DDSP_ASSETS})
+if("${CMAKE_SYSTEM}" MATCHES "Linux")
+    set_target_properties(Assets PROPERTIES POSITION_INDEPENDENT_CODE ON)
+endif()
 
 # ---------------------------- DDSP Effect ---------------------------- #
 
diff --git a/src/audio/tflite/PredictControlsModel.cpp b/src/audio/tflite/PredictControlsModel.cpp
index 4dcf3a5..d3fbd36 100644
--- a/src/audio/tflite/PredictControlsModel.cpp
+++ b/src/audio/tflite/PredictControlsModel.cpp
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
+#include <cmath>
+
 #include "audio/tflite/PredictControlsModel.h"
 #include "util/Constants.h"
 
@@ -96,7 +98,7 @@ void PredictControlsModel::call (const AudioFeatures& input, SynthesisControls&
 
     for (int i = 0; i < kHarmonicsSize; ++i)
     {
-        if (isnan (output.harmonics[i]))
+        if (std::isnan (output.harmonics[i]))
         {
             DBG ("is_nan");
             output.harmonics[i] = 0.f;

If you get error: 'exchange' is not a member of 'std'(with GCC 12), try applying juce-framework/JUCE@ce8aff2 to external/JUCE.

@Mec-iS
Copy link

Mec-iS commented Jan 9, 2023

@PhysSong You should make your changes into a PR, I would be glad to add the documentation part.
Your solution works well for me on Ubuntu 22 LTS.

@Taikakim
Copy link

Taikakim commented Jan 24, 2023

Hmm this is very interesting. I've been trying it out through Yabridge now, and it seems to work not so well. The pitch tracking flips out a lot, and the UI is quite sticky. Also I can't figure out how to load in the models I trained.

So in that code red ones are to be removed and green ones added? But I think for me this is too complicated, I don't even know what all the prerequisites for compiling under Linux are... So I root for an official version too :)

@Mec-iS
Copy link

Mec-iS commented Jan 24, 2023

Hi,
there is not need to use emulation with Wine (that is what Yabridge does as far as I understood).
These are the prerequisites:

  1. a real-time or low-latency kernel
  2. Ardour or other native DAW
  3. check that all the dependencies are installed on your system (missing libraries warnings are issued at compilation)
  4. compile the plugin in your machine using the existing Makefile

So basically for 4.:

  1. apply the changes to the files as specified above
  2. Run make in the directory where the Makefile is, a compiled VST3 plugin is generated in the build directory.
  3. Copy the plugin directory in the system's VST3 path

@Taikakim
Copy link

Ok, I will try that, I also heard just today that someone on the Linux Musicians FB group succesfully compiled this. I will try this out, thanks!

@Taikakim
Copy link

Hmm there is no Makefile, if I just run Git Clone on the repo, there is only the cmake directory, and running the repo-init script gives also errors. Also, I have no idea about what arguments to pass to cmake.

~~~ DDSP JUCE ~~~

Setting up dependencies ...

Submodule 'externals/JUCE' ([email protected]:juce-framework/JUCE.git) registered for path 'externals/JUCE'
Submodule 'externals/tensorflow' ([email protected]:tensorflow/tensorflow.git) registered for path 'externals/tensorflow'
Cloning into '/home/kim/Downloads/ddsp/ddsp-vst/externals/JUCE'...
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:juce-framework/JUCE.git' into submodule path '/home/kim/Downloads/ddsp/ddsp-vst/externals/JUCE' failed
Failed to clone 'externals/JUCE'. Retry scheduled
Cloning into '/home/kim/Downloads/ddsp/ddsp-vst/externals/tensorflow'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:tensorflow/tensorflow.git' into submodule path '/home/kim/Downloads/ddsp/ddsp-vst/externals/tensorflow' failed
Failed to clone 'externals/tensorflow'. Retry scheduled
Cloning into '/home/kim/Downloads/ddsp/ddsp-vst/externals/JUCE'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:juce-framework/JUCE.git' into submodule path '/home/kim/Downloads/ddsp/ddsp-vst/externals/JUCE' failed
Failed to clone 'externals/JUCE' a second time, aborting

Downloading DDSP TF Lite Models ...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 73.1M  100 73.1M    0     0  5779k      0  0:00:12  0:00:12 --:--:-- 6388k

DDSP TF Lite Models downloaded to models/ddsp/

@tank-trax
Copy link

tank-trax commented Jan 26, 2023

I have successfully compiled this on Debian 11. I followed the instructions and also made a few changes to add JACK support for the standalone. I could create a PR and send it over for review.

There were a few steps I needed to follow based on experience that were not in the instructions which I could also add.

I had a similar issue with trying to update the submodules where it constantly asked for SSH permissions, eventually they updated, as a failsafe, not sure if it helped or not, for JUCE and Tensorflow I manually cloned them over to the requisite locations.

I do have a question, would you mind if I hosted the Linux builds or would you like a copy of the binaries?

@Taikakim
Copy link

I'm interested in the binaries! :)

@KottV
Copy link

KottV commented Jan 28, 2023

I'm interested in the binaries! :)

what is your distro? I packaged ddsp for opensuse tw https://build.opensuse.org/package/show/multimedia:proaudio/ddsp

@tank-trax
Copy link

@Taikakim for Linux Debian 11 available here

https://github.com/tank-trax/ddsp-vst/releases

also if you'd like me to submit a pull request... I also made changes to .gitmodules to bypass authentication request

cheers

@Taikakim
Copy link

Taikakim commented Feb 7, 2023

Thanks for those! I've been busy so just now saw this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants