simplistic linux/vst3 plugin example/framework

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

tramp
Established Member
Posts: 1410
Joined: Mon Jul 01, 2013 8:13 am

Re: simplistic linux/vst3 plugin example/framework

Postby tramp » Sun Sep 15, 2019 5:19 am

skei wrote:be warned, it is "in progress" :-)


:) development is progress, isn't it?

I can't find your X event loop in the source, could you give me a pointer were it is?
On the road again.

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Sun Sep 15, 2019 7:12 am

tramp wrote:This is a example of Xputty:
Image


looks really nice!
todo..

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Sun Sep 15, 2019 7:16 am

tramp wrote:
skei wrote:be warned, it is "in progress" :-)


:) development is progress, isn't it?


hehe, yeah..

tramp wrote:I can't find your X event loop in the source, could you give me a pointer were it is?


there's actually two..

the eventLoop() method, for standalone executables (a 'regular' event loop)
https://github.com/skei/kode9/blob/mast ... dow.h#L848

and an event thread for use in plugins, etc..
https://github.com/skei/kode9/blob/mast ... ow.h#L1291

they both call the eventhandler whenever there's an event available:
https://github.com/skei/kode9/blob/mast ... dow.h#L911

- tor-helge
todo..

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Sun Sep 15, 2019 9:27 am

tramp wrote:Most likely is that the host didn't shot down the interface, but only hide it. Then, on the next run, your UI started with undefined behave because events get lost in the mean time.


i just tried to print out the void* parent argument to on_openEditor (the xid for the parent window you should reparent your editor to)..
in reaper, i get quite wildly different numbers: 0x68002cd, 0x6800476, 0x680068c, 0x6800755, ..
in bitwig, i always get a sequence like this: 0x7600000, 0x7600001, 0x7600002, 0x7600003, ..

the fact that they differ each time i close, and then reopen the editor, indicates that the host is not just hiding it, but actually destroying it, and recreating it again.. isn't it? i shut down everything when i close the window, including the display connection..

- tor-helge
todo..

tramp
Established Member
Posts: 1410
Joined: Mon Jul 01, 2013 8:13 am

Re: simplistic linux/vst3 plugin example/framework

Postby tramp » Sun Sep 15, 2019 10:29 am

skei wrote:the fact that they differ each time i close, and then reopen the editor, indicates that the host is not just hiding it, but actually destroying it, and recreating it again.. isn't it?


Yes, so it must be something different then that.

Unfortunately I'll be offline for a week now, because of my work. :(
On the road again.

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Sun Sep 22, 2019 9:58 am

just uploaded a "major redo".. better (and cleaner) separation between the various parts, especially xcb and cairo.. and found (and fixed) a few bugs in the process.. also, i added back some initial code for ladspa, dssi and lv2.. now i need to finalize the changes, and make things work properly again..
todo..

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Tue Sep 24, 2019 1:43 pm

another update in case anybody is interested..
i got the cairo stuff working now.. i think..
found some mailing list posts about this, which suggested adding these lines before shutting down the editor

Code: Select all

cairo_device_t* device = cairo_device_reference(cairo_surface_get_device(MCairoSurface));
cairo_device_finish(device);
cairo_device_destroy(device);

and that seemed to fix my problems!! hooray!
now i can open and close the editor as much as i want :-)
time to do a bunch of testing to be sure, and then clean up the code..

btw, the 'simplistic' part of the thread title isn't really correct anymore, and 'vst3' can be replaced with 'ladspa, dssi, lv2, vst2, vst3, and standalone executable' ..

source code: https://github.com/skei/kode9

- tor-helge
todo..

User avatar
SpotlightKid
Established Member
Posts: 105
Joined: Sun Jul 02, 2017 1:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby SpotlightKid » Tue Sep 24, 2019 2:04 pm

Would it be possible to include one or two example plugins in your repository?

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Tue Sep 24, 2019 2:14 pm

SpotlightKid wrote:Would it be possible to include one or two example plugins in your repository?


yes, that's the plan..
but i'd like make the framework itself, or at least the 'lower level' parts, as stable as i can first..
and then reintroduce the example plugins from previous version of the framework, one by one..
soon.. soon..

but in the meanwhile, you can have a peak at one of the tests i use while developing.. :-)
https://github.com/skei/kode9/blob/mast ... /plugin1.h
todo..

tramp
Established Member
Posts: 1410
Joined: Mon Jul 01, 2013 8:13 am

Re: simplistic linux/vst3 plugin example/framework

Postby tramp » Sat Sep 28, 2019 3:24 am

skei wrote:another update in case anybody is interested..
i got the cairo stuff working now.. i think..
found some mailing list posts about this, which suggested adding these lines before shutting down the editor

Code: Select all

cairo_device_t* device = cairo_device_reference(cairo_surface_get_device(MCairoSurface));
cairo_device_finish(device);
cairo_device_destroy(device);

and that seemed to fix my problems!! hooray!
now i can open and close the editor as much as i want :-)
time to do a bunch of testing to be sure, and then clean up the code..

btw, the 'simplistic' part of the thread title isn't really correct anymore, and 'vst3' can be replaced with 'ladspa, dssi, lv2, vst2, vst3, and standalone executable' ..

source code: https://github.com/skei/kode9

- tor-helge


Ah, okay, that is indeed not necessary when you use the plain xlib back-end.
On the road again.

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Sat Sep 28, 2019 7:56 am

tramp wrote:Ah, okay, that is indeed not necessary when you use the plain xlib back-end.


yeah, i was surprised myself.. in older versions of the gui stuff, i never needed to do anything similar to this.. but i tried things almost in "desperation".. and then, bam, it worked! :-D

the gui stuff was the last thing that needed major changes, and the framework is now almost up to the standard it was before "the great rewrite".. i just pasted back a bunch of old code (example plugins, audio stuff, widgets, etc), and is now in the middle of tweaking and reshaping all that to fit the newer version of the framework.. will take a little bit of time, but i'm almost at the point where i can focus on actually making plugins, instead of the underlying framework..
todo..

User avatar
skei
Established Member
Posts: 142
Joined: Sun May 18, 2014 4:24 pm

Re: simplistic linux/vst3 plugin example/framework

Postby skei » Fri Oct 11, 2019 8:56 am

things have progressed a LOT, so the thread title is not correct anymore.. the code examples have expanded and grown, and is now more or less on the same level as my previous plugin framework, plus the new stuff.. it's almost ready to be announced as "usable", but there's a few small things i want to finish properly before i do..

but..

i'm having some major surgery in a few days (removing internal organs, etc), and i expect to be away from the computer for a month or two, while i'm healing.. so i will probably not be able to continue working on the framework until the start of next year or something.. but we'll see.. until then, you can have a look at the current state of the framework here:

https://github.com/skei/kode9

and, here's a screenshot of a plugin i'm working on:

Image

i'll make a new post/thread as soon as i'm back again, and have something new to tell you :-)

- tor-helge
todo..

tramp
Established Member
Posts: 1410
Joined: Mon Jul 01, 2013 8:13 am

Re: simplistic linux/vst3 plugin example/framework

Postby tramp » Sat Oct 12, 2019 4:48 pm

skei wrote:i'm having some major surgery in a few days (removing internal organs, etc), and i expect to be away from the computer for a month or two, while i'm healing.. so i will probably not be able to continue working on the framework until the start of next year or something.. but we'll see..


All the best. Hope things went out nicely for you.

BTW. Your Slicer looks nice.
On the road again.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 1 guest