Browse Source

add some bundled plugins using faust2lv2

Zita rev1 and compressor.
audio_region_bpm_change_fix
Alexandros Theodotou 11 months ago
parent
commit
778bf5adbe
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      .builds/archlinux.yml
  2. 2
      .builds/freebsd.yml
  3. 1
      .clang-format-ignore
  4. 2
      .github/workflows/macos.yml
  5. 1
      .github/workflows/msys2.yml
  6. 2
      .gitignore
  7. 10
      .reuse/dep5
  8. 3
      INSTALL.rst
  9. 71
      LICENSES/LGPL-3.0-or-later.txt
  10. 1
      data/meson.build
  11. 24
      data/plugins/compressor.dsp.in
  12. 21
      data/plugins/gen-lv2-from-generated.sh.in
  13. 57
      data/plugins/gen-lv2.sh.in
  14. 2667
      data/plugins/generated/compressor.lv2/compressor.cpp
  15. 126
      data/plugins/generated/compressor.lv2/compressor.ttl
  16. 32
      data/plugins/generated/compressor.lv2/manifest.ttl
  17. 32
      data/plugins/generated/zita_rev1.lv2/manifest.ttl
  18. 3121
      data/plugins/generated/zita_rev1.lv2/zita_rev1.cpp
  19. 149
      data/plugins/generated/zita_rev1.lv2/zita_rev1.ttl
  20. 108
      data/plugins/meson.build
  21. 56
      data/plugins/zita_rev1.dsp.in
  22. 17
      data/plugins/zrythm-utils.lib
  23. 20
      inc/gui/backend/event.h
  24. 23
      inc/gui/backend/event_manager.h
  25. 20
      inc/plugins/plugin_descriptor.h
  26. 3
      inc/zrythm.h
  27. 5
      meson.build
  28. 6
      meson_options.txt
  29. 6
      src/audio/engine.c
  30. 20
      src/gui/backend/event_manager.c
  31. 20
      src/plugins/cached_plugin_descriptors.c
  32. 30
      src/plugins/carla_native_plugin.c
  33. 24
      src/plugins/plugin.c
  34. 20
      src/plugins/plugin_descriptor.c
  35. 86
      src/plugins/plugin_manager.c
  36. 8
      src/zrythm.c

2
.builds/archlinux.yml

@ -4,12 +4,14 @@ image: archlinux @@ -4,12 +4,14 @@ image: archlinux
packages:
- alsa-lib
- binutils
- boost
- carla
- clang
- cmake
- chromaprint
- cppcheck
- dpf-plugins
- faust
- fftw
- ffmpeg
- gtk3

2
.builds/freebsd.yml

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
image: freebsd/latest
packages:
- amsynth
- boost-libs
- carla
- cmake
- gettext-tools
@ -10,6 +11,7 @@ packages: @@ -10,6 +11,7 @@ packages:
- meson
- ninja
- chromaprint
- faust
- python
- gtk-update-icon-cache
- pkgconf

