Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a simple VST plugin we can redistribute #25

Open
vroger11 opened this issue Apr 3, 2024 · 9 comments · May be fixed by #26
Open

How to create a simple VST plugin we can redistribute #25

vroger11 opened this issue Apr 3, 2024 · 9 comments · May be fixed by #26
Labels
examples More or improved examples and demos

Comments

@vroger11
Copy link

vroger11 commented Apr 3, 2024

Hello, very interesting project with a lot of potential. I wonder, is it possible with the actual state of the library to create a VST plugin based on popsicle that we can share with a user that can simply install it and use it in a DAW (e.g. ableton). I am interested in the required steps to take on the developer side

@kunitoki
Copy link
Owner

kunitoki commented Apr 4, 2024

Thanks for the support!

It is possible to do it, but also depends on what you would like to have python interpreter to do in the plugin. For having it controlling the UI would be ideal, but if you would also like to make it process the DSP part, it might require some workaround to be able to have decent performance.

A good starting point is the example app in the example folder. I will try to write more examples (not only a standalone app) with the embedded interpreter.

@vroger11
Copy link
Author

vroger11 commented Apr 8, 2024

Great to hear that. I think I can manage to have performant enough python code for signal processing. In this folder, I do not see instructions to create a VST plugin for simple user (that do not want to install python manually or other things like that). Do you have instructions for something like pyinstaller?

@kunitoki
Copy link
Owner

kunitoki commented Apr 8, 2024

Not at the moment, but it's definately planned as a demo plugin

@giohappy
Copy link

giohappy commented Apr 9, 2024

It would also be great if we had an example with python running in its own thread, with its own event loop. It would open up the possibility to make python do background stuff (including I/O) out of the main and the audio threads.

Thanks for this project, it looks really promising @kunitoki

@kunitoki kunitoki linked a pull request Apr 9, 2024 that will close this issue
@kunitoki
Copy link
Owner

kunitoki commented Apr 9, 2024

I've added an example plugin #26 but it's just the bootstrapping code, it does nothing apart from printing some logs in the console via python.

An interesting part is the ability to ship with the python library and control what should be excluded (if not needed because not used), even tho for now it only support exclusion lists and not a whitelisting list (which would be way easier to setup if not all the standard library is needed). For now the python library is compiled as binary data and linked with the app, but in the future one should be able to control how the python library should be carried over to reduce duplications and binary size of the plugin/application.

It's also possible to specify custom python packages to install into the site-packages so they are carried over (in the example i install the tomli python package and query it at runtime).

@kunitoki
Copy link
Owner

kunitoki commented Apr 9, 2024

It would also be great if we had an example with python running in its own thread, with its own event loop. It would open up the possibility to make python do background stuff (including I/O) out of the main and the audio threads.

It should be pretty simple to achieve, check this example where i use a background thread for capturing from a camera device and communicate using Queue to JUCE which then drains it from a Timer callback. Also using multiprocessing or asyncio should be possible.

What do you mean by its own event loop ? You mean an asyncio event loop or ?

@kunitoki kunitoki added the examples More or improved examples and demos label Apr 9, 2024
@giohappy
Copy link

giohappy commented Apr 9, 2024

I mean an example where python is executed (embedded) inside a thread spawned from a c++ juce application / plugin, running continously with its own async loop and communicating with the main application.

I see several use cases. The first one is doing out of band audio processing with scipy, numpy, ML, etc.
But also networking, live coding, etc. All inside a vst plugin.

What do you mean by its own event loop ? You mean an asyncio event loop or ?

yes

@kunitoki
Copy link
Owner

kunitoki commented Apr 9, 2024

I started hacking around a small AudioProcessor with a background thread processing a python script, will try to iterate it to be able to have the background thread to perform some offline audio processing for visualisation coming from the plugin

@giohappy
Copy link

giohappy commented Apr 9, 2024

That's awesome @kunitoki 😄

This is pushing me to try building the demos. I didn't before because it wasn't clear to me what was needed to cmake the demos in the repo. I will try to figure it out tomorrow, otherwise I will ask for help...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples More or improved examples and demos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants