Wishing for an LV2 TTL Generator
Moderators: MattKingUSA, khz
Wishing for an LV2 TTL Generator
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!
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Re: Wishing for an LV2 TTL Generator
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.
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.
- 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
faust-lv2 has a similar goal: http://code.google.com/p/faust-lv2/
Re: Wishing for an LV2 TTL Generator
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!
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Re: Wishing for an LV2 TTL Generator
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).
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.
Re: Wishing for an LV2 TTL Generator
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).
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.
Re: Wishing for an LV2 TTL Generator
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...
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...
Re: Wishing for an LV2 TTL Generator
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.falkTX wrote:RDF/TTL is a mess and a bit complex.male wrote:Help me see the point here...
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*:vs.Code: Select all
lv2:optionalFeature lv2:hardRtCapable ;
spot the difference?Code: Select all
lv2:optionalFeature lv2:hardRTCapable ;
- 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
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...)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?)
Re: Wishing for an LV2 TTL Generator
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.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...
_ssj71
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Re: Wishing for an LV2 TTL Generator
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.ssj71 wrote: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.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...
Re: Wishing for an LV2 TTL Generator
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!
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
Re: Wishing for an LV2 TTL Generator
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.ssj71 wrote:TTL is a way to present XML. And "by hand" is copying and pasting. I'm just REALLY lazy
Re: Wishing for an LV2 TTL Generator
Not yet, but I'm guessing its just like the ll-plugins version which did a similar thing. I will look at those. Thanks!male wrote:Did you actually look at the SWH plugins?
_ssj71
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!