pierreguillot / Camomile

An audio plugin with Pure Data embedded that allows to load and to control patches
GNU General Public License v3.0
892 stars 62 forks source link

use external Pd object #138

Closed debeul closed 3 years ago

debeul commented 5 years ago

environment**

pierreguillot commented 5 years ago

Hi, No sorry, it’s not yet possible. See this for further information. There’s also a project on GitHub for this. Cheers

alfonso73 commented 5 years ago

Hi Pierre, I wonder if the following will be interesting for you about loading a dll dynamically in Camomile VST.

There's is a port of VCV rack wich is called VeeSeeVST. VCV rack is a modular framework that loads dynamically modules that are dll. At the beginning the VeeSeeVST port coder can't resolve the dynamic loading but then he found a way.

You may ask him some hints?

https://www.kvraudio.com/forum/viewtopic.php?f=23&t=507216&sid=d79eab49cbf68184faa0d08421f5d64e

The project is on github to.

https://github.com/bsp2/VeeSeeVSTRack

best and thanks for the great Camomile and faust in pd!

Il ven 28 set 2018, 22:22 Pierre Guillot notifications@github.com ha scritto:

Hi, No sorry, it’s not yet possible. See this https://forum.pdpatchrepo.info/topic/11242/camomile-v1-0-1-an-audio-plugin-with-pure-data-embedded/13 for further information. There’s also a project on GitHub for this. Cheers

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pierreguillot/Camomile/issues/138#issuecomment-425555069, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFK4owJ7VRHarNNC_X2-5bG-cRYhSHYks5ufoT2gaJpZM4W-FsK .

alfonso73 commented 5 years ago

This seems to be the commit dealing with dynamically loaded dll

https://github.com/bsp2/VeeSeeVSTRack/commit/7e79bd3eda995f4c91126a676c87766cdafac4ff

Il ven 28 set 2018, 23:41 alfonso santimone alfonso.santimone@gmail.com ha scritto:

Hi Pierre, I wonder if the following will be interesting for you about loading a dll dynamically in Camomile VST.

There's is a port of VCV rack wich is called VeeSeeVST. VCV rack is a modular framework that loads dynamically modules that are dll. At the beginning the VeeSeeVST port coder can't resolve the dynamic loading but then he found a way.

You may ask him some hints?

https://www.kvraudio.com/forum/viewtopic.php?f=23&t=507216&sid=d79eab49cbf68184faa0d08421f5d64e

The project is on github to.

https://github.com/bsp2/VeeSeeVSTRack

best and thanks for the great Camomile and faust in pd!

Il ven 28 set 2018, 22:22 Pierre Guillot notifications@github.com ha scritto:

Hi, No sorry, it’s not yet possible. See this https://forum.pdpatchrepo.info/topic/11242/camomile-v1-0-1-an-audio-plugin-with-pure-data-embedded/13 for further information. There’s also a project on GitHub for this. Cheers

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pierreguillot/Camomile/issues/138#issuecomment-425555069, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFK4owJ7VRHarNNC_X2-5bG-cRYhSHYks5ufoT2gaJpZM4W-FsK .

debeul commented 5 years ago

thanks for the answer and sorry for not having read everything before :)

alfonso73 commented 4 years ago

Hi @pierreguillot , is there any advancement in incorporating external libraries in Camomile? Thanks and all the best! a.

pierreguillot commented 4 years ago

The only solution I found so far is to integrate the library to Camomile at compile-time. And even if I manage to load dynamically an external, it must be compiled with the multi-instance and multi-thread support so you would never be able to use the binaries used in Pd. It means that devs will have to provide a specific version of their libraries.

pierreguillot commented 4 years ago

FYI, I made a quick video that explains how to compile Camomile with external libraries on macOS (in french).

alfonso73 commented 4 years ago

