gogins / csound-vst3-opcodes

The "vst3" opcodes enable Csound to host VST3 plugin instruments and effects.
GNU General Public License v3.0
5 stars 2 forks source link

Segmentation fault in effects plugins #10

Closed gogins closed 2 years ago

gogins commented 2 years ago

Pierre Clisson pierre@clisson.com via listserv.heanet.ie Feb 21, 2022, 9:51 PM (13 hours ago)

to CSOUND

Hi,

I am starting to play with the VST3 opcodes. My goal is to route part of my audio signals to spectrum analyzer and oscilloscope plugins.

I am able to load synth plugins, send MIDI notes and get audio back, but I encounter a few issues:

libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument csound command: Abort trap vst3_host_t::~vst3_host_t. csound command: Segmentation fault

vst3_host_t::load_module: loading: /Library/Audio/Plug-ins/VST3/MeldaProduction/Tools/MMultiAnalyzer.vst3 vst3_host_t::load_module: found module classinfo: 1 module classinfo id: 4D656C646170726F4D4D416E4D4D416E cardinality: 2147483647 category: Audio Module Class name: MMultiAnalyzer vendor: MeldaProduction version: 15.01 sdkVersion: VST 3.6.5 subCategoriesString: Fx|Tools classFlags: 0 csound command: Segmentation fault vst3_host_t::~vst3_host_t.

I installed the VST3 opcodes via Risset on the latest Monterey version (Intel). I also built the opcodes directly from Mike's repo, with the same results. Csound itself is the latest stable version, compiled from the master branch.

Best,

Pierre

gogins commented 2 years ago

I found a bug in the string formatting templates in the Csound example .csd files. I had %-24.24s which caused an immediate segmentation fault. Replacing that with %-24s enabled all the examples to work for me on macOS.

MircoBerlin commented 2 years ago

@gogins I do run into something similar.

image

Here is the code I used:

`

;-m195 --opcode-lib="C:/vst4cs/lib/Release/vst3_plugins.dll" ;-z1 sr = 48000 ksmps = 100 nchnls = 2 0dbfs = 20 gireverb vst3init "C:\\vst4cs\\VST3\\Release\\TAL-Reverb-4.vst3", "reverb" , 1 /*instr 2 ; p4 is the parameter number. ; p5 is the parameter value. vstparamset gipianoteq, 4, 0.421875 endin */

`

Running on Win11, latest Csound with CsoundQT.

And TALVERB Vst3 Version. The Mda Vst3 demo works for some reason, all other vst3's in the folder not.

gogins commented 2 years ago

Instead of "reverb", you must use the actual literal VST3 name for the plugin. This is shown in your screen shot as "name:" with the value "Tal Reverb 4 Plugin", so you should use "Tal Reverb 4 Plugin" and not "reverb" in your vst3init call.

Regards, Mike


Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Sat, Sep 17, 2022 at 7:16 PM MircoBerlin @.***> wrote:

I do run in something similar.

[image: image] https://user-images.githubusercontent.com/11054139/190879260-129d92fe-5bb5-4541-a699-7ff2e142f6a6.png

Here is the code I used:

`

;-m195 --opcode-lib="C:/vst4cs/lib/Release/vst3_plugins.dll"

;-z1

sr = 48000 ksmps = 100 nchnls = 2 0dbfs = 20

gireverb vst3init "C:\vst4cs\VST3\Release\TAL-Reverb-4.vst3", "reverb" , 1

/*instr 2 ; p4 is the parameter number. ; p5 is the parameter value. vstparamset gipianoteq, 4, 0.421875

        endin */

`

Running on Win11, latest Csound with CsoundQT.

An TALVERB Vst3 Version. the Mda Vst demo works for some reason, all other vst3's in the folder not.

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1250154212, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJJEDVH6O5KGWOY7MS3V6ZGNRANCNFSM5PA35I2Q . You are receiving this because you modified the open/close state.Message ID: @.***>