1
.clang-format-ignore

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: © 2022 Alexandros Theodotou
# SPDX-License-Identifier: FSFAP
data/plugins/generated/**/*
doc/dev/m.css/**/*
ext/**/*
inc/plugins/lv2/suil/*

2
.github/workflows/macos.yml

@ -18,7 +18,7 @@ jobs: @@ -18,7 +18,7 @@ jobs:
brew update || true
echo "installing deps"
# use || true because it returns 1
brew install gnu-sed fftw meson libsamplerate sdl2 chromaprint libgtop lilv librsvg adwaita-icon-theme guile gtksourceview5 graphviz zstd npm rt-audio rtmidi jack qjackctl cmake help2man xxhash vamp-plugin-sdk json-glib libsass sassc carla || true
brew install gnu-sed fftw meson libsamplerate sdl2 chromaprint libgtop lilv librsvg adwaita-icon-theme guile gtksourceview5 graphviz zstd npm rt-audio rtmidi jack qjackctl cmake help2man xxhash vamp-plugin-sdk json-glib libsass sassc carla faust boost || true
echo "linking python"
brew link --overwrite python
#npm install -g appdmg

1
.github/workflows/msys2.yml

@ -33,6 +33,7 @@ jobs: @@ -33,6 +33,7 @@ jobs:
mingw-w64-ucrt-x86_64-libyaml
mingw-w64-ucrt-x86_64-libsndfile
mingw-w64-ucrt-x86_64-rubberband
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-dlfcn
mingw-w64-ucrt-x86_64-SDL2
mingw-w64-ucrt-x86_64-chromaprint

2
.gitignore vendored

@ -39,7 +39,7 @@ build/*.dll @@ -39,7 +39,7 @@ build/*.dll
*.lai
*.la
*.a
*.lib
#*.lib
# Executables
*.exe

10
.reuse/dep5

@ -729,6 +729,16 @@ Files: @@ -729,6 +729,16 @@ Files:
Copyright: 2015 Robin Gareus <robin@gareus.org>
License: GPL-2.0-or-later
Files: data/plugins/generated/*/*.ttl
Copyright: 2022 Alexandros Theodotou <alex@zrythm.org>
License: LicenseRef-ZrythmLicense
Files: data/plugins/generated/*/*.cpp
Copyright:
2009-2016 Albert Graef <aggraef@gmail.com>
2003-2022 GRAME, Centre National de Creation Musicale
License: LGPL-3.0-or-later
Files:
CONTRIBUTOR_CERTIFICATE_OF_ORIGIN
data/samples/klick/README

3
INSTALL.rst

@ -93,6 +93,9 @@ Required @@ -93,6 +93,9 @@ Required
Recommended
+++++++++++
`boost (Boost) <https://www.boost.org/>`_
C++ utilities required for bundled plugins
`jack (LGPLv2.1+) <https://jackaudio.org/>`_
Low latency audio/MIDI backend

71
LICENSES/LGPL-3.0-or-later.txt

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License.
"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version".
The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

1
data/meson.build

@ -184,5 +184,6 @@ install_data ( @@ -184,5 +184,6 @@ install_data (
# css themes
subdir ('css-themes')
subdir ('plugins')
subdir ('scripts')
subdir ('windows')

24
data/plugins/compressor.dsp.in

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
// SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
declare name "@NAME@";
declare description "@DESCRIPTION@";
declare author "@AUTHOR@";
declare copyright "© 2022 Alexandros Theodotou";
declare version "1.0";
declare license "AGPL-3.0-or-later";
import ("stdfaust.lib");
import ("zrythm-utils.lib");
ratio = hslider ("[1] Ratio", 1, 1, 20, 0.1);
thresh = hslider ("[2] Threshold [unit:Hz]", -20, -50, 0, 0.1);
att = hslider ("[3] Attack [unit:ms]", 10, 1, 200, 1);
rel = hslider ("[4] Release [unit:ms]", 10, 1, 200, 1);
mix = hslider(
"[5] Mix [unit:percentage] [tooltip: Mix amount]",
50, 0, 100, 0.1);
res = co.compressor_stereo (ratio, thresh, att / 1000, rel / 1000);
process = fxctrl (1, mix / 100, res);

21
data/plugins/gen-lv2-from-generated.sh.in

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
#!@BASH@
#
# SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
# SPDX-License-Identifier: LicenseRef-ZrythmLicense
#
# This script generates the given LV2 plugin using
# the pre-generated plugin source (to be used on
# platforms where faust2lv2 is not available).
set -ex
pl_underscored_name="$1"
compiled_lib="$2"
manifest_ttl="$3"
pl_ttl="$4"
out_dir="$5"
mkdir -p "$out_dir"
cp "$compiled_lib" "$out_dir"/
cp "$pl_ttl" "$out_dir"/
cp "$manifest_ttl" "$out_dir"/

57
data/plugins/gen-lv2.sh.in

@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
#!@BASH@
#
# SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
# SPDX-License-Identifier: LicenseRef-ZrythmLicense
#
# This script generates the given LV2 plugin using
# Faust.
set -ex
faust2lv2="$1"
dsp_file="$2"
dsp_filename=$(basename "$dsp_file")
pl_underscored_name="${dsp_filename%.*}"
pl_uri="@URI_PREFIX@$pl_underscored_name"
prv_dir="$3"
out_filename="$4"
pl_type="$5"
utils_lib="$6"
utils_lib_filename=$(basename "$utils_lib")
generated_src_output="$7"
mkdir -p "$prv_dir"
cp "$dsp_file" "$prv_dir/$dsp_filename"
cp "$utils_lib" "$prv_dir/$utils_lib_filename"
pushd "$prv_dir"
# compile
faust2lv2 \
-uri-prefix "@URI_PREFIX@" \
-keep \
"$dsp_filename"
# add type
sed -i -e "s|a lv2:Plugin|a lv2:$pl_type, lv2:Plugin|" "$pl_underscored_name.lv2/$pl_underscored_name.ttl"
popd
# copy generated files
dest_lv2_dir="$generated_src_output/$pl_underscored_name.lv2"
mkdir -p "$dest_lv2_dir"
cp "$prv_dir/$pl_underscored_name.lv2/"*.ttl "$dest_lv2_dir"/
cp "$prv_dir/$pl_underscored_name/$pl_underscored_name.cpp" \
"$dest_lv2_dir/$pl_underscored_name.cpp"
sed -i -e 's|"https://faustlv2.bitbucket.io"|"@URI_PREFIX@"|' "$dest_lv2_dir/$pl_underscored_name.cpp"
# copy to output
rm -rf "$out_filename"
mv "$prv_dir/$pl_underscored_name.lv2" "$out_filename"
# cleanup
rm "$prv_dir/$dsp_filename"
rm "$prv_dir/$utils_lib_filename"
rm -rf "$prv_dir/$pl_underscored_name"
rm -rf "$prv_dir"/*.lv2
rmdir "$prv_dir"

2667
data/plugins/generated/compressor.lv2/compressor.cpp

File diff suppressed because it is too large Load Diff

126
data/plugins/generated/compressor.lv2/compressor.ttl

@ -0,0 +1,126 @@ @@ -0,0 +1,126 @@
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
@prefix epp: <http://lv2plug.in/ns/ext/port-props#> .
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
<https://lv2.zrythm.org/faust-builtin/compressor>
a lv2:CompressorPlugin, lv2:Plugin ;
doap:name "Compressor" ;
lv2:binary <compressor.so> ;
lv2:requiredFeature urid:map ;
lv2:optionalFeature epp:supportsStrictBounds ;
lv2:optionalFeature lv2:hardRTCapable ;
doap:maintainer [ foaf:name "Zrythm DAW" ] ;
rdfs:comment "Basic compressor" ;
doap:revision "1.0" ;
doap:license "AGPL-3.0-or-later" ;
lv2:port [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 0 ;
lv2:symbol "Ratio_0" ;
lv2:name "Ratio" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 190 ;
lv2:default 1 ;
lv2:minimum 1 ;
lv2:maximum 20 ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 1 ;
lv2:symbol "Threshold_1" ;
lv2:name "Threshold" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 500 ;
lv2:default -20 ;
lv2:minimum -50 ;
lv2:maximum 0 ;
units:unit [
a units:Unit ;
units:name "Hz" ;
units:symbol "Hz" ;
units:render "%f Hz"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 2 ;
lv2:symbol "Attack_2" ;
lv2:name "Attack" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 199 ;
lv2:default 10 ;
lv2:minimum 1 ;
lv2:maximum 200 ;
units:unit [
a units:Unit ;
units:name "ms" ;
units:symbol "ms" ;
units:render "%f ms"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 3 ;
lv2:symbol "Release_3" ;
lv2:name "Release" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 199 ;
lv2:default 10 ;
lv2:minimum 1 ;
lv2:maximum 200 ;
units:unit [
a units:Unit ;
units:name "ms" ;
units:symbol "ms" ;
units:render "%f ms"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 4 ;
lv2:symbol "Mix_4" ;
lv2:name "Mix" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 1000 ;
lv2:default 50 ;
lv2:minimum 0 ;
lv2:maximum 100 ;
units:unit [
a units:Unit ;
units:name "percentage" ;
units:symbol "percentage" ;
units:render "%f percentage"
] ;
] , [
a lv2:InputPort ;
a lv2:AudioPort ;
lv2:index 5 ;
lv2:symbol "in0" ;
lv2:name "in0" ;
] , [
a lv2:InputPort ;
a lv2:AudioPort ;
lv2:index 6 ;
lv2:symbol "in1" ;
lv2:name "in1" ;
] , [
a lv2:OutputPort ;
a lv2:AudioPort ;
lv2:index 7 ;
lv2:symbol "out0" ;
lv2:name "out0" ;
] , [
a lv2:OutputPort ;
a lv2:AudioPort ;
lv2:index 8 ;
lv2:symbol "out1" ;
lv2:name "out1" ;
]
.

32
data/plugins/generated/compressor.lv2/manifest.ttl

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
########## https://lv2.zrythm.org/faust-builtin/compressor ##########
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<https://lv2.zrythm.org/faust-builtin/compressor>
a lv2:Plugin ;
lv2:binary <compressor.so> ;
rdfs:seeAlso <compressor.ttl> .
# Here's how you can declare the category of the plugin. (For instruments,
# the lv2:InstrumentPlugin type will be added automatically.) See
# http://lv2plug.in/ns/lv2core/ for a list of known plugin classes.
# <https://lv2.zrythm.org/faust-builtin/compressor> a lv2:FilterPlugin .
# You might also want to set the license and author information below.
# NOTE: This isn't normally necessary if you declared the corresponding
# information as metadata in the Faust source of the plugin. The standard
# author, license and description fields in the Faust source are automagically
# included in the generated LV2 manifest.
# <https://lv2.zrythm.org/faust-builtin/compressor>
# doap:license <http://opensource.org/licenses/isc> ;
# doap:maintainer [
# foaf:name "Your Name Here" ;
# foaf:homepage <http://somewhere.org/> ;
# foaf:mbox <mailto:your@mail.here> ;
# ] .

32
data/plugins/generated/zita_rev1.lv2/manifest.ttl

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
########## https://lv2.zrythm.org/faust-builtin/zita_rev1 ##########
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<https://lv2.zrythm.org/faust-builtin/zita_rev1>
a lv2:Plugin ;
lv2:binary <zita_rev1.so> ;
rdfs:seeAlso <zita_rev1.ttl> .
# Here's how you can declare the category of the plugin. (For instruments,
# the lv2:InstrumentPlugin type will be added automatically.) See
# http://lv2plug.in/ns/lv2core/ for a list of known plugin classes.
# <https://lv2.zrythm.org/faust-builtin/zita_rev1> a lv2:FilterPlugin .
# You might also want to set the license and author information below.
# NOTE: This isn't normally necessary if you declared the corresponding
# information as metadata in the Faust source of the plugin. The standard
# author, license and description fields in the Faust source are automagically
# included in the generated LV2 manifest.
# <https://lv2.zrythm.org/faust-builtin/zita_rev1>
# doap:license <http://opensource.org/licenses/isc> ;
# doap:maintainer [
# foaf:name "Your Name Here" ;
# foaf:homepage <http://somewhere.org/> ;
# foaf:mbox <mailto:your@mail.here> ;
# ] .

3121
data/plugins/generated/zita_rev1.lv2/zita_rev1.cpp

File diff suppressed because it is too large Load Diff

149
data/plugins/generated/zita_rev1.lv2/zita_rev1.ttl

@ -0,0 +1,149 @@ @@ -0,0 +1,149 @@
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
@prefix epp: <http://lv2plug.in/ns/ext/port-props#> .
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
<https://lv2.zrythm.org/faust-builtin/zita_rev1>
a lv2:ReverbPlugin, lv2:Plugin ;
doap:name "Zita Rev1" ;
lv2:binary <zita_rev1.so> ;
lv2:requiredFeature urid:map ;
lv2:optionalFeature epp:supportsStrictBounds ;
lv2:optionalFeature lv2:hardRTCapable ;
doap:maintainer [ foaf:name "Zrythm DAW" ] ;
rdfs:comment "Zita reverb algorithm" ;
doap:revision "1.0" ;
doap:license "AGPL-3.0-or-later" ;
lv2:port [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 0 ;
lv2:symbol "Pre_Delay_0" ;
lv2:name "Pre-Delay" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 100 ;
lv2:default 20 ;
lv2:minimum 0 ;
lv2:maximum 100 ;
units:unit [
a units:Unit ;
units:name "ms" ;
units:symbol "ms" ;
units:render "%f ms"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 1 ;
lv2:symbol "F1_1" ;
lv2:name "F1" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 950 ;
lv2:default 200 ;
lv2:minimum 50 ;
lv2:maximum 1000 ;
units:unit [
a units:Unit ;
units:name "Hz" ;
units:symbol "Hz" ;
units:render "%f Hz"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 2 ;
lv2:symbol "F2_2" ;
lv2:name "F2" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 92580 ;
lv2:default 6000 ;
lv2:minimum 1500 ;
lv2:maximum 94080 ;
units:unit [
a units:Unit ;
units:name "Hz" ;
units:symbol "Hz" ;
units:render "%f Hz"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 3 ;
lv2:symbol "Low_RT60_3" ;
lv2:name "Low RT60" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 70 ;
lv2:default 3 ;
lv2:minimum 1 ;
lv2:maximum 8 ;
units:unit [
a units:Unit ;
units:name "s" ;
units:symbol "s" ;
units:render "%f s"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 4 ;
lv2:symbol "Mid_RT60_4" ;
lv2:name "Mid RT60" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 70 ;
lv2:default 2 ;
lv2:minimum 1 ;
lv2:maximum 8 ;
units:unit [
a units:Unit ;
units:name "s" ;
units:symbol "s" ;
units:render "%f s"
] ;
] , [
a lv2:InputPort ;
a lv2:ControlPort ;
lv2:index 5 ;
lv2:symbol "Mix_5" ;
lv2:name "Mix" ;
lv2:portProperty epp:hasStrictBounds ;
epp:rangeSteps 1000 ;
lv2:default 50 ;
lv2:minimum 0 ;
lv2:maximum 100 ;
units:unit [
a units:Unit ;
units:name "percentage" ;
units:symbol "percentage" ;
units:render "%f percentage"
] ;
] , [
a lv2:InputPort ;
a lv2:AudioPort ;
lv2:index 6 ;
lv2:symbol "in0" ;
lv2:name "in0" ;
] , [
a lv2:InputPort ;
a lv2:AudioPort ;
lv2:index 7 ;
lv2:symbol "in1" ;
lv2:name "in1" ;
] , [
a lv2:OutputPort ;
a lv2:AudioPort ;
lv2:index 8 ;
lv2:symbol "out0" ;
lv2:name "out0" ;
] , [
a lv2:OutputPort ;
a lv2:AudioPort ;
lv2:index 9 ;
lv2:symbol "out1" ;
lv2:name "out1" ;
]
.

108
data/plugins/meson.build

@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
# SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
# SPDX-License-Identifier: LicenseRef-ZrythmLicense
if not get_option ('bundled_plugins')
subdir_done ()
endif
plugins = [
[ 'Compressor',
'Basic compressor',
'CompressorPlugin' ],
[ 'Zita Rev1',
'Zita reverb algorithm',
'ReverbPlugin' ],
]
gen_lv2_sh = configure_file (
output: 'gen-lv2.sh',
input: 'gen-lv2.sh.in',
configuration: {
'BASH': bash.full_path (),
'URI_PREFIX': 'https://lv2.zrythm.org/faust-builtin',
},
)
gen_lv2_from_generated_sh = configure_file (
output: 'gen-lv2-from-generated.sh',
input: 'gen-lv2-from-generated.sh.in',
configuration: {
'BASH': bash.full_path (),
},
)
pl_generate_targets = []
foreach pl : plugins
pl_name = pl[0]
pl_underscored_name = pl_name.to_lower ().underscorify ()
pl_descr = pl[1]
pl_type = pl[2]
if faust2lv2.found ()
pl_dsp = configure_file (
output: pl_underscored_name + '.dsp',
input: pl_underscored_name + '.dsp.in',
configuration: {
'NAME': pl_name,
'DESCRIPTION': pl_descr,
'AUTHOR': 'Zrythm DAW',
},
)
plugin = custom_target (
pl_underscored_name + '-lv2-gen',
input: [pl_dsp, 'zrythm-utils.lib'],
output: pl_underscored_name + '.lv2.gen',
command: [
gen_lv2_sh, faust2lv2.full_path (),
'@INPUT0@', '@PRIVATE_DIR@', '@OUTPUT@',
pl_type, '@INPUT1@',
meson.current_source_dir () / 'generated'],
install: false)
pl_generate_targets += plugin
endif
pl_cpp = 'generated' / pl_underscored_name + '.lv2' / pl_underscored_name + '.cpp'
if fs.is_file (pl_cpp)
pl_lib = shared_module (
pl_underscored_name,
cpp_args: [
'-std=c++11', '-O3' ],
sources: pl_cpp,
name_prefix: '',
gnu_symbol_visibility: 'hidden',
dependencies: dependency ('boost'),
override_options: [
'b_sanitize=none',
]
)
plugin = custom_target (
pl_underscored_name + '-lv2',
input: [
pl_lib,
'generated' / pl_underscored_name + '.lv2' / 'manifest.ttl',
'generated' / pl_underscored_name + '.lv2' / pl_underscored_name + '.ttl',
],
output: pl_underscored_name + '.lv2',
command: [
gen_lv2_from_generated_sh,
pl_underscored_name, '@INPUT0@',
'@INPUT1@', '@INPUT2@', '@OUTPUT@',
],
install_dir: zrythm_libdir / 'lv2',
install: true)
else
warning (
pl_cpp + ' not found. Run `ninja -C build gen-faust-plugins` to generate it')
endif
endforeach
if faust2lv2.found ()
run_target (
'gen-faust-plugins',
command: [
'echo', 'Generated faust plugins', ],
depends: pl_generate_targets)
endif

56
data/plugins/zita_rev1.dsp.in

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
// SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* ---
*
* Copyright 2012 Kjetil S. Matheussen
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Code is written By Julius O. Smith III, and modified slightly.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
* ---
*/
declare name "@NAME@";
declare description "@DESCRIPTION@";
declare author "@AUTHOR@";
declare copyright "© 2022 Alexandros Theodotou";
declare version "1.0";
declare license "AGPL-3.0-or-later";
import ("stdfaust.lib");
import ("zrythm-utils.lib");
fsmax = 192000.0; // highest sampling rate that will be used
rdel = hslider ("[1] Pre-Delay [unit:ms]", 20, 0, 100, 1);
f1 = hslider ("[2] F1 [unit:Hz]", 200, 50, 1000, 1);
f2 = hslider ("[3] F2 [unit:Hz]", 6000, 1500, 0.49*fsmax, 1);
t60dc = hslider("[4] Low RT60 [unit:s]
[tooltip: T60 = time (in seconds) to decay 60dB in low-frequency band]",
3, 1, 8, 0.1);
t60m = hslider("[5] Mid RT60 [unit:s]
[tooltip: T60 = time (in seconds) to decay 60dB in middle band]",
2, 1, 8, 0.1);
mix = hslider("[6] Mix [unit:percentage]
[tooltip: Mix amount]",
50, 0, 100, 0.1);
res = re.zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax);
process = fxctrl (1, mix / 100, res);

17
data/plugins/zrythm-utils.lib

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
// SPDX-FileCopyrightText: © 2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
declare name "Zrythm utils";
declare copyright "© 2022 Alexandros Theodotou";
declare version "1.0";
declare license "AGPL-3.0-or-later";
// fxctrl : add an input gain and a wet-dry control to a stereo FX
// This function is Copyright (c) GRAME 2006 under the BSD license
//----------------------------------------------------------------
fxctrl(g,w,Fx) = _,_ <: (*(g),*(g) : Fx : *(w),*(w)), *(1-w), *(1-w) +> _,_;
// wetdry : use when there are separate dry/wet controls
// by Christopher Arndt under MIT license
wetdry(wet_l, wet_r, in_l, in_r) =
in_l * dry + wet_l * wet, in_r * dry + wet_r * wet;

20
inc/gui/backend/event.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

23
inc/gui/backend/event_manager.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -88,7 +72,8 @@ typedef struct EventManager @@ -88,7 +72,8 @@ typedef struct EventManager
#define EVENTS_PUSH(et, _arg) \
if ( \
ZRYTHM_HAVE_UI && EVENT_MANAGER && EVENT_QUEUE \
&& (!PROJECT || !AUDIO_ENGINE || !AUDIO_ENGINE->exporting)) \
&& (!PROJECT || !AUDIO_ENGINE || !AUDIO_ENGINE->exporting) \
&& EVENT_MANAGER->process_source_id) \
{ \
ZEvent * _ev = (ZEvent *) object_pool_get ( \
EVENT_MANAGER->obj_pool); \

20
inc/plugins/plugin_descriptor.h

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file

3
inc/zrythm.h

@ -93,6 +93,9 @@ typedef enum ZrythmDirType @@ -93,6 +93,9 @@ typedef enum ZrythmDirType
/** libdir/zrythm */
ZRYTHM_DIR_SYSTEM_ZRYTHM_LIBDIR,
/** libdir/zrythm/lv2 */
ZRYTHM_DIR_SYSTEM_BUNDLED_PLUGINSDIR,
/** Localization under "share". */
ZRYTHM_DIR_SYSTEM_LOCALEDIR,

5
meson.build

@ -82,6 +82,8 @@ manpage_completions_run_sh = find_program ( @@ -82,6 +82,8 @@ manpage_completions_run_sh = find_program (
xmllint = find_program ('xmllint')
iwyu_tool = find_program (
'iwyu_tool', 'iwyu-tool', required: false)
faust2lv2 = find_program (
'faust2lv2', required: false)
# --- Set common variables ---
@ -407,6 +409,8 @@ if get_option ('check_updates') @@ -407,6 +409,8 @@ if get_option ('check_updates')
cdata.set ('CHECK_UPDATES', 1)
endif
cdata.set_quoted ('CONFIGURE_LIBDIR', libdir)
cdata.set_quoted (
'CONFIGURE_ZRYTHM_LIBDIR', zrythm_libdir)
cdata.set_quoted ('CONFIGURE_BINDIR', bindir)
cdata.set_quoted ('LIB_SUFFIX', lib_suffix)
cdata.set_quoted ('BIN_SUFFIX', bin_suffix)
@ -1441,6 +1445,7 @@ summary ({ @@ -1441,6 +1445,7 @@ summary ({
'Extra optimizations': get_option ('extra_optimizations'),
'Extra extra optimizations': get_option ('extra_extra_optimizations'),
'Native build': get_option ('native_build'),
'Bundled plugins': get_option ('bundled_plugins'),
'Build/install manpage': get_option ('manpage'),
'Build/install completions': get_option ('completions'),
'Build/install user manual': get_option ('user_manual'),

6
meson_options.txt

@ -275,3 +275,9 @@ option ( @@ -275,3 +275,9 @@ option (
type: 'boolean',
value: false,
description: 'Whether we want the clang-tidy ninja targets. This is off by default because it causes long configuration times. Only useful for developers')
option (
'bundled_plugins',
type: 'boolean',
value: true,
description: 'Build and install bundled plugins.')

6
src/audio/engine.c

@ -5,6 +5,8 @@ @@ -5,6 +5,8 @@
* This file incorporates work covered by the following copyright and
* permission notice:
*
* ---
*
* Copyright (C) 1999-2002 Paul Davis
*
* This program is free software: you can redistribute it and/or modify
@ -19,6 +21,10 @@ @@ -19,6 +21,10 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
* ---
*/
/** \file

20
src/gui/backend/event_manager.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "zrythm-config.h"

20
src/plugins/cached_plugin_descriptors.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2020-2021 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "plugins/cached_plugin_descriptors.h"
#include "utils/file.h"

30
src/plugins/carla_native_plugin.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2019-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2019-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include "zrythm-config.h"
@ -40,6 +24,7 @@ @@ -40,6 +24,7 @@
# include "plugins/plugin_manager.h"
# include "project.h"
# include "settings/settings.h"
# include "utils/debug.h"
# include "utils/dsp.h"
# include "utils/error.h"
# include "utils/file.h"
@ -1136,9 +1121,9 @@ create_ports (CarlaNativePlugin * self, bool loading) @@ -1136,9 +1121,9 @@ create_ports (CarlaNativePlugin * self, bool loading)
const CarlaPortCountInfo * audio_port_count_nfo =
carla_get_audio_port_count_info (
self->host_handle, 0);
g_return_if_fail (
(int) audio_port_count_nfo->ins
== descr->num_audio_ins);
z_return_if_fail_cmp (
(int) audio_port_count_nfo->ins, ==,
descr->num_audio_ins);
int audio_ins_to_create =
descr->num_audio_ins == 1
? 2
@ -1800,6 +1785,9 @@ carla_native_plugin_instantiate ( @@ -1800,6 +1785,9 @@ carla_native_plugin_instantiate (
g_free (carla_binaries_dir);
/* set lv2 path */
g_message (
"setting carla LV2 path to '%s'",
PLUGIN_MANAGER->lv2_path);
carla_set_engine_option (
self->host_handle, ENGINE_OPTION_PLUGIN_PATH,
PLUGIN_LV2, PLUGIN_MANAGER->lv2_path);

24
src/plugins/plugin.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/**
* \file
@ -1126,7 +1110,9 @@ plugin_generate_window_title (Plugin * self) @@ -1126,7 +1110,9 @@ plugin_generate_window_title (Plugin * self)
sprintf (
title, "%s (%s %s%s%s)", plugin_name,
track_name, slot,
setting->open_with_carla ? " carla" : "",
/* assume all plugins use carla for now */
"",
/*setting->open_with_carla ? " carla" : "",*/
bridge_mode);
switch (self->setting->descr->protocol)

20
src/plugins/plugin_descriptor.c

@ -1,21 +1,5 @@ @@ -1,21 +1,5 @@
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
#include <stdlib.h>

86
src/plugins/plugin_manager.c

@ -1,24 +1,11 @@ @@ -1,24 +1,11 @@
// SPDX-FileCopyrightText: © 2018-2022 Alexandros Theodotou <alex@zrythm.org>
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
/*
* Copyright (C) 2018-2022 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*
* This file incorporates work covered by the following copyright and
* permission notice:
*
* ---
*
* Copyright (C) 2008-2012 Paul Davis
* Copyright (C) David Robillard
*
@ -34,6 +21,10 @@ @@ -34,6 +21,10 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
* ---
*/
#include "zrythm-config.h"
@ -257,12 +248,17 @@ create_and_load_lilv_word (PluginManager * self) @@ -257,12 +248,17 @@ create_and_load_lilv_word (PluginManager * self)
g_return_if_fail (self->lv2_path);
/* bundled plugins path */
char * bundled_plugins_path = zrythm_get_dir (
ZRYTHM_DIR_SYSTEM_BUNDLED_PLUGINSDIR);
/* add zrythm custom path for installer */
char * before_path = self->lv2_path;
self->lv2_path = g_strdup_printf (
"%s:" PREFIX "/lib/zrythm/lib/lv2",
before_path);
"%s:" PREFIX "/lib/zrythm/lib/lv2:%s",
before_path, bundled_plugins_path);
g_free (before_path);
g_free (bundled_plugins_path);
/* add test plugins if testing */
if (ZRYTHM_TESTING)
@ -367,8 +363,8 @@ load_bundled_lv2_plugins (PluginManager * self) @@ -367,8 +363,8 @@ load_bundled_lv2_plugins (PluginManager * self)
{
#ifndef _WOE32
GError * err;
const char * path = CONFIGURE_LIBDIR
"/zrythm/lv2";
const char * path = CONFIGURE_ZRYTHM_LIBDIR
"/lv2";
if (g_file_test (
path,
G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))
@ -1207,40 +1203,40 @@ plugin_manager_scan_plugins ( @@ -1207,40 +1203,40 @@ plugin_manager_scan_plugins (
if (descriptor)
{
/* add descriptor to list */
g_ptr_array_add (
self->plugin_descriptors, descriptor);
add_category_and_author (
self, descriptor->category_str,
descriptor->author);
/* update descriptor in cached */
const PluginDescriptor * found_descr =
cached_plugin_descriptors_find (
self->cached_plugin_descriptors,
descriptor, F_CHECK_VALID,
F_CHECK_BLACKLISTED);
/* if cached descriptor found, use it */
if (found_descr)
{
g_ptr_array_add (
self->plugin_descriptors,
plugin_descriptor_clone (
found_descr));
add_category_and_author (
self, found_descr->category_str,
found_descr->author);
plugin_descriptor_free (descriptor);
descriptor = g_ptr_array_index (
self->plugin_descriptors,
self->plugin_descriptors->len - 1);
if (
found_descr->num_audio_ins
!= descriptor->num_audio_ins
|| found_descr->num_audio_outs
!= descriptor->num_audio_outs
|| found_descr->num_midi_ins
!= descriptor->num_midi_ins
|| found_descr->num_midi_outs
!= descriptor->num_midi_outs
|| found_descr->num_cv_ins
!= descriptor->num_cv_ins
|| found_descr->num_cv_outs
!= descriptor->num_cv_outs)
cached_plugin_descriptors_replace (
self->cached_plugin_descriptors,
descriptor, F_SERIALIZE);
}
else
{
/* add descriptor to list */
g_ptr_array_add (
self->plugin_descriptors,
descriptor);
add_category_and_author (
self, descriptor->category_str,
descriptor->author);
/* add descriptor to cached */
cached_plugin_descriptors_add (
self->cached_plugin_descriptors,
descriptor, F_NO_SERIALIZE);

8
src/zrythm.c

@ -518,6 +518,14 @@ zrythm_get_dir (ZrythmDirType type) @@ -518,6 +518,14 @@ zrythm_get_dir (ZrythmDirType type)
parent_path, "zrythm", NULL);
}
break;
case ZRYTHM_DIR_SYSTEM_BUNDLED_PLUGINSDIR:
{
char * parent_path = zrythm_get_dir (
ZRYTHM_DIR_SYSTEM_ZRYTHM_LIBDIR);
res = g_build_filename (
parent_path, "lv2", NULL);
}
break;
case ZRYTHM_DIR_SYSTEM_LOCALEDIR:
res = g_build_filename (
prefix, "share", "locale", NULL);

Loading…
Cancel
Save