Thanks @pierreguillot (btw even if my french is terrible, there's no audio in your video). But everything seems very clear and i'll try to do the same on Juce on my Win10 with Visual Studio. Any info i can find about multi-instance and multi-thread support in pd externals? It seems to be a pretty recent thing...

alfonso73 commented 3 years ago

Thanks Pierre, i'll try to reproduce the steps on VS2019. The only thing that i don't understand very well in a VS perspective is when you disable the "AU" Target Membership (at 02:14 in your video). I'll try to find the same thing. BTW as i understand if i compile at compile time the external libraries they are not needed to be coded with multi-thread, multi-instance support because libpd is providing this feature straight away. Am i right? thanks!

www.elgallorojorecords.bandcamp.com/ https://elgallorojorecords.bandcamp.com/ soundcloud.com/alfonsosantimone www.facebook.com/alfonsosantimone

On Wed, May 13, 2020 at 6:12 PM Pierre Guillot notifications@github.com wrote:

FYI, I made a quick video https://nubo.ircam.fr/index.php/s/Z6drYf9s87e6bD6 that explains how to compile Camomile with external libraries on macOS (in french).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pierreguillot/Camomile/issues/138#issuecomment-628092966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYUVYSLPPOA3FIXNYC2673RRLBFJANCNFSM4FXYLMFA .

pierreguillot commented 3 years ago

There is no need to disable the AU target membership as there is no AU on Windows. Indeed, if you compile the externals with libpd, the externals should have the multi-instance/thread support.

alfonso73 commented 3 years ago

Thanks Pierre! I wonder if your faustgen~ could be compiled with Camomile. In the next period i'll try at least with zexy, cyclone, else and ceammc. all the best.

On Tue, Aug 11, 2020, 18:01 Pierre Guillot notifications@github.com wrote:

There is no need to disable the AU target membership as there is no AU on Windows. Indeed, if you compile the externals with libpd, the externals should have the multi-instance/thread support.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pierreguillot/Camomile/issues/138#issuecomment-672046694, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYUVYRIQSZK76C5VOFH7RTSAFTMZANCNFSM4FXYLMFA .

pierreguillot commented 3 years ago

Yes, of course, you can compile Camomile with faustgen~, but as the faustgen~ compilation is complicated (you must link against LLVM and faust libs), the integation with camomile will be more complicated.

pierreguillot commented 3 years ago

Here is another the video for Windows that shows how to compile Camomile with externals. I assume that you know how to compile Camomile following the instructions on the repository and the demonstration is done for the effect plug-in only but this is exactly the same approach for the instrument version and the LV2 plug-in.

emviveros commented 3 years ago

I´m trying to compile Camomile with ELSE library in Windows, but I have a bunch of errors. I described all my procedure here: https://github.com/emviveros/Camomile-ELSE/issues/1

The error I has are in these file: log_Camomile_ELSE_Effect_compilation_FAIL.txt

I can compile ELSE with Camomile in OSx and Linux without problems.. Only Windows returns errors.

Thanks any advance!

porres commented 3 years ago

one of the errors is ........\Source\Pd\ELSE\allpass.2nd~.c(49): error C2065: 'M_PI': undeclared identifier [C:\U sers\Esteban\Documents\PortableGit\PortableGit\Camomile-ELSE\Effect\Builds\VisualStudio2015\ CamomileFx_SharedCode.vcxproj]

M_PI is from math.h and should be found. Seems like some linking issue

pierreguillot commented 3 years ago

https://stackoverflow.com/questions/26065359/m-pi-flagged-as-undeclared-identifier/26065595

porres commented 3 years ago

thanks, so maybe all the gazillion errors are not linking issues :(

porres commented 3 years ago

ok, here's a weird one! The error is

......\Source\Pd\ELSE\keyboard.c(63): error C2057: expected constant expression [C:\Users\ Esteban\Documents\PortableGit\PortableGit\Camomile-ELSE\Effect\Builds\VisualStudio2015\Camom ileFx_SharedCode.vcxproj] ......\Source\Pd\ELSE\keyboard.c(63): error C2466: cannot allocate an array of constant si ze 0 [C:\Users\Esteban\Documents\PortableGit\PortableGit\Camomile-ELSE\Effect\Builds\VisualS tudio2015\CamomileFx_SharedCode.vcxproj] ......\Source\Pd\ELSE\keyboard.c(63): error C2133: 'at': unknown size [C:\Users\Esteban\Do cuments\PortableGit\PortableGit\Camomile-ELSE\Effect\Builds\VisualStudio2015\CamomileFx_Shar edCode.vcxproj]

So it complains about line 64 in keyboard.c where it says it cannot allocate an array of constant si ze 0 and also complains about 'at': unknown size

here's that line https://github.com/porres/pd-else/blob/ec6e2bda4f30198b0ba6f821885356d41f485eac/Classes/Source/keyboard.c#L63

basically, what we have is

int ac = 2;
t_atom at[ac];

And it is complaining at has a size of 0 or unkown size, which doesn't seem to be true. How to fix that?

porres commented 3 years ago

it seems that if I just put an actual number and initialize it as t_atom at[2] it'll work, but I don't see why it can't get the value of the defined int in it... and although this is an easy fix for this object, there are others that I can't just hardcode a number into it, for instance: https://github.com/porres/pd-else/blob/aac57ae0374feb356a2e4743f18adbba8c42db3a/Classes/Source/note.c#L104

pierreguillot commented 3 years ago

https://stackoverflow.com/questions/9881777/why-do-i-get-cannot-allocate-an-array-of-constant-size-0 But the questions are really related to your library and it's more about standard coding in C. Please create an issue in your repository and tag me if necessary.

pierreguillot commented 3 years ago

As it seems that I will never find a direct and simple way to load externals into Camomile I started a discussion that present a workaround that IMO is very convenient. And I close this issue.