MircoBerlin commented 2 years ago

@gogins thank you that helped, but it does not show any parameters, do you have an idea what I can do? thanks!

image

gogins commented 2 years ago

First, try the vst3info opcode with the verbose option turned on. Some plugins will print a list of parameters, others will not, like your TAL Reverb or my Pianoteq 7. If not, consult the vendor's documentation, and if that doesn't work, load the plugin into Reaper or something. You should be able to get a list of parameters that way.

For my Pianoteq. in Reaper, if I open the PIanoteq UI, then on the menu bar at the top of the Reaper editor, there is a button "UI." If I click on this, the Pianoteq's custom UI goes away and the generic VST parameter UI appears. As far as I can tell, the parameters are named and listed in order starting with parameter 0. I have been able to set VST3 parameters in Csound by finding the parameters this way.

By the way, the plugin parameters are not as standardized as they should be, and that is a weak spot in the otherwise pretty good VST3 specification.


Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Sun, Sep 18, 2022 at 4:46 AM MircoBerlin @.***> wrote:

@gogins https://github.com/gogins thank you that helped, but it does not show any parameters, do you have an idea what I can do? thanks!

[image: image] https://user-images.githubusercontent.com/11054139/190893720-62463bba-9aa9-4d85-b2b6-95c88b70da33.png

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1250223182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJP5B46SUQR3BOV7GOTV63JHZANCNFSM5PA35I2Q . You are receiving this because you were mentioned.Message ID: @.***>

MircoBerlin commented 2 years ago

First, try the vst3info opcode with the verbose option turned on. Some plugins will print a list of parameters, others will not, like your TAL Reverb or my Pianoteq 7. If not, consult the vendor's documentation, and if that doesn't work, load the plugin into Reaper or something. You should be able to get a list of parameters that way.

For my Pianoteq. in Reaper, if I open the PIanoteq UI, then on the menu bar at the top of the Reaper editor, there is a button "UI." If I click on this, the Pianoteq's custom UI goes away and the generic VST parameter UI appears. As far as I can tell, the parameters are named and listed in order starting with parameter 0. I have been able to set VST3 parameters in Csound by finding the parameters this way.

By the way, the plugin parameters are not as standardized as they should be, and that is a weak spot in the otherwise pretty good VST3 specification.


Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Sun, Sep 18, 2022 at 4:46 AM MircoBerlin @.***> wrote:

@gogins https://github.com/gogins thank you that helped, but it does not show any parameters, do you have an idea what I can do? thanks!

[image: image] https://user-images.githubusercontent.com/11054139/190893720-62463bba-9aa9-4d85-b2b6-95c88b70da33.png

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1250223182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJP5B46SUQR3BOV7GOTV63JHZANCNFSM5PA35I2Q . You are receiving this because you were mentioned.Message ID: @.***>

Thank you very much! Will try this as well!

MircoBerlin commented 1 year ago

@gogins using it with fxp now. And its great that way.

Another question: can I distribute the library in a commercial plugin made with cabbage?

Thanks!

gogins commented 1 year ago

I'm glad to hear you got fxp to work.

I'm not sure I understand your question about distributing the library in a commercial plugin made with Cabbage.

Are you talking about a commercial VST plugin made with Cabbage? I think that would have to be a VST2 plugin, as it doesn't look like Cabbage can currently export VST3 plugins (somebody please correct me if I'm wrong!).

I'm then guessing you want your commercial VST2 plugin made with cabbage to use the vst3 opcodes to load and run VST3 plugins in a Csound performance, is that correct?

The vst3 Csound opcodes have the same license as the VST3 SDK, which is either GPL3 for free software, or a commercial license. If you want a commercial license that is fine, but you will have to negotiate that with Steinberg according to the terms they set out for the VST3 SDK. You can read about that here: https://steinbergmedia.github.io/vst3_dev_portal/pages/VST+3+Licensing/Index.html

