Wishing for an LV2 TTL Generator

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

ssj71
Established Member
Posts: 1292
Joined: Tue Sep 25, 2012 6:36 pm

Wishing for an LV2 TTL Generator

Postby ssj71 » Fri Jul 26, 2013 11:19 pm

Anyone want to make an lv2 ttl generator with drag and drop ports and groups that you click to set the names and properties? Basically QT Designer but ports instead of widgets. I think it would be much faster than typing it out. It could also open existing ttl files and generate a potential UI. I'd consider doing it, but my drag and drop skills are pretty weak. And my general UI development in general...
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!

j_e_f_f_g
Established Member
Posts: 1058
Joined: Fri Aug 10, 2012 10:48 pm

Re: Wishing for an LV2 TTL Generator

Postby j_e_f_f_g » Fri Jul 26, 2013 11:44 pm

Funny you should mention that because I was thinking of doing such an app. But I haven't started any coding, and haven't even decided if I have time to do it.

Plus, the docs for LV2 are so horrendously unuseful, I'm not sure if I want to inflict more of LV2 on myself.

User avatar
autostatic
Established Member
Posts: 1728
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Contact:

Re: Wishing for an LV2 TTL Generator

Postby autostatic » Sat Jul 27, 2013 7:24 am

faust-lv2 has a similar goal: http://code.google.com/p/faust-lv2/

ssj71
Established Member
Posts: 1292
Joined: Tue Sep 25, 2012 6:36 pm

Re: Wishing for an LV2 TTL Generator

Postby ssj71 » Mon Jul 29, 2013 5:02 pm

These all seem like they could be great starting points, we just need something generic for plugins that aren't Juce, DISTRHO, or Faust. :) I hate asking other people to do work, 'cause we're all stretched pretty thin across our various projects I think, but I think such a tool would be pretty useful for many people.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!

j_e_f_f_g
Established Member
Posts: 1058
Joined: Fri Aug 10, 2012 10:48 pm

Re: Wishing for an LV2 TTL Generator

Postby j_e_f_f_g » Mon Jul 29, 2013 11:32 pm

I took a look at Filipe's skeleton code. i guess an app to build a generic basic LV2 plugin is not too bad. So I'll go ahead with the project.

But I work in C rather than C++, so I'm just using that as a reference. The goal is to create a gui app that you can use to easily enter info about your plugin, and the app will create a C skeleton source code, an include file, the ttl files, a gcc makefile, and maybe even a deb creation file. You just need to add a little code to the skeleton run() function, and compile, So, it will be a simple, lean LV2 framework in C. (Creating your own GUI will be a bit more work. Although perhaps later I'll do some framework tie-in to GTK's glade GUI designer).

j_e_f_f_g
Established Member
Posts: 1058
Joined: Fri Aug 10, 2012 10:48 pm

Re: Wishing for an LV2 TTL Generator

Postby j_e_f_f_g » Tue Jul 30, 2013 5:43 pm

Well, in this case, I don't care about non-Linux support. For software that needs realtime performance, I prefer to write the leanest code, which means platform specific. I don't like cross-platform frameworks for realtime stuff. The Windows version of my drum software is a different codebase than my linux version. They have the same features, but implement them in different ways.

Running a UI on a different thread than the realtime streaming is a very good idea. I always do that. In fact, my drum software uses 4 different threads -- UI, Playback (tempo) timer, audio output streaming, and MIDI input. Of course, having threads just for the sake of having them, is no guarantee that you'll get good performance. You absolutely must design your threads so that, as much as possible, each one doesn't need to "wait" on some other thread. You also need to minimize doing time-consuming operations such as memory allocations. For example, my MIDI in, and audio output streaming threads, both operate on the same shared memory structures, but I designed them to do so without needing "locks" (ie mutexes in Linux-speak) nor memory allocations. They are therefore efficient, free-wheeling threads. (The trick is to make sure whatever fields/members written to by one thread, are readonly to the other thread. You also need to use CPU atomic operations where applicable).

male
Established Member
Posts: 232
Joined: Tue May 22, 2012 5:45 pm

Re: Wishing for an LV2 TTL Generator

Postby male » Tue Jul 30, 2013 9:10 pm

What is this thread even about? If defining the name and number of ports of a plugin is a greater burden to you than writing the DSP part, then you shouldn't be writing plugins in the first place.

If, on the other hand, this is about generating DSP code from block diagrams a la Faust, then that's all well and good, but what does it have to do with TTL (or any other purely external description)?

Help me see the point here...
Image

male
Established Member
Posts: 232
Joined: Tue May 22, 2012 5:45 pm

Re: Wishing for an LV2 TTL Generator

Postby male » Tue Jul 30, 2013 10:02 pm

falkTX wrote:
male wrote:Help me see the point here...

