Wishing for an LV2 TTL Generator

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Wishing for an LV2 TTL Generator

Post by ssj71 »

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: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Wishing for an LV2 TTL Generator

Post by j_e_f_f_g »

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.

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Wishing for an LV2 TTL Generator

Post by autostatic »

faust-lv2 has a similar goal: http://code.google.com/p/faust-lv2/
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Wishing for an LV2 TTL Generator

Post by ssj71 »

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: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Wishing for an LV2 TTL Generator

Post by j_e_f_f_g »

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).

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

j_e_f_f_g
Established Member
Posts: 2032
Joined: Fri Aug 10, 2012 10:48 pm
Been thanked: 357 times

Re: Wishing for an LV2 TTL Generator

Post by j_e_f_f_g »

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).

Author of BackupBand at https://sourceforge.net/projects/backupband/files/
My fans show their support by mentioning my name in their signature.

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

Re: Wishing for an LV2 TTL Generator

Post by male »

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

Post by male »

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: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: Wishing for an LV2 TTL Generator

Post by raboof »

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: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Wishing for an LV2 TTL Generator

Post by ssj71 »

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

Post by male »

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: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Wishing for an LV2 TTL Generator

Post by ssj71 »

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

Post by male »

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: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: Wishing for an LV2 TTL Generator

Post by ssj71 »

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!
Post Reply