I have nothing to say about this one way or the other. All my own work is either open source (LGPL v2.1) or free software (GPL3). I do not produce any commercial software. It's OK with me personally if you want to use the VST3 opcodes this way, but as I said, ultimately you have to deal with Steinberg.

The Csound license itself can be LGPL v2.1 or any other later version of the GPL license, such as GPL3, which is what Cabbage itself uses, so I don't see a problem with Csound itself.

Hope this helps, Mike


Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Mon, Oct 3, 2022 at 3:45 PM MircoBerlin @.***> wrote:

@gogins https://github.com/gogins using it with fxp now. And its great that way.

Another question: can I distribute the library in a commercial plugin made with cabbage?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1265947703, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJJKCTJUNCZZWGF6CPTWBMZUHANCNFSM5PA35I2Q . You are receiving this because you were mentioned.Message ID: @.***>

MircoBerlin commented 1 year ago

Thanks @gogins

Yes, my case is I will export a VST3 made with cabbage for commercial release, that will use the VST3 opcodes.

Cabbage is already capable of exporting to VST3.

So I guess I need to study a bit the licences from Steinberg.

MircoBerlin commented 1 year ago

@gogins one question left. Will the dylib also run in Mac M1 surrounding?

thanks!

gogins commented 1 year ago

The Csound VST3 opcodes on GitHub are for Intel architecture only:

Mach-O 64-bit bundle x86_64

However, I build them for my own use on an M1 Mac, so I can either upload the dylib for you, and try changing my build system to produce a universal binary.

Best, Mike

Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Sat, Oct 8, 2022 at 4:59 AM MircoBerlin @.***> wrote:

@gogins https://github.com/gogins one question left. Will the dylib also run in Mac M1 surrounding?

thanks!

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1272271231, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJLE4UQBVD4POHNEQRTWCEZWZANCNFSM5PA35I2Q . You are receiving this because you were mentioned.Message ID: @.***>

MircoBerlin commented 1 year ago

@gogins it would be absolutely fantastic if you could provide the dylib for M1! Thank you very much

MircoBerlin commented 1 year ago

@gogins I guess the latest MacOs pre release (12.Sept.) is the one for M1 as well?

Thank you!

gogins commented 1 year ago

No. I'll post my M1 build or get it out to you somehow today.

On Sat, Oct 15, 2022, 05:07 MircoBerlin @.***> wrote:

@gogins https://github.com/gogins I guess the latest MacOs pre release (12.Sept.) is the one for M1 as well?

Thank you!

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1279701172, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJIJCZVH224ARKCPGJLWDJX5TANCNFSM5PA35I2Q . You are receiving this because you were mentioned.Message ID: @.***>

gogins commented 1 year ago

I have uploaded https://github.com/gogins/csound-vst3-opcodes/releases/download/macos-latest/csound-vst3-macos-arm64.zip which SHOULD be identical to https://github.com/gogins/csound-vst3-opcodes/releases/download/macos-latest/csound-vst3-macos.zip, except that it is built for arm64 (i.e. for the Mac M1 chip).

Please let me know whether or not it works or if you have any questions.

Best, Mike


Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com

On Sat, Oct 15, 2022 at 7:33 AM Michael Gogins @.***> wrote:

No. I'll post my M1 build or get it out to you somehow today.

On Sat, Oct 15, 2022, 05:07 MircoBerlin @.***> wrote:

@gogins https://github.com/gogins I guess the latest MacOs pre release (12.Sept.) is the one for M1 as well?

Thank you!

— Reply to this email directly, view it on GitHub https://github.com/gogins/csound-vst3-opcodes/issues/10#issuecomment-1279701172, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIGJIJCZVH224ARKCPGJLWDJX5TANCNFSM5PA35I2Q . You are receiving this because you were mentioned.Message ID: @.***>

MircoBerlin commented 1 year ago

Thank you @gogins will check ASAP.