RDF/TTL is a mess and a bit complex.
Someone who just started with LV2 development will have issues with it.
Since the static data is not compiled, we can't know if the ttl files are 100% correct or not until we run them through a parser (and where to find them?)

Here's an example of something that happens *a lot*:

Code: Select all

lv2:optionalFeature lv2:hardRtCapable ;

vs.

Code: Select all

lv2:optionalFeature lv2:hardRTCapable ;

spot the difference? :wink:


You'll have the same problem if you misspell a symbol in the C code. Only in the TTL case, the example plugin host is the 'compiler'. Why not have a lint like program that validates the spelling/format of plugin metadata (shouldn't that come with the LV2 SDK anyway?, LADSPA has tools to validate plugins)? If you must have a 'TTL generator', then why not just do it as an editor macro or a shell script. Anyone who can write the DSP part of a plugin doesn't need a GUI to define its port names.
Image

User avatar
raboof
Established Member
Posts: 1654
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

Re: Wishing for an LV2 TTL Generator

Postby raboof » Wed Jul 31, 2013 8:13 am

falkTX wrote:we can't know if the ttl files are 100% correct or not until we run them through a parser (and where to find them?)

You mean where to find a parser? As it's "just" RDF, couldn't we use RDF Schema and a validator like the ones mentioned at http://unix.stackexchange.com/questions ... -rdf-files ? (have not tried myself...)

ssj71
Established Member
Posts: 1292
Joined: Tue Sep 25, 2012 6:36 pm

Re: Wishing for an LV2 TTL Generator

Postby ssj71 » Wed Jul 31, 2013 9:17 pm

male wrote:What is this thread even about? If defining the name and number of ports of a plugin is a greater burden to you than writing the DSP part, then you shouldn't be writing plugins in the first place.

If, on the other hand, this is about generating DSP code from block diagrams a la Faust, then that's all well and good, but what does it have to do with TTL (or any other purely external description)?

Help me see the point here...


Its about being lazy. DSP code is challenging and fun, and less likely to be related between plugins and devs. Writing the TTL is tedious, syntactically strict, and somewhat unfamiliar to me. I don't mean to make a statement on whether it should be used or whatever, but I can imagine a tool that would make writing it a little quicker and more organized. If its going to start an argument I'll just keep writing the ttl by hand. :)
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!

male
Established Member
Posts: 232
Joined: Tue May 22, 2012 5:45 pm

Re: Wishing for an LV2 TTL Generator

Postby male » Thu Aug 01, 2013 4:44 am

ssj71 wrote:
male wrote:What is this thread even about? If defining the name and number of ports of a plugin is a greater burden to you than writing the DSP part, then you shouldn't be writing plugins in the first place.

If, on the other hand, this is about generating DSP code from block diagrams a la Faust, then that's all well and good, but what does it have to do with TTL (or any other purely external description)?

Help me see the point here...


Its about being lazy. DSP code is challenging and fun, and less likely to be related between plugins and devs. Writing the TTL is tedious, syntactically strict, and somewhat unfamiliar to me. I don't mean to make a statement on whether it should be used or whatever, but I can imagine a tool that would make writing it a little quicker and more organized. If its going to start an argument I'll just keep writing the ttl by hand. :)


Well, writing by hand is foolish when you can just copy and paste. Alternatively, any macro processor (m4, cpp, bash, your editor, whatever) can reduce the workload to effectively filling out a form. You should look at the way the swh plugins are generated. Each plugin is defined in an XML file, which is used to generate LADSPA or LV2 versions at build time. Not that I'm recommending using XML.
Image

ssj71
Established Member
Posts: 1292
Joined: Tue Sep 25, 2012 6:36 pm

Re: Wishing for an LV2 TTL Generator

Postby ssj71 » Thu Aug 01, 2013 7:21 pm

TTL is a way to present XML. And "by hand" is copying and pasting. I'm just REALLY lazy :)
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!

male
Established Member
Posts: 232
Joined: Tue May 22, 2012 5:45 pm

Re: Wishing for an LV2 TTL Generator

Postby male » Thu Aug 01, 2013 8:29 pm

ssj71 wrote:TTL is a way to present XML. And "by hand" is copying and pasting. I'm just REALLY lazy :)


Did you actually look at the SWH plugins? The XML defines not only the metadata, but the actual DSP code as well (a C snippet). It's superior to a TTL generator, because it can generate plugins in any format, be it LADSPA, LV2, or whatever.
Image

ssj71
Established Member
Posts: 1292
Joined: Tue Sep 25, 2012 6:36 pm

Re: Wishing for an LV2 TTL Generator

Postby ssj71 » Thu Aug 01, 2013 11:12 pm

male wrote:Did you actually look at the SWH plugins?

Not yet, but I'm guessing its just like the ll-plugins version which did a similar thing. I will look at those. Thanks!
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 